3 ms·
Rails gets background processing emphatically wrong. Rails does a lot of things right, but ActiveJob and everything built upon it (including the abuse of Redis
by ljm 7y ago
Rails gets background processing emphatically wrong.
Rails does a lot of things right, but ActiveJob and everything built upon it (including the abuse of Redis) is a travesty.
The entire concept of serialising code and re-evaluating it (which is what these libraries do) is a joke.
Your job payload should be pure data but Rails ensures that it is code.
And you should builds the workers that consume it.
- steveklabnik 7y agoThis comment would be much better if you explained why you think so, even at a high level.
- dymk 7y agoJob payloads are certainly not code; they're exposed to the developer as basically blobs of JSON, and the code lives in a "job handler" which is certainly itself not serialized.
- gwright 7y ago> Your job payload should be pure data but Rails ensures that it is code. Doesn't sound right to me. ActiveJob just serializes the arguments to the job. The job runners spins up the rails environment (i.e. the code) and deserialize the arguments before executing the job. There is no code serialization as far as I can tell.