Hacker News new | ask | show | jobs
by tarr11 3372 days ago
Other than Couch/Pouch, are there any other projects providing solutions to this problem? The one thing I dislike about couchdb is the default "user-per-db" model.

I'm interested in solutions that allow a traditional relational db instead of a key-value store. Seems like with indexeddb on the client, and postgres on the server, you could probably keep a segment synced.

3 comments

I haven't found one and I really wonder if everybody rolls their own sync solution.

> The one thing I dislike about couchdb is the default "user-per-db" model.

Why exactly? I think the overhead of the DBs is rather small. It's not like having a MySQL DB for every user ;)

Also, you can achieve something like "global data" as well: Either replicate from users' DBs to a shared DB or maybe make some kind of "system" user that has access to the users' DBs. I'm not an expert, but that's what I figured out so far with my limited experience.

Performance-wise, i think it's probably fine. But it doesn't play well with any kind of group permissions. Things are either owned by a user or they are almost impossible to sync.

Let's say you are making a CRM with couch/pouch. Let's say that you have permissions to see a Customer record, but it is shared across your company. How do you sync that? It's not owned by a user, it's owned by the company. What happens if permissions change?

Realm is awesome for this. It is not a relational database in the traditional (SQL) sense, but more of an object database that allows for relations between the objects. Their sync backend is pretty neat.
Realm has no real support for web apps. It's for native platforms only. Dealbraker for me.
Also not relational, but Meteor (MongoDB) with GroundDB for the client provides optimistic UI, offline persistence, and sync on reconnect. Unlike Couch / Puch, you can easily share a DB between users with authentication / authorization. Synced content can be controlled with subscriptions.