Does telerik backend service have real time update?

3 posts, 0 answers
  1. Wee Ching
    Wee Ching avatar
    5 posts
    Member since:
    Mar 2015

    Posted 03 Jun 2015 Link to this post

    let say user comment on a post and the comment will real time update to view without any refresh.
  2. Wee Ching
    Wee Ching avatar
    5 posts
    Member since:
    Mar 2015

    Posted 03 Jun 2015 in reply to Wee Ching Link to this post

    Make it clear,  anything change in backend will automatic sync in view
  3. Anton Dobrev
    Admin
    Anton Dobrev avatar
    539 posts

    Posted 04 Jun 2015 Link to this post

    Hi,

    I can think of two approaches, both involving the usage of:

     - The cloud code of the respective content type that is being updated
     - Certain client app logic that subscribes the user/device for the kind of notifications.

    1. Push Notifications

    This is the approach covered oot of the box by Backend Services. Subscribe the user for push notifications and send a push notification from the afterCreate/afterUpdate event of the cloud code for this content type.

    You can allow the users to subscribe for certain categories/tags and sent the notification only to these users that are interested in them depending on the kind of item that is being updated/created. Thus when the app is not running you will be able to notify the user with a visual that there is something new and interesting on the server (which is the advantage of this approach). If the app is running, you will be able to handle this event and refresh your UI. More on this handling can be read here.

    2. Real-time messaging

    Another approach would be again to use the publish-subscribe pattern and external publish-subscribe messaging provider. This should not be mistaken with push notifications. 

    For example, consider the following:
     - The client app subscribes to a publish-subscribe provider.
     - The Cloud Code of Backend Services notifies the provider that there is something new on its server and pushes the information with an external call.
    - When it is running, the client app is notified by the external provider that there is something new and, for example, reads/refreshes the data from Backend Services.

    Let me know if you have further questions.

    Regards,
    Anton Dobrev
    Telerik
     
    Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
     
Back to Top