Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Child process inter communication

by Corion (Patriarch)
on Jun 13, 2017 at 09:04 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (2)
As of 2024-04-24 18:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found