4 ms·
To the people saying "just do Postgres", what would you say to a startup that wants to create offline first apps? CouchDB, for example is way better at that tha
by tabeth 9y ago
To the people saying "just do Postgres", what would you say to a startup that wants to create offline first apps? CouchDB, for example is way better at that than Postgres.
1) Use CouchDB and Postgres?
2) Somehow implement revisions and Postgres?
3) Use Postgres anyway and scrap the offline first?
- StavrosK 9y agoIf you want to create offline-first apps, I would use Postgres as the main datastore and use Couch to sync data between client and server. You'd have to decide which of your data would live where (or if you wanted to use Couch as a way to transfer data from the server to the client). Couch is a very good datastore for that use case, though, so I would definitely use it in some capacity for your purpose.
- tabeth 9y agoCan you expand on this? Do you mean you'd use Postgres as your main store and periodically "flush" data from CouchDB to Postgres (probably as JSON)? I don't see how that would work reliably. On the client would you source CouchDB or Postgres? Presumably you'd access CouchDB directly, but then why even use Postgres (for that subset of data, anyway).
- StavrosK 9y agoIt really depends on what your data looks like. If it's just game settings and state, put them in Couch and that's it, and keep user data like payments and activity there. If it's data you're going to want to run analytics on and sync to the client, you're probably going to have to store it in both places, I think.