问HN:什么是最模块化的同步引擎?

1作者: olivieropinotti大约 2 个月前原帖
嘿,HN! 我正在开发一个新应用,希望它能够像 Linear 一样快速且响应灵敏,具备实时查询、同步和写操作的能力。 我对此并不是专家,所以欢迎大家来给我普及一下。我已经研究了一些选项,比如 Convex、ElectricSQL、Zero、Liveblocks 等等。 我觉得这些选项在某些方面总是有所欠缺,最好的总结就是它们的模块化。 我希望在一个同步引擎中实现以下几点: - 能够使用我的数据库(Postgres,AWS RDS) - 能够在我的后端形成并执行查询(假设我在 Next.js(Vercel)中有前端,并通过 API 路由连接到我的 FastAPI 服务器(AWS ECS),在这里我有所有的身份验证/权限中间件等) - 有一种简单且熟悉的方式来向同步引擎声明模式(比如重用 SQLalchemy 或 Drizzle 的模式) - 一个简单的 SDK 来形成使用 SQL 的查询 此外,我想知道这样的系统如何与连接池、分片、复制等功能协同工作。 是否有类似的解决方案存在?或者有哪些主要挑战阻碍了这类解决方案的出现?
查看原文
Hey HN!<p>For a new app I&#x27;m developing I&#x27;d like to give it the fast and responsive feel that apps like Linear have. By having real-time querying, syncing and write operations.<p>I&#x27;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..<p>I feel like they always come short in a couple of ways and the best way to summarize that is their modularity.<p>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 &#x2F; permission middleware, etc.) - Have a simple and familiar way to declare the schemas to the sync engine (like re-using SQLalchemy&#x27;s or Drizzle&#x27;s schemas) - A simple SDK to form queries that uses SQL<p>Further, I wonder how such a system would work with connection pooling, sharding, replication etc.<p>Does something like this exist? Or what are the major challenges that prevent this from existing?