Re:RethinkDB versus PostgreSQL: my personal experience
by floatboth on Friday February 10, 2017 @01:23PM
(#13617611)
Postgres LISTEN/NOTIFY is actually very similar to Redis pubsub. You can manually add triggers to send notification on changes, sure, but the real "in the database" stuff is in RethinkDB.
Re:RethinkDB versus PostgreSQL: my personal experience
by k__ on Friday February 10, 2017 @05:51AM
(#13614523)
On the one hand, I'd say, because of decoupling.
If one feature is in Redis and one in Postgress, I can replace each of them more easily.
On the other hand, how often did someone replace Postgress in their stack?
"What's wrong with using something like Postgres LISTEN? I don't get the obsession of redis pubsub, or implementing this kind of thing outside the database. I suppose its attractive to "subscribe" to a collection for changes but the pattern can be implemented inside a database which has better tools."
In more constructive terms, databases are familiar to a lot of folks and have reliable guarantees (persistence, ACID) that are generally useful properties. If you're able to achieve the performance you need within the database, then you get a lot of operational benefits from keeping your workload running inside of it. If your workload for some reason is slow inside of a database, then it certainly makes sense to consider specialized alternatives (like Redis). In my experience, however, you can tune a database to perform better than these tools in pretty much every real-world case (i.e. moderate concurrency with realistic load).