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

Shane Spencer shane at bogomip.com
Fri Nov 9 17:19:28 CET 2012


Sorry.. I didn't create a proxy however.  Just reading JSON over stdin once.

On Fri, Nov 9, 2012 at 7:17 AM, Shane Spencer <shane at bogomip.com> wrote:
> Pieter.. I'd dig seeing some code.  I have a some python scripts I'm
> using as a test that I can publish later on today.  One is a server..
> and one is an inetd aware client that simply reads a bit of config
> info from stdin (yay readline) and then boots up and tells the server
> through other sockets that it is alive.
>
> On Thu, Nov 8, 2012 at 10:43 PM, Pieter Hintjens <ph at imatix.com> wrote:
>> :-) 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
>> _______________________________________________
>> zeromq-dev mailing list
>> zeromq-dev at lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev



More information about the zeromq-dev mailing list