some questions about AnyEvent::Fork

Dietmar Maurer dietmar at proxmox.com
Fri Apr 19 11:02:39 CEST 2013


> You could save on the number of template processes by, for example, arranging
> for your master to have one template, and fork tasks from it. That will
> complicate things as you have to communicate from the workers to your
> master.  I might think about a way how to pass AnyEvent::Fork objects over a
> socket somehow, which make that easier.
> 
> In any cace, these are roughly your alternatives:
> 
> - use normal fork, and somehow deal with the fallout, by e..g not using
>   AnyEvent in the workers, or not using AnyEvent in the tasks (and neither
>   IO::AIO and so on).
> - use new_exec, higher startup time, but no extra processes, but you
>   have to serialise things (AnyEvent::Fork::RPC can help).
> - use template processes somehow.

I just want that my master listens for fork requests. I know it is save to fork there, so
why should I waste resources by creating a template?

Also, both workers and tasks should connect to the master for new fork requests.

Why do you thing that is a problem to implement?




More information about the anyevent mailing list