[zeromq-dev] ZeroMQ + InetD = Why can't we all just get along.

Pieter Hintjens ph at imatix.com
Fri Nov 9 08:43:24 CET 2012


:-) OK, not so simple, the proxy needs to read/write ZMTP. It's not
that hard but still non-trivial.

Shane, did you get the inetd configuration working? I'm trying it but
either get the hwserver running once and then not restarting ever
(with wait option), or else getting it restarting hundreds of times in
a row (with nowait option).

-Pieter

On Fri, Nov 9, 2012 at 2:46 PM, Pieter Hintjens <ph at imatix.com> wrote:
> OK, after some reading of how inetd works, I think I understand your
> question more.
>
> Inetd is a proxy that reads the TCP stream from 0MQ and turns that
> into a stdin FILE stream. You want to read that FILE stream using 0MQ
> again.
>
> Give me a few minutes and I'll whip up an example of how to do this.
> It's pretty simple IMO, you just need a reverse proxy.
>
> -Pieter
>
>
> On Fri, Nov 9, 2012 at 2:42 PM, Pieter Hintjens <ph at imatix.com> wrote:
>> On Fri, Nov 9, 2012 at 6:38 AM, Shane Spencer <shane at bogomip.com> wrote:
>>
>>>
>>>  One of my personal project goals is to spin up workers via InetD
>>>
>>> by simply connecting to them.  I understand I can use daemontools to
>>> approach this in a more structured way.
>>
>> Sounds fun and doable.
>>
>>> Once a worker spins up, in my situation, they will be immediately told
>>> initial information.  This can be done via STDIN and using standard
>>> sockets easily enough, but I'd love to simply bind to FD 0 and skip
>>> using sockets all together for that initial connection.
>>
>> So you want to use 0MQ to read from stdin? Seems overkill since it's
>> literally one fread() call.
>>
>> Not even sure why you'd use sockets for that.
>>
>> -Pieter



More information about the zeromq-dev mailing list