Live data from Hacker News

Rxdb: A reactive database where you can subscribe to the result of a query

github.com

31–40 of 126 posts

Re: Rxdb: A reactive database where you can subscribe to the result of a query

#31
post #27

If you want a change-stream out of your regular MySQL or PostgreSQL database systems, check out Debezium: https://debezium.io/ It basically registers itself as a fake replica server so that it can get updates from the master (like binlog in case of MySQL) and then it forwards those updates to Kafka. The possibilities are endless what you can do with those updates as Kafka consumers.

There is a big difference between the changestream of many SQL and noSQL databases, and what RxDB does. Having a stream of changes is useful but not the whole solution. RxDB is capable of using single document changes of a stream and recalculate the new results of an existing query. This saves you not only much IO performance but makes developing much easier. See https://rxdb.info/query-change-detection.html

Re: Rxdb: A reactive database where you can subscribe to the result of a query

#33
post #30

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/

There is a big difference between the changestream of many SQL and noSQL databases, and what RxDB does. See https://news.ycombinator.com/item?id=21353971

Re: Rxdb: A reactive database where you can subscribe to the result of a query

#35
post #31
post #27

If you want a change-stream out of your regular MySQL or PostgreSQL database systems, check out Debezium: https://debezium.io/ It basically registers itself as a fake replica server so that it can get updates from the master (like binlog in case of MySQL) and then it forwards those updates to Kafka. The possibilities are endless what you can do with those updates as Kafka consumers.

There is a big difference between the changestream of many SQL and noSQL databases, and what RxDB does. Having a stream of changes is useful but not the whole solution. RxDB is capable of using single document changes of a stream and recalculate the new results of an existing query. This saves you not only much IO performance but makes developing much easier. See https://rxdb.info/query-change-detection.html

Sure, that's handy as an extra feature to get better performance, but I see that even in RxDB it's currently in beta and turned off by default.

I suppose this could be the killer feature to warrant using a new database -- because otherwise, from a user point of view, the result is the same.

Re: Rxdb: A reactive database where you can subscribe to the result of a query

#37
post #34

IMO JavaScript is not compatible with "realtime".

Depends on your definition of realtime. Realtime with RxDB is not like "Real-time Computing" but like realtime synchronisation how it is described by firebase https://firebase.google.com/docs/database

Re: Rxdb: A reactive database where you can subscribe to the result of a query

#38
post #30

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/

Hasura-> Besura

Re: Rxdb: A reactive database where you can subscribe to the result of a query

#39
I have been developing something that provides this functionality for PostgreSQL: https://github.com/supabase/realtime

It's still in very early stages (although I am using it in production for my company)

It's very similar to Debezium (mentioned in another comment), but it's built with Phoenix (elixir), so great for listening via websockets.

Basically the Phoenix server listens to PostgreSQL's replication functionality and converts the byte stream into JSON which it then broadcasts over websockets. This is great since you can scale the Phoenix servers without any additional load on your DB. Also it doesn't require wal2json (a Postgres extension). The beauty of listening to the replication functionality is that you can make changes to your database from anywhere - your api, directly in the DB, via a console etc - and you will still receive the changes via Phoenix.

I still have to document a lot of how it works and how to use it, but if anyone is interested then I will make it a priority over the weekend

Re: Rxdb: A reactive database where you can subscribe to the result of a query

#40
post #34

IMO JavaScript is not compatible with "realtime".

“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.

Post reply on HN