The stupid question is the question not asked | |
PerlMonks |
Re: Ways to sequence calls from multiple processesby Eyck (Priest) |
on Nov 29, 2004 at 06:57 UTC ( [id://410872]=note: print w/replies, xml ) | Need Help?? |
Why not use IPC - semaphores, isn't it what they were created for? (Serializing access to limited resources?).
Why hasn't anyone suggested this yet? This is a SolvedProblem(TM) in computer sciences, ...or maybe I'm missing something? OTOH, I find spool-model generally more usefull, ie - you've got dedicated process for processing incoming jobs, and your workers just drop their jobs into a spool, be it directory, sql table or shared memory segment (I would recommend IPC::ShareLite). This is the way mail servers, fax srvrs and many others work... Why is everyone soo keen on using files when there are superior methods around? When it goes to synchronising jobs between multiple machines files are not that great either, you get multiple problems with most remote filesystems... on the other hand there are remote IPC solutions available and they are created and tested specifically to work with such scenarios. I don't know if this is the case, but I usually have such feelings when interfacing with php/mysql people... they have no CS background or are unable to use it...ask the simplest questions about the basic things... and then proceed to solve them with strangest hoops... and THEN they warp the reality with their weight and make young programmers think that this is the right solution.
In Section
Seekers of Perl Wisdom
|
|