That was just for experimenting, now I'm working on a proper version using RethinkDB with a better realtime CRUD interface. My solution doesn't rely on RethinkDB's changefeed feature though, so you should be able to implement a similar binding for any database. WORK IN PROGRESS: https://github.com/SocketCluster/sc-crud-rethink
Basically, the realtime pub/sub layer sits directly on top of the database such that any change made to the database must pass through that layer (The pub/sub layer is responsible for notifying relevant subscribers - Not the database).