Ask HN: Which is the best sync engine?

6 pointsposted a month ago
by olivieropinotti

Item id: 46374814

5 Comments

giovannibonetti

a month ago

I have been using Powersync, and it works great for mobile apps with offline-first functionality.

kobieps

a month ago

I suppose the only part the OP would need to look at is "Being able to form and execute queries in my backend" for the read path, since Sync Rules / Sync Streams need to define those queries. For the write path, you should be able to re-use the existing APIs / permission middleware for the most part.

Then: "Further, I wonder how such a system would work with connection pooling, sharding, replication etc."

These are all topics on their own, but briefly: - Connection Pooling: Not supported in PowerSync Cloud atm, but supported in theory when self-hosting since pgbouncer 1.23 added WAL support. Having said that, clients connect to the PowerSync Service for sync operations, so you only need a single direct connection between the service and your postgres. - Sharding: PowerSync can be used in a sharded setup [1], with better support planned - Replication: PowerSync uses the Postgres WAL for replication [2]

[1] https://docs.powersync.com/usage/sync-rules/advanced-topics/... [2] https://docs.powersync.com/installation/database-setup#other...

0xblinq

a month ago

Dexie is my favorite, although I haven’t tried them all of course.