[zeromq-dev] Ideas for a zfork class

Goswin von Brederlow goswin-v-b at web.de
Wed Sep 3 14:16:40 CEST 2014


On Tue, Sep 02, 2014 at 05:54:47PM -0300, Rodrigo Mosconi wrote:
> On Tue, Sep 2, 2014 at 2:42 PM, Pieter Hintjens <ph at imatix.com> wrote:
> 
> > Also, Zyre now supports IPC and inproc between nodes, if you use the
> > gossip discovery feature.
> >
> > One of my goals eventually is to allow actors to start as external
> > processes, connected over IPC. However there's a non-trivial layer of
> > process control involved.
> >
> 
> That layer of process control is my target. And I agree, it`s not trivial.
> 
> 
> > So I think your idea is a good one (I don't like the name as "fork" is
> > a Unixism and doesn't really help).
> >
> 
> Ok, "zspawn"?
> 
> 
> >
> > https://github.com/savke/ztask0 may help, Martin Vala has been working
> > on this problem for a while.
> >
> 
> I looked now at ztask0, and on ztask_job_proc_exec it fork and exec a new
> program.
> I could change to create new programs, 1 for each task type and start-it
> with with a
> pre-defined "ID" on the command line. (like sendmail libexecs).
> 
> Problem against it aproach: on the master, I already load/parsed the config
> file and
> completed some parameters with random values, for example: ipc endpoint.
> This could be solved with a more deterministic parameter generation.

Why not pass the socket to connect to as argument? You can then send
any other config data when the process connects and says hello.

MfG
	Goswin



More information about the zeromq-dev mailing list