zlacker

[parent] [thread] 9 comments
1. hughrr+(OP)[view] [source] 2021-06-12 10:58:02
Contention, architectural separation, you have to build your own monitoring stack, not transactional with concerns outside the database without introducing distributed transactions and risk, no routing or distribution capability, you have to build it yourself, point in time message durability is somewhat dubious depending on your acknowledgement process which of course you had to invent yourself as well.

Not to mention numerous database administrators crying into their cups of coffee.

Enough?

Like I said 20 years of people fucking this up is my experience.

replies(2): >>flefto+N >>deskam+19
2. flefto+N[view] [source] 2021-06-12 11:06:14
>>hughrr+(OP)
Meh. All your objections are hand wavey and not factual.

Databases actually work fine as a queue but emotionally you don’t like it. That’s fine it’s just not real strong objections.

What you have not said is “it physically does not work”, and that’s because it does work fine.

replies(3): >>hughrr+j1 >>philda+K1 >>rmetzl+i6
◧◩
3. hughrr+j1[view] [source] [discussion] 2021-06-12 11:13:13
>>flefto+N
I’m not saying it doesn’t work. I’m saying you’re shooting your toes off down the line.
◧◩
4. philda+K1[view] [source] [discussion] 2021-06-12 11:19:13
>>flefto+N
I don't think he's saying 'it cannot be physically made to work (given enough effort and discipline)'. The impression I got was more like 'if you go down this route then the incremental path of least resistance leads somewhere bad'.
◧◩
5. rmetzl+i6[view] [source] [discussion] 2021-06-12 12:16:51
>>flefto+N
The range where databases work fine is pretty small. Sudden spikes in job creation will kill the performance of the database. Often enough the job creations come from external systems you can't control.
6. deskam+19[view] [source] 2021-06-12 12:50:06
>>hughrr+(OP)
> you have to build your own monitoring stack,

How is this done in Redis automatically? At some point you are writing queries (albeit Redis ones) to pull metrics. Other queueing systems may expose an API but there is always some level of integration. With Postgres/other db I would write SQL which is their API and a powerful one at that.

I can couple events with triggers to auto-generate other events etc, have built in audit capability, roll up reporting etc, all with standard SQL. (all in the context of monitoring and reporting)

replies(1): >>hughrr+zg
◧◩
7. hughrr+zg[view] [source] [discussion] 2021-06-12 14:01:12
>>deskam+19
Um, I'm not suggesting using Redis. In actual fact I said elsewhere I wouldn't use Redis for queues.

As for triggers, reporting, audit, I'm laughing now because you miss the point. That's another bunch of IO in your monolithic black box, and you're still building it.

Start here: https://www.rabbitmq.com/prometheus.html

replies(1): >>Jarwai+UY
◧◩◪
8. Jarwai+UY[view] [source] [discussion] 2021-06-12 20:47:13
>>hughrr+zg
Currently at work we use a postgresdb for queues for long-running persistent jobs, but I'd like to move away from that model since I have doubts about how it'll scale.

I've thought about using rabbit mq, but have a few questions: - it appears that when a job is consumed, it's gone. How would I maintain a record of the jobs & status of the job in rabbitmq? If I wanted to display job updates how would I handle that? I didn't think you could update a message once it's already in the queue

Or am I missing the mark? Do I want to separate the business entity "job" that maintains a status and updates and such from the "thing that dispatches jobs to workers"? And when a worker Has the job it just updates the business entity in the database?

replies(2): >>doktor+l51 >>Rapzid+Fo1
◧◩◪◨
9. doktor+l51[view] [source] [discussion] 2021-06-12 21:52:50
>>Jarwai+UY
You might want to look at something like SWF or Temporal
◧◩◪◨
10. Rapzid+Fo1[view] [source] [discussion] 2021-06-13 01:12:26
>>Jarwai+UY
> Do I want to separate the business entity "job" that maintains a status and updates and such from the "thing that dispatches jobs to workers"? And when a worker Has the job it just updates the business entity in the database?

If you ever really need to that's one way to do it but consider I'm imagining 50-100k state updates per second as being reasonable depending on how the data and queries are laid out. You can always use NOTIFY as discussed to cut down on the amount of worker queries for new work before having to completely push signaling to a separate system(which would likely still require occasional polling and/or a background process to re-signal work that hasn't been picked up).

It's interesting to consider that AWS Step Functions charges(or did charge) by the state transition.

[go to top]