Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: Child process inter communication

by Corion (Patriarch)
on Jun 13, 2017 at 09:04 UTC ( #1192679=note: print w/replies, xml ) Need Help??

in reply to Child process inter communication

What do you mean by "select such PID"?

Are you asking about a good algorithm to do load scheduling? Or do you want to know how to pass information from your master process to child process XX?

Personally, I would look into queues, and invert the problem. Have the master post jobs into the queue and the workers take jobs from that queue. That way ou don't have idle workers.

Such a setup can range from directories into which jobs are placed and moved via rename by the clients to various Queues. Depending on your needs about the queues (persistence, deliver at most once, deliver at least once), you could use Forks::Queue or Thread::Queue or Queue::DBI or IPC::DirQueue, or ZMQ or MQSeries::Queue.

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1192679]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2023-09-26 18:09 GMT
Find Nodes?
    Voting Booth?

    No recent polls found