Re:Ask HN: Best way to sync data with JavaScript?
by dcassiano on Monday January 05, 2015 @09:52PM
(#8842674)
Do you know Meteor - http://www.meteor.com ?
I think your idea is a quite similar to what Meteor does with MongoDB.
This is actually our 1st choice for now, but we are not closed yet.
Re:Ask HN: Best way to sync data with JavaScript?
by lightblade on Tuesday January 06, 2015 @12:05AM
(#8843021)
Yes, but my problem with meteor is that it's a whole package rather than pieces that I can just take what I need.
I always thought CouchDB offers a great RESTful interface to communicate with their database. CouchDB also offers great multi-master replication, this also includes your local data.
There is a JavaScript implementation of CouchDB's data sync called PouchDB. I always thought it would be a great idea to just use CouchDB as your API layer. Anything your backend needs to do goes through Couch first and get synced to the client through Pouch.
I haven't experimented on the idea yet, but maybe you can take it further.