10
kiki
6y

PouchDB.

It promised full-blown CRDT functionality. So I decided to adopt it.

Disappointment number one: you have to use CouchDB, so your data model is under strict regulations now. Okay.

Disappointment number two: absolutely messed up hack required to restrict users from accessing other users’ data, otherwise you have to store all the user data in single collection. Not the most performant solution.

Disappointment number three: pagination is utter mess. Server-side timestamps are utter mess. ANY server-side logic is utter mess.

Just to set it to work, you need PouchDB itself, websocket adapter (otherwise only three simultaneous syncs), auth adapter (doesn’t work via sockets), which came out fucking large pile of bullshit at the frontend.

Disappointment number four, the final one: auth somehow works but it doesn’t set cookie. I don’t know how to get access.

GitHub user named Wohali, number one CouchDB specialist over there, doesn’t know that either.

It also doesn’t work at Incognito mode, doesn’t work at Firefox at all.

So, if you want to use PouchDB, bear that in mind:
1. CouchDB only
2. No server-side logic
3. Authorization is a mess
4. Error logs are mess too: “ERROR 83929629 broken pipe” means “out of disk space” in Erlang, the CouchDB language.
5. No hosting solutions. No backup solutions, no infrastructure around that at all. You are tied to bare metal VPS and Ansible.
6. Huge pile of bullshit at frontend. Doesn’t work at Incognito mode, doesn’t work at Firefox.

Comments
  • 0
    I'm not a DB pro, but what makes this one different so that they are actually developing it?
  • 1
    @gitpush Some kind of client side database that syncs to server when online. I think its supposed to let users use website when offline.

    At my job we could actually use something like that, tho I'm not sure how it would perform on ~10GB of data.
  • 0
    @arraysstartat1 aha, so that's the only thing for it?

    By the way, your name drives me crazy -_- :p
  • 0
    We are implementing couchDB as we speak , the main use of couchDB is to sync data from the database to your local DB, it has various events for that .

    With all that said , it has various shortcomings to it. It’s like a trade off between things , what we are doing is on relying on couch completely but using it for non critical tasks
  • 0
    @mac-aga of course, I understand it now. But PouchDB promises ready to use, general purpose CRDT.
  • 0
    100% agree that Couch/Erlang’s error messages are fucked.

    But as for the other, Couch has its issues, but I never considered strict schema to be one of them.

    Are you referring to the fact that documents need special internal fields like _id and _rev?
  • 0
    @devios1 no. If you need users to only access their own data and don’t want to deal with fucked up CouchDB hacks, you only may store user data into “users” collection, and that’s slow
  • 0
    @uyouthe Interesting. Our implementation only has a single user so I haven’t had to deal with that.
Add Comment