News for hackers. Stuff that matters.
Re:Offline-First Database Comparison by xrd on Monday October 25, 2021 @11:53PM (#28996223)
I tried to use couchdb with pouchdb. It was a mess to add the proper authentication layer over it and the fact that even the couchdb team has changed their opinions on the right way to do it was not impressive.

I love RxDB with Hasura behind it. It's incredible and you get a great postgres front end to boot.

Re:Offline-First Database Comparison by oblib on Tuesday October 26, 2021 @12:51PM (#29002785)
>>the fact that even the couchdb team has changed their opinions on the right way to do it was not impressive

I don't get that. If they're working on improving something I didn't like that's something I'd appreciate.

CouchDB/PouchDB works great for how I'm using them but over the years I've observed that those coming from using SQL DBs can have a hard time with it.

I get that. But CouchDB is not designed to compete or replace SQL.

To me, it feels like CouchDB was not the right tool for the job you were doing. That's not a reason to dismiss it though.

Re:Offline-First Database Comparison by goohle on Tuesday October 26, 2021 @09:49AM (#29000348)
Do you use «one database per user» model or «all users data in one db» model?
Re:Offline-First Database Comparison by xrd on Tuesday October 26, 2021 @10:35AM (#29000949)
One database per user. And even disregarding the obvious inability to natively join information across tables, it still was a mess to subscribe to changes across all of them and all the other things you take for granted with a relational database. And to me, it looks like couchdb is on life support as a technology. It's a great idea and revolutionary in it's time, putting everything as documents with views, etc. But, too many gaps and unclear direction.
Re:Offline-First Database Comparison by janl on Tuesday October 26, 2021 @10:54AM (#29001164)
CouchDB dev here, I can confirm that CouchDB is very much not on life support. Active work goes into PouchDB and CouchDB, some of which is addressing the issues brought up here. Nothing shipping yet (aside from maybe native jwt auth in this months 3.2.0 release), but definitely ongoing :)
Re:Offline-First Database Comparison by BackBlast on Wednesday October 27, 2021 @12:37PM (#29015631)
Glad to hear a new release is coming. I run CouchDB in production. I have actually checked the couchdb repo to see if it was being maintained.

Some of the things that trouble me. The ubuntu upstream package manager dropped off the radar for a while, not sure if it's currently running or not. Also, the last release was a looong time ago. I understand it's pretty stable, but there are rough spots that could use some shoring up as noted.

These issues aren't enough for me drop its active use in production, but I'm eyeing reworking how I use if these kinds of issues continue. This kind of dropping the ball doesn't instill confidence. I don't want to have to maintain my own installer so I can predictably perform new installations.

Also, no Linux ARM package. I gave a go at compiling it myself for ARM, but that failed due to being unable to find/use a compatible SpiderMonkey.

It's great tech, and I'd love to carry it with me into bigger and better projects. Here hoping :)

Re:Offline-First Database Comparison by janl on Thursday October 28, 2021 @12:09PM (#29027688)
the ASF switched binary hosting providers, the COuchDB docs have the up to date links: https://docs.couchdb.org/en/stable/install/unix.html
Re:Offline-First Database Comparison by xrd on Tuesday October 26, 2021 @01:04PM (#29002977)
That's great to hear. I love PouchDB for the record. It's amazing.

That's really great to hear about native JWT auth support, that is a huge gap for me to not have a good story of how to do auth. I totally understand the reasons for moving it outside of the database, but it was too much work to create and manage my own proxy on top of couchdb.

Thanks a lot for the clarification, and I'll be watching.

Re:Offline-First Database Comparison by lytefm on Tuesday October 26, 2021 @11:53AM (#29001946)
Jan has actually been working on per-document access control and according to the discussion it is expected to land in CouchDB 4 [1].

CouchDB doesn't move extremely fast. It's kinda boring and reliable once everything is set up - which I consider a good thing.

But I agree, it's annoying to not be able to analyse data across multiple user DBs with a single query or to build hacky solutions when listening to changes across databases.

[1] https://github.com/apache/couchdb/issues/1524

E: typo

Re:Offline-First Database Comparison by goohle on Tuesday October 26, 2021 @12:17PM (#29002285)
IMHO, user databases (both CouchDB and PouchDB) are just front cache. User can mess with his data in CouchDB/PouchDB using API, so it's important to keep data in an inner database, inaccessible to user, and copy data between databases. Inner database can be a SQL database, e.g. PG with jsonb.

  +--+     +-------+    +-------+    +--+
  |PG+<-+->+CouchDB+<-->+PouchDB+<-->+UI|
  +--+  |  +-------+    +-------+    +--+
        |
        +->...
        |
        +->...

[0]: https://kroki.io/ditaa/svg/eNpTUNDW1dVWAAEgAwy0sXG0uRQUagLct...
Re:Offline-First Database Comparison by BackBlast on Wednesday October 27, 2021 @12:42PM (#29015710)
Really depends on your use case. If that's the user's data anyway, no need to put it in an inner database.
Re:Offline-First Database Comparison by dynamite-ready on Thursday October 28, 2021 @12:14AM (#29022312)
I've actually been using Couch DB with Pouch directly to authenticate users on a small app, with a DB per user. Tbf, my app isn't all that large or complex at this stage, so I don't know if there's any overlap in what we're doing. But from your post, relational joins aside, I can't understand what's breaking for you specifically. You're offering nebulous gripes tbf, not discrete problems.
Re:Offline-First Database Comparison by dynamite-ready on Tuesday October 26, 2021 @08:39AM (#28999640)
That's interesting. What problems did you encounter?