Works almost like firebase - Internal hosted solution powered by RethinkDB, Node.js, Express.js and Socket.IO
Data pushed to RethinkDB synchronized in realtime to every connected client via WebSocket
- Use of RethinkDB Changefeeds for Realtime messaging
- Socket.IO enables real-time bidirectional event-based communication. It works on every platform, browser or device, focusing equally on reliability and speed.
view sequence diagram in stackedit.io
direct
- client app: web browser (use WebSocket)
- app: RESTful API Server
- RethinkPush: push notification service
- RethinkDB: JSON doc storage (in lieu of Firebase)
# test dependency
npm install -g mocha
npm install
npm test
{
"title": "Message Schema",
"type": "object",
"properties": {
"namespace": {
"description": "resource identifier. e.g.: chat, case_count, notification",
"type": "string"
},
"channel": {
"description": "channel name e.g: uuid_for_private, public_for_broadcasting",
"type": "string"
},
"message": {
"description": "message to be consumed",
"type": "object"
}
},
"required": ["namespace", "channel", "message"]
}
r.db('notification').table('messages').insert({
'namespace': 'chat',
'channel': 'public',
'message': {'greeting': 'Ahoy from RethinkDB'}
});
- docker or vagrant for quick up and running
- primitive authentication
- app wide secret key
- add more tests and run on jenkins
- production provisioning with pm2
- add ts_to_send for scheduled notification
- add filter on changes query
- REST api
- post notification
- subscription level authentication
- make record deletion optional after notification is sent
ref: