Live data from Hacker News

Offline-First with CouchDB and PouchDB in 2025

neighbourhood.ie

21–25 of 25 posts

Re: Offline-First with CouchDB and PouchDB in 2025

#21
post #3

Earlier quoted context omitted.

Nice, I’ll have to try out Triplit. There’s also Couchbase which has a local sync database in C++ IIRC. Also, heads up the first triplit link I tried gave me a 404: https://www.triplit.dev/docs/client/query/select#selecting-r...

Couchbase had a lot of subtle incompatibilities with PouchDB in my attempts to use it on a past project. The big one I recall was that Couchbase had far more restrictions on key names and that required some workarounds. (Though to be fair Apache has been threatening to shrink the key space greatly as well with the considered move to the Foundation-based "CouchDB 4.0".)

Ah good to know. For my use cases I would probably be looking at Couchbase Lite [1] not PouchDB. I’d be more concerned about file attachment sizes and syncing.

1: https://github.com/couchbase/couchbase-lite-C

Re: Offline-First with CouchDB and PouchDB in 2025

#22

Earlier quoted context omitted.

Couchbase had a lot of subtle incompatibilities with PouchDB in my attempts to use it on a past project. The big one I recall was that Couchbase had far more restrictions on key names and that required some workarounds. (Though to be fair Apache has been threatening to shrink the key space greatly as well with the considered move to the Foundation-based "CouchDB 4.0".)

Ah good to know. For my use cases I would probably be looking at Couchbase Lite [1] not PouchDB. I’d be more concerned about file attachment sizes and syncing. 1: https://github.com/couchbase/couchbase-lite-C

That's a related thing I learned from that past project: file attachments are also extremely vulnerable to compatibility issues between CouchDB/PouchDB/Couchbase/Cloudant/etc. Even when they claim to support sizes large enough, they often fail to sync even when small. Attachments in general in the CouchDB protocol are a bottleneck that slows or effectively breaks sync if you have too many to sync at once, because most CouchDB-ish implementations tend to only process a single document at once among other factors.

The project I was working on involved regularly taking some photos and all the sync issues with attachments led to moving to syncing only metadata like width, height, and Blurhashes in the database itself and use a reference URL/pointer to a content-addressed storage (basically an S3 bucket-like with git-like hashes for filenames) we could background sync more directly outside of the CouchDB protocol. (Blurhashes were particularly useful there while waiting on that additional background sync phase after the CouchDB sync.)

Re: Offline-First with CouchDB and PouchDB in 2025

#24

I would love to see a sync solution that didn't want to replace my datastore, or mediate all access to it. This approach means the tools have to be good at not just sync, but also querying, business logic, validation, authn, authz, trigger background jobs, etc. That's a lot! I'm not trying to eliminate my backend, nor an all-in-one frontend DB. I've tried tools that do that, and I've come to think the approach has se…

WatermelonDB and Replicache both follow this model.

Re: Offline-First with CouchDB and PouchDB in 2025

#25
post #15

Earlier quoted context omitted.

triplit sounds awesome. Any precedence of someone using it from a native iOS app?

With React Native yes but not yet with Swift. There's been quite a few requests to my surprise through--I figured CloudKit, etc would be sufficient on iOS but I don't have experience there.

CloudKit not cross platform
Post reply on HN