Earlier quoted context omitted.
Because transactional databases are perfectly fine for this type of thing when you have 0 to 100k users.
The total number of users in your system is not a performance characteristic. And transactions are generally wrong for write-heavy anything. Further, if you can just append then the transaction is meaningless.
Postgres LISTEN/NOTIFY does not scale
321–328 of 328 posts
Re: Postgres LISTEN/NOTIFY does not scale
#322Transactional databases are not really the best tool for writing tons of (presumably) immutable records. Why are you using it for this? Why not Elastic?
Because transactional databases are perfectly fine for this type of thing when you have 0 to 100k users.
Re: Postgres LISTEN/NOTIFY does not scale
#323Earlier quoted context omitted.
Back when I used Rails the sentiment was: You don't need foreign keys, this is all handled by ActiveRecord.
I’m guessing that must have been the 00s then. I haven’t seen anyone downplay database constraints for a very long time.
Re: Postgres LISTEN/NOTIFY does not scale
#324Earlier quoted context omitted.
Yes that's true but in good implementations you will want to surface to the recipient via some dashboard if delivery consistently fails. So at some point a message on the exception queue will want to update the db.
Whilst true, it probably doesn't need ACID / strong consistency. Don't get me wrong. Correctness is a great default, much easier to reason about.
Re: Postgres LISTEN/NOTIFY does not scale
#325Earlier quoted context omitted.
if you need transaction across a queue into a normal SQL DB or similar I believe you are doing something very wrong. Sure you need transaction about processing things in a queue (mark as "taken out", but not yet remove then remove or "place back in (or into a failed messages inbox)" on timeout or similar can be _very_ important for queue systems. But the moment the "fail save if something dies while processing a mess…
>But the moment the "fail save if something dies while processing a message" becomes a directly coupled with DB transactions you have created something very brittle and cumbersome. The standard workflow for processing something from a queue is to keep track of all the messages you have already processed in the transactional database and simply request the remaining unprocessed messages. Often this is as simple as sto…
Re: Postgres LISTEN/NOTIFY does not scale
#326Re: Postgres LISTEN/NOTIFY does not scale
#327Re: Postgres LISTEN/NOTIFY does not scale
#328Earlier quoted context omitted.
Ha, that's interesting :) Do you have any more details to that one?
Traveling now, but I’ll connect when I get back