HACKER Q&A
📣 olivieropinotti

Which is the best sync engine?


Hey HN!

For a new app I'm developing I'd like to give it the fast and responsive feel that apps like Linear have. By having real-time querying, syncing and write operations.

I'm no expert on the matter, so feel free to educate me. I have looked into a couple of options such as Convex, ElectricSQL, Zero, Liveblocks, etc..

I feel like they always come short in a couple of ways and the best way to summarize that is their modularity.

What I would love in a sync engine:

- Being able to use my database (Postgres, AWS RDS)

- Being able to form and execute queries in my backend (suppose I have frontend in Next.js (Vercel) with an API route to my FastAPI server (AWS ECS) where I have all of my auth / permission middleware, etc.)

- Have a simple and familiar way to declare the schemas to the sync engine (like re-using SQLalchemy's or Drizzle's schemas)

- A simple SDK to form queries that uses SQL

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

Does something like this exist? Or what are the major challenges that prevent this from existing?


  👤 OmarFaruk0x01 Accepted Answer ✓
I think you can use Tanstack DB in this case. It fits what you need ideally, if I'm not wrong. It's a wrapper over Electric. However, it's currently in beta, so you can check it out. It's too handy and simple

https://tanstack.com/db/latest/docs/overview