4 ms·
It's good for really easy changefeeds. Eg in a multiplayer game scenario you might have several people touching rows in a table. Any client can construct a quer
by chillydawg 9y ago
It's good for really easy changefeeds. Eg in a multiplayer game scenario you might have several people touching rows in a table. Any client can construct a query filtering on their particular subset and trivially just say .Changes() and then get a fast, reasonably-robust changefeed with an image-then-deltas type interface. It's not particularly low latency and the latency is quite variable - so if you're timing requirements are of the millisecond order, look elsewhere.
- jasondc 9y agoDefinitely valuable, as an aside, changefeeds are now in mongodb too: https://emptysqua.re/blog/driver-features-for-mongodb-3-6/#change-streams https://emptysqua.re/blog/driver-features-for-mongodb-3-6/#c...
- traverseda 9y agoand postgres!
- Deimorz 9y agoDo you mean using LISTEN/NOTIFY, or some other method?
- williamstein 9y agoProbably LISTEN/NOTIFY. I explain in detail how I migrated from RethinkDB to PostgreSQL using LISTEN/NOTIFY + tons of additional work here http://blog.sagemath.com/2017/02/09/rethinkdb-vs-postgres.html http://blog.sagemath.com/2017/02/09/rethinkdb-vs-postgres.ht... I've continued working on this codebase, even pushing commits this week like this one: https://github.com/sagemathinc/cocalc/commit/c20a62446b6e43cd56300d6f07808c76fd2d239b https://github.com/sagemathinc/cocalc/commit/c20a62446b6e43c...
- Deimorz 9y agoHaha, I actually just finished skimming through that exact blog post because it was one of the first things that came up when I searched for "postgresql changefeed" to see if there was some other functionality for doing it that I didn't know about. I'll definitely need to go back and read it more thoroughly later and take a look through your code, thanks for the links.
- chillydawg 9y agoYou could do it with pglogical, if you're feeling particularly adventurous.
- traverseda 9y agoGames and chat are always popular examples, but I think it's really valuable for data-science. You can also "fill in" missing data. If you were writing a webscraper, you could make a service that looks for url objects without any content, and scrape them. Then make a service that looks for url objects with content but that is missing ML-filled in details, and have it fill those in. It's pretty good for disparate teams with different sets of technology. One group doing document classification, another trying NLP, another using RNNs, etc. There are a few times in my career where rethinkdb would have been a killer feature, especially with it's well-documented language bindings.