Making live-queries (ie. subscription-lds) more efficient/scalable
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 15/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, postgresql
- Ambito
- backend, databases, distributed-systems
Direzione di ricerca
Inizia esaminando le implementazioni esistenti di packages/subscriptions-lds e packages/lds, poi leggi l’articolo collegato sulla scalabilità e l’elenco di ottimizzazioni successive proposto nell’issue. L’issue non ha un singolo obiettivo di implementazione né criteri di accettazione; per considerarlo completato sarebbe necessario concordare l’architettura e dimostrare il supporto scalabile alle live query con una suite di test test-driven.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Feature description
The live-query feature is impressive, but it appears to be lacking a number of optimizations needed for high scalability.
I know that most functionality that's achieved through live-queries can be approximated through use of the more efficient TRIGGER/NOTIFY subscriptions; however, the live-query approach is much more "elegant" in my view, and it requires less "wiring" to set up each time.
Because live-queries are not a high-priority feature for most developers, I expect that I will need to develop most of the optimizations myself. This will probably be a lot of work, but I'd like to give a try at it, as if I manage it, I can then benefit from the optimizations in all my future projects. (as well as the ~half dozen projects I currently have on Firestore that I plan to migrate)
This thread is my attempt to list those potential optimizations, discuss them, and eventually attempt to develop support for them. (either by enhancing the existing subscription-lds plugin, or creating a new plugin that sits on top of it)
Motivating example
What motivated this feature request for me, is that I am attempting to transition a project from Google Firestore to Postgraphile + Postgres, and its codebase is heavily reliant on the live-query functionality that Firestore supports.
I'm not in a rush to complete the transition (the current site works fine for now), but I would like to gradually extend Postgraphile until its live-query support can scale to a level comparable to Firestore. (granted, it will likely be more expensive and require horizontal-scaling/dedicated-live-query-servers, but that's acceptable)
Like mentioned, most developers seem to get by with the simpler TRIGGER/NOTIFY subscriptions. However, I think if the live-query functionality were optimized enough that you could use it on larger production sites, a lot more developers would be interested in using it.
From what I understand, Firebase/Firestore and Baqend/InvaliDB are the only two database solutions which have thoroughly
scalable live-queries at the moment. And as Firestore and InvaliDB are both proprietary, this makes scalable live-query support in Postgraphile particularly desirable.
The Medium article above, written by Wolfram Wingerath (the developer of InvaliDB's live-query solution), explains what some of those necessary optimizations are. (beyond the Medium article, he's also written papers on the subject, which describe the challenges and solutions in greater depth)
Breaking changes
It depends on the implementation details. The optimizations will likely require some architectural extensions (eg. the concept of "partitioned live-query servers"), but most of these changes should be able to be implemented in external packages, rather than the subscription-lds and lds packages themselves. (For now, I'll just maintain an independent fork with the changes needed.)
Supporting development
I [tick all that apply]:
- am interested in building this feature myself
- am interested in collaborating on building this feature
- am willing to help testing this feature before it's released
- am willing to write a test-driven test suite for this feature (before it exists)
- am a Graphile sponsor ❤️
- have an active support or consultancy contract with Graphile
My next post will attempt to describe what some of the desired optimizations are.
- Lingua principale
- JavaScript
- Stelle
- 764
- Fork
- 128
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di graphile/graphile-engine
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
graphile/graphile-engine#869 · 1 commento · 1 reazione ·
-
Provide a type guard to distinguish between ResolveTree and FieldsByTypeNameForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertaenhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
graphile/graphile-engine#849 · 2 commenti · 1 reazione ·
-
🐛 bug help wanted
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
graphile/graphile-engine#818 ·
-
Race condition when closing LDSForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 32/100
graphile/graphile-engine#755 · 2 commenti ·
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
graphile/graphile-engine#723 ·
Tutte le issue di graphile/graphile-engine
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
directus/directus#28558 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
cloudflare/workers-sdk#17189 ·
I maintainer di solito rispondono entro 1 giorno
-
AWS Lambda Waiting for: Product Owner
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
getsentry/sentry-javascript#26910 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[🐛 Bug]: @wdio/reporter drops the function name of a string script in command outputForse già presa @dhananjay6561 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
webdriverio/webdriverio#16507 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno