If you want to subscribe to changes in a Postgresql database, whether produced by your app or not, you can also use Hasura or PostGraphile: https://docs.hasura.io/1.0/graphql/manual/subscriptions/inde... https://www.graphile.org/postgraphile/realtime/
I tried out Postgraphile Realtime and it's pretty cool. For anyone who wants something similar that's not GraphQL, then I'm in the early stages of developing a Phoenix (Elixir) implementation which broadcasts changes over websockets: https://github.com/supabase/realtime See comments here: https://news.ycombinator.com/item?id=21354039
Rxdb: A reactive database where you can subscribe to the result of a query
51–60 of 126 posts
Re: Rxdb: A reactive database where you can subscribe to the result of a query
#52Having client state just be a replica of server state solves so many problems I don't understand why the concept never caught on. Pouchdb/couchdb are still the only ones doing it afaik. Instead we have a bajillion layers of CRUD all in slightly different protocols just to do the same read or write to the database.
Re: Rxdb: A reactive database where you can subscribe to the result of a query
#53Earlier quoted context omitted.
I tried out Postgraphile Realtime and it's pretty cool. For anyone who wants something similar that's not GraphQL, then I'm in the early stages of developing a Phoenix (Elixir) implementation which broadcasts changes over websockets: https://github.com/supabase/realtime See comments here: https://news.ycombinator.com/item?id=21354039
Neat; happy to have inspired you!
Re: Rxdb: A reactive database where you can subscribe to the result of a query
#54Earlier quoted context omitted.
When your data is public and immutable, this approach is very pleasant. The client becomes just another caching layer and worst case it's presenting a historical version of the truth. You can even extend this across tabs with things like local storage. This breaks down quickly once you have data that could become private or mutate rather than append.
In reality data can't become private again, after being available. You may try to contact all users to delete their copy, but they may not respect that.
Re: Rxdb: A reactive database where you can subscribe to the result of a query
#55Earlier quoted context omitted.
“Real-time” in JS tends to refer to approaches like websockets.
So it's not really realtime... No ? I noticed an instant downvote. It's not the first time i see this behavior on rxdb comments.
Re: Rxdb: A reactive database where you can subscribe to the result of a query
#56Having client state just be a replica of server state solves so many problems I don't understand why the concept never caught on. Pouchdb/couchdb are still the only ones doing it afaik. Instead we have a bajillion layers of CRUD all in slightly different protocols just to do the same read or write to the database.
Re: Rxdb: A reactive database where you can subscribe to the result of a query
#57I'm not sure why you would use this over something more battle-tested like RethinkDB which was also built with this use-case in mind.
Because rethinkdb development has ceased? Last release was in 2017. Is there still maintenance?
Re: Rxdb: A reactive database where you can subscribe to the result of a query
#58Having client state just be a replica of server state solves so many problems I don't understand why the concept never caught on. Pouchdb/couchdb are still the only ones doing it afaik. Instead we have a bajillion layers of CRUD all in slightly different protocols just to do the same read or write to the database.
As soon as your server state is larger than whatever your client can handle, the whole metaphor breaks down.