General question about reacting to database events: It seems like when responding to DB events it would be easy to accidentally create an infinite loop. Is that an issue with this pattern, or is it easy to avoid? Do any of these data subscription tools have safeguards in place to prevent this?
Rxdb: A reactive database where you can subscribe to the result of a query
61–70 of 126 posts
Re: Rxdb: A reactive database where you can subscribe to the result of a query
#62General question about reacting to database events: It seems like when responding to DB events it would be easy to accidentally create an infinite loop. Is that an issue with this pattern, or is it easy to avoid? Do any of these data subscription tools have safeguards in place to prevent this?
Re: Rxdb: A reactive database where you can subscribe to the result of a query
#63Earlier quoted context omitted.
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.
That's in theory. In actual reality, if you're making an app that has private data and is not crawled by bots, most of the time users don't save everything that they see.
Re: Rxdb: A reactive database where you can subscribe to the result of a query
#64General question about reacting to database events: It seems like when responding to DB events it would be easy to accidentally create an infinite loop. Is that an issue with this pattern, or is it easy to avoid? Do any of these data subscription tools have safeguards in place to prevent this?
Isn't this the case with any interaction between 2 systems? Between a client and server, you can have logic in the client that reacts to a response from the server that triggers another request to the server.
I have certainly created infinite loops while using React's componentDidUpdate, maybe it's just important to define triggers on single attributes rather than entire database rows.
Re: Rxdb: A reactive database where you can subscribe to the result of a query
#65Earlier quoted context omitted.
Same way you scale replication for any server, by sharding and only replicating the shards you care about. The "shard" could just be that users own feed in this case. Then you get offline for free where user adds a tweet and it appears immediately, replicating back to server when he goes back online. The server replica side will need to be a lot more complicated to deal with broadcasting but I don't see why it won't…
I attempted something similar on a current project, the problem is with inital data loading. If you are hitting the URL/Page for the first time you are waiting minutes or more for non trivial data sets. Why not just load what is needed and hydrate the data over time? What about datasets where you need pagination/ordering etc. And the only way to guarantee order is to pull the whole set?
Of course, users with limited RAM and metered connections won't like that. Which is another reason why it didn't catch on.
Re: Rxdb: A reactive database where you can subscribe to the result of a query
#66Re: Rxdb: A reactive database where you can subscribe to the result of a query
#67I 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 functionali…
Re: Rxdb: A reactive database where you can subscribe to the result of a query
#68This is a nice feature for some, but not all situations..
Re: Rxdb: A reactive database where you can subscribe to the result of a query
#69Earlier quoted context omitted.
That's in theory. In actual reality, if you're making an app that has private data and is not crawled by bots, most of the time users don't save everything that they see.
I think the parent means clients (user agents), not actual human users. As soon as any state that needs to be hidden is exposed to clients, that's a security breach regardless of whether any human eyeballs have seen it.
Re: Rxdb: A reactive database where you can subscribe to the result of a query
#70I'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?
https://github.com/rethinkdb/rethinkdb/issues/6747#issuecomm...
TLDR: They are hoping to announce a revival in the near future.