Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Ways to sequence calls from multiple processes

by gaal (Parson)
on Nov 28, 2004 at 05:41 UTC ( [id://410775]=note: print w/replies, xml ) Need Help??


in reply to Ways to sequence calls from multiple processes

This is fair enough. If you want to avoid using a file lock you could have one "manager" process tell each worker when it's okay for it to use the file.
  • Comment on Re: Ways to sequence calls from multiple processes

Replies are listed 'Best First'.
Re^2: Ways to sequence calls from multiple processes
by l3nz (Friar) on Nov 28, 2004 at 08:21 UTC
    The manager approach is a viable solution, but I believe it has the additional hassles of:
  • writing a separate manager module
  • starting and stopping the separate manager module when the program runs/stops
  • detecting failures: as the manager is one more component in your system, what happens if it goes wrong? what happens if it segfaults? what happens if it does not work properly?
      Sure, it adds complexity with all that that implies. Sometimes, if the application is already large enough, there's something that is already a manager (who started the separate worker processes, for example?). In that case, the marginal costs of moving the responsibility of queueing coordination to the manager are not as high as writing it from zero. As always, YMMV.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (2)
As of 2024-04-25 20:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found