Hi!
TLDR: I would like to ask if beanstalkd might be amended to include a
feature that allows select(2) calls on sockets connected to it. If there
is interest, I would be willing to implement and propose patches.
Here's some background on what I need and why I need it:
I am experimenting/implementing a cross process communications framework
in Ruby called 'cod' [1]. The goal of this framework is to allow a
no-brainer approach to IPC.
A lot of that work involves doing things the 'old' unixy way, using
processes not threads/callbacks. So I need to be able to rely on
select(2) calls that block processes until something happens.
The current beanstalkd protocol allows me to issue reserve-with-timeout
<seconds>, but that only gets me halfway there. Two issues with that
call remain: [2]
1) Only to be able to specify 1 second min. is really too long a delay.
I would like to be able to specify at least tenths of a second, if not a
finer granularity.
2) If I select on beanstalk-connected sockets and normal tcp sockets
simultaneously, one of the normal sockets might be ready before the
timeout of reserve-with-timeout expires. The beanstalk connection then
stays locked until that timeout passes.
Implementation: I would probably explore along the lines of an 'abort'
command, that aborts a reserve-with-timeout prematurely. Not sure if
this matches the way beanstalkd is implemented, but I guess I would find
out quickly.
Interested? Welcome addition? Bad idea?
best regards,
kaspar
[1] https://github.com/kschiess/cod
[2]
https://github.com/kschiess/cod/blob/master/spec/acceptance/beanstalk_spec.rb#L121
--
You received this message because you are subscribed to the Google Groups
"beanstalk-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/beanstalk-talk?hl=en.