logoalt Hacker News

Manfredtoday at 11:11 AM1 replyview on HN

In my experience you want job parameters to be one, maybe two ids. Do you have a real world example where that is not the case?


Replies

embedding-shapetoday at 11:34 AM

I'm guessing you're with that adding indirection for what you're actually processing, in that case? So I guess the counter-case would be when you don't want/need that indirection.

If I understand what you're saying, is that you'll instead of doing:

- Create job with payload (maybe big) > Put in queue > Let worker take from queue > Done

You're suggesting:

- Create job with ID of payload (stored elsewhere) > Put in queue > Let worker take from queue, then resolve ID to the data needed for processing > Done

Is that more or less what you mean? I can definitively see use cases for both, heavily depends on the situation, but more indirection isn't always better, nor isn't big payloads always OK.

show 2 replies