6 comments

  • ilkhan45 days ago
    A few questions&#x2F;comments after skimming the docs:<p>- How does authz work? Can I use Postgres RLS? If not, how would you address row or column-level permissions in a system that uses this? - If you&#x27;re using logical replication to sync with PG, is there a limit to the number of clients you can have connected? I see there is a lot of work around de-duping live queries, but how well does that work in practice? - Any thought to making an extension for Postgres? My main hesitation right now is that I have to go through an NPM package to use this but a lot of our tooling expects a plain Postgres connection. - REALLY looking forward to seeing how the schema migration story looks.<p>Overall, it seems to address most of the use-cases where I&#x27;d reach for an ORM or API server so I&#x27;m really interested to see where this could go.
    • phrasecode5 days ago
      Thanks for reading through and for these questions. I&#x27;ll take them in their order:<p>---<p>Auth &#x2F; RLS<p>Yes — LinkedQL works with Postgres Row-Level Security. Each LinkedQL connection is equivalent to a regular DB connection (e.g., new LinkedQLClient(connectionInfo) is like new pg.Client(connectionInfo)). There’s no new permission model to maintain — the DB remains the enforcement point.<p>Live queries always execute under the same authenticated role you provided, so RLS policies apply on every refresh or incremental update. LinkedQL never uses a “superuser” backend that could widen visibility.<p>--<p>Replication limits &amp; scaling<p>Right now, each database connection supports one logical replication slot. LinkedQL dedupes overlapping live queries on top of it — so 1,000 clients watching the same underlying SELECT only cost the DB one change stream.<p>We plan to support a distributed architecture as well — multiple instances of the live query engine coordinating load for high-traffic deployments.<p>---<p>Why an npm package (and future extension)<p>Right now LinkedQL plugs directly into JavaScript apps, matching how many teams already query Postgres from frontend or backend code.<p>We definitely have a Postgres extension in the roadmap for your exact use case – tighter operational integration.<p>---<p>Schema migration story<p>This is also one I’m personally excited about. We previously had an automatic schema versioning layer in the earlier LinkedQL prototype:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;linked-db&#x2F;linked-ql&#x2F;wiki&#x2F;Automatic-Schema-Versioning" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;linked-db&#x2F;linked-ql&#x2F;wiki&#x2F;Automatic-Schema...</a><p><a href="https:&#x2F;&#x2F;github.com&#x2F;linked-db&#x2F;linked-ql&#x2F;wiki&#x2F;Migrations" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;linked-db&#x2F;linked-ql&#x2F;wiki&#x2F;Migrations</a><p>The goal in the current version is a cleaner rewrite of that whole feature. So, migration support is returning – with everything we learned in the previous baked in.<p>For example, while the previous implementation of the diff-based migration feature spoke JSON for schema declarations, we plan to let that be pure SQL – yet, diff-based.<p>---<p>Thanks again for the thoughtful look! We can zoom into any other area of your choice.
  • esafak1 hour ago
    Please follow <a href="https:&#x2F;&#x2F;www.conventionalcommits.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.conventionalcommits.org&#x2F;</a>
  • phrasecode5 days ago
    Author here — a bit more detail on architecture and guarantees<p>Happy to dig into internals if anyone’s curious — how live updates propagate, how JOINs and complex queries resolve, consistency expectations, worst-case scaling, etc.<p>To keep the main post short, here are deep-dive links if you want to explore:<p>• Live update mechanics <a href="https:&#x2F;&#x2F;linked-ql.netlify.app&#x2F;capabilities&#x2F;live-queries" rel="nofollow">https:&#x2F;&#x2F;linked-ql.netlify.app&#x2F;capabilities&#x2F;live-queries</a><p>• Engineering paper (replication pipelines, differential projection, query inheritance) <a href="https:&#x2F;&#x2F;linked-ql.netlify.app&#x2F;engineering&#x2F;realtime-engine" rel="nofollow">https:&#x2F;&#x2F;linked-ql.netlify.app&#x2F;engineering&#x2F;realtime-engine</a><p>Totally open to questions — I’m hanging around the thread to learn what concerns matter most.
  • nthypes1 hour ago
    This is an backend library? How to enable Live queries in the frontend?
  • nthypes1 hour ago
    How you solve scale of Live queries different from Zero sync? zero.rocicorp.dev
  • necubi1 hour ago
    The docs and the comments here are clearly LLM generated. Please don&#x27;t submit AI slop to HN, or at the very least talk about it in your own words!<p>The commit history is legitimately insane though: <a href="https:&#x2F;&#x2F;github.com&#x2F;linked-db&#x2F;linked-ql&#x2F;commits&#x2F;master&#x2F;" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;linked-db&#x2F;linked-ql&#x2F;commits&#x2F;master&#x2F;</a>