rethinkdb / horizon-docs

Other
24 stars 36 forks source link

Horizon example: notifications #87

Open deontologician opened 8 years ago

deontologician commented 8 years ago

A simple notification scheme:

Users create documents in the 'notifications' collection.
Each document has a sender, receiver and read field Permissions would be:

Users create a changefeed like hz('notifications').findAll({recipient: userId}).watch(), and can do store to send a notification to another user, and update to mark their own notifications as read.