Making live-queries (ie. subscription-lds) more efficient/scalable
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 15/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- javascript, postgresql
- Área
- backend, databases, distributed-systems
Línea de trabajo
Empieza revisando las implementaciones existentes de packages/subscriptions-lds y packages/lds; después, lee el artículo enlazado sobre escalabilidad y la lista propuesta de optimizaciones posteriores del issue. El issue no tiene un único objetivo de implementación ni criterios de aceptación; para darlo por terminado habría que acordar la arquitectura y demostrar la compatibilidad escalable con live queries mediante una suite de pruebas basada en tests.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- JavaScript
- Estrellas
- 764
- Forks
- 128
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de graphile/graphile-engine
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
graphile/graphile-engine#869 · 1 comentario · 1 reacción ·
-
Provide a type guard to distinguish between ResolveTree and FieldsByTypeNameQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 45/100
graphile/graphile-engine#849 · 2 comentarios · 1 reacción ·
-
🐛 bug help wanted
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
graphile/graphile-engine#818 ·
-
Race condition when closing LDSQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 32/100
graphile/graphile-engine#755 · 2 comentarios ·
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
graphile/graphile-engine#723 ·
Todos los issues de graphile/graphile-engine
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
directus/directus#28558 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
cloudflare/workers-sdk#17189 ·
Los mantenedores suelen responder en 1 día
-
AWS Lambda Waiting for: Product Owner
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
getsentry/sentry-javascript#26910 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[🐛 Bug]: @wdio/reporter drops the function name of a string script in command outputPosiblemente ocupada @dhananjay6561 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
webdriverio/webdriverio#16507 · 1 comentario ·
Los mantenedores suelen responder en 1 día