This topic is mix of showcase and brainstorming
Beanstalkz is the first Zig client for Beanstalkd -
…fast general purpose work queue. The beauty of Beanstalkd is its absolute simplicity…
Beanstalkd is supported by 67 client libraries on 21 programming languages.
In order to run background processing, you will use just 3 commands from 11 supported
- submit(put) job into the queue
- take(reserve) job from the queue for processing
- delete job from the queue
// On producer side
_ = try producer.put(1, 0, 120, "job data");
// On worker side
var job: Job = .{};
try job.init(allocator);
defer job.deinit();
try worker.reserve(10, &job);
// job.body().? - contains "job data"
// process job
// ...........
// job.id().? - contains job id
try worker.delete(job.id().?);
My question is:
Are you going to use Zig for background job processing:
- big no-no
- on producer side (my bet)
- on both sides