hi,
How u do syncronization between different processes ?
I'm thinking of implementing one management script which will launch different scripts depending on some conditions.
The management script can run as daemon or fire-up from time to time..
let me give one example, i call :
mgmt -addUser blah
and it fires :
1. A script which adds a user to DB
2. generate modified dhcpd.conf file
3. copy the file to other computer
4. restart the remote dhcpd server
several problems arise here, I dont want to call this sequence too fast so that it can DoS the dhcp-service.
(think of many users calling "mgmt" simultaneously)
On the other hand "mgmt" may run in deamon mode and accept queries for executing many similar sequences, so it would be better if I wait ~5sec or so before restarting the service.
Some of the functions such as adding user can be implemented as part of "mgmt" or as separate process, what I have in mind is that no matter that some part of the process is a part of "monilite" program it still has to syncronize with the others..
I also want to be a little clever say i got for 10 times every 5 sec request for restart, it will be better then to
increase this 5sec period to say 15sec..(up to X) and later when things go down fall to 5sec again.
This is simplification of cource there will be a doesen of processes that copy files between machines, alot of services involved etc...
I just need some pointers for further reading ofcource Perl oriented :"), discussion etc..
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.