Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

How would you notify services (perl modules) to start over when shared connection has been updated?

by xaka (Initiate)
on Dec 01, 2012 at 01:05 UTC ( #1006549=perlquestion: print w/ replies, xml ) Need Help??
xaka has asked for the wisdom of the Perl Monks concerning the following question:

Hi there,

Let's say you have a remote connection (host, user, pass) and a lot of services that use it (some of them sit in child processes to don't block master process). The service is a Perl module.

At some point you decide you need to change user/pass that means you need to re-establish the connection with new credentials.

What would you do with the services (especially with those ones that sit in child processes)?

How would you tell them "you need to start over"? Events? Server reboot? Which one design approach would you go with?

Comment on How would you notify services (perl modules) to start over when shared connection has been updated?
Re: How would you notify services (perl modules) to start over when shared connection has been updated?
by RichardK (Priest) on Dec 01, 2012 at 16:31 UTC

    It's common practice for unix services to re-read their config file when they get a SIGHUP signal.

    But if you don't intend to change your username/password too often then just shutting down the app and restarting it is easier.

Re: How would you notify services (perl modules) to start over when shared connection has been updated?
by CountZero (Bishop) on Dec 01, 2012 at 18:04 UTC
    Isn't that something for which signals were invented?

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics
Re: How would you notify services (perl modules) to start over when shared connection has been updated?
by Anonymous Monk on Dec 01, 2012 at 18:23 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1006549]
Approved by davido
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (23)
As of 2014-07-24 15:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (161 votes), past polls