Alexander Salas Bastidas
Coder with good taste, workaholic and ubergeek π¨π»βπ»
RethinkDB pushes JSON to your apps in realtime.
Β
When your app polls for data, it becomes slow, unscalable, and cumbersome to maintain.
Β
RethinkDB is the open-source, scalable database that makes building realtime apps dramatically easier
RethinkDB pushes JSON to your apps in realtime.
When your app polls for data, it becomes slow, unscalable, and cumbersome to maintain.
RethinkDB is the open-source, scalable database that makes building realtime apps dramatically easier.
client 1
other clients
dispatch(payload, broadcast = true)
Dispatcher.setSocket = function(socket) {
// keep a reference to the socket
Dispatcher._socket = socket;
// fire action on relevant socket event
Dispatcher._socket.on('flux_action', payload => {
Dispatcher.dispatch(payload, false);
});
};
Dispatcher.dispatch = function(payload, broadcast = true) {
if(broadcast) {
Dispatcher._socket.emit('flux_action', payload);
}
// call original dispatcher, return dispatch token
return _dispatch(payload);
};By Alexander Salas Bastidas
Coder with good taste, workaholic and ubergeek π¨π»βπ»