zlacker

[parent] [thread] 3 comments
1. hughrr+(OP)[view] [source] 2021-06-12 14:01:12
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+lI
2. Jarwai+lI[view] [source] 2021-06-12 20:47:13
>>hughrr+(OP)
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+MO >>Rapzid+681
◧◩
3. doktor+MO[view] [source] [discussion] 2021-06-12 21:52:50
>>Jarwai+lI
You might want to look at something like SWF or Temporal
◧◩
4. Rapzid+681[view] [source] [discussion] 2021-06-13 01:12:26
>>Jarwai+lI
> 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]