rs / pushd

Blazing fast multi-protocol mobile and web push notification service
MIT License
1.16k stars 224 forks source link

Are messages stored? #93

Closed adrianofoschi closed 9 years ago

adrianofoschi commented 9 years ago

I'm using pushd for real-time message notification in webApp with EventStore. Now, I would implement a offrire facebook-like style notification system: if user received a message when He is offline He should See It in a "notifications" section with queue of the latest ten messages. The question is: are the notification messages actually stored in redis? And if they are, are there methods in REST API to access them?

If they are not, it should be useful to implement a middleware that allows user to inject a store-message function.

rs commented 9 years ago

No, only subscriptions are stored.

adrianofoschi commented 9 years ago

I suppose Google, iOS, WindowsPhone have their queue/notification service that stores messages. How to handle offline notification on webapps?

tylkomat commented 9 years ago

Just store them in your database and send a notification which links them to the notification. When the user is online he receives the notification, which updates some place in the dom to notify him. When the user is offline it is anyway stored in the database so the use will see it as usual.

The handling of the notification should just mimic the same DOM changes as the synchronous changes.