Hacker Newsnew | past | comments | ask | show | jobs | submit | bruchim's commentslogin

Is there an official production-ready solution for getting the 'Live Query' unofficial feature working? (I'm not talking about 'subscription')

I've found some [1] [2] [3], but they're either archived or not ready for production.

I want to register from my clients (frontend app) for specific (can be complex) queries and get updates on changes.

[1] https://github.com/n1ru4l/graphql-live-query [2] https://www.graphile.org/postgraphile/live-queries/ [3]https://grafbase.com/blog/simplify-building-realtime-applica...


sure, I would be happy to hear more about it. Let me know how to contact you.


Hey, I'm the PM for LiveSync. Happy to speak with you about the product — could you please send an email to [srushtika][dot][neelakantam][at][ably][dot][com]?


Thanks, super helpful. re Cloudflare, are you using them to reduce latency? what about a centralized database?


Expiration-based cache (e.g., 3 seconds) is not acceptable in this case, and more than that will reduce the load on the server + db dramatically.

Imaging subscribing to SQL query not just for a table; isn't it very complicated?


It's super simple for a simple demo app, not easy for a large scale.


It remains just as simple. The transmission model does not change as the size of application code changes.

The only thing to worry about is load balancing socket restoration when the server recovers from an outage so it’s not overwhelmed reopening all sockets simultaneously.

As for the database side you should only be concerned with changes to a select few tables and not the entirety of data. That could also be centrally managed with a script.


Thanks! Electric looks great! though I'm wondering how it works in scale. I'm using Postgres and have some heavy queries, would be great to cache\materizlized the results instead of re-run them every time for every user, or for returning users without any change in the data.


Thank you for the detailed answer, you're awesome.

Electric-SQL, Convex, and Triplit are definitely relevant, and I'll dive deep into understanding their pros and cons. In the meantime, I found another relevant one: https://squid.cloud/, which has a slightly different approach, more like full BAAS.

On one end, it can save me some time; on another, it's another stack my R&D needs to be familiar with.


It looks very relevant to my problem! Have you used it? is it production-ready?


Agree.


Thanks! > It's fairly straightforward to write a websocket endpoint in whatever backend you have

It indeed solves half of the problem, but managing websockets for thousands of users is not that trivial IMO


you should try phoenix channels https://hexdocs.pm/phoenix/channels.html

they scale really really easily for millions of users.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: