This is a migrated thread and some comments may be shown as answers.

Does telerik backend service have real time update?

2 Answers 63 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Wee Ching
Top achievements
Rank 1
Wee Ching asked on 03 Jun 2015, 11:25 PM
let say user comment on a post and the comment will real time update to view without any refresh.

2 Answers, 1 is accepted

Sort by
0
Wee Ching
Top achievements
Rank 1
answered on 03 Jun 2015, 11:45 PM
Make it clear,  anything change in backend will automatic sync in view
0
Anton Dobrev
Telerik team
answered on 04 Jun 2015, 02:31 PM
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.
 
Tags
General Discussion
Asked by
Wee Ching
Top achievements
Rank 1
Answers by
Wee Ching
Top achievements
Rank 1
Anton Dobrev
Telerik team
Share this question
or