Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Re: Writing to a file on two different servers

by belize (Deacon)
on Dec 06, 2000 at 04:07 UTC ( [id://45133]=note: print w/replies, xml ) Need Help??


in reply to Re: Writing to a file on two different servers
in thread Writing to a file on two different servers

OK, alternatively, could I read a config file from a remote server? The reason I ask is that I have program that will run on two different servers, but will use the exact same flat file for data. Instead of having to update the flat file twice, it would be best to update it once and then have both servers read the single flat file.

Replies are listed 'Best First'.
Re: Re: Re: Writing to a file on two different servers
by chipmunk (Parson) on Dec 06, 2000 at 04:24 UTC
    You'll still need some cooperation from the remote server to get the file. You could FTP it, scp it, put it on the web and get it with LWP... There are lots of different ways.

    I think what you need to consider first is when is the best time for the configuration file to be transfered; when it changes, or when the scripts run. It may make more sense to distribute the configuration file when it changes, and have the scripts just run on a local copy, so that the script doesn't have to open a remote connection everytime it runs. On the other hand, you might want to avoid changing the file on one server and forgetting to upload it to the other server.

    That decision will, of course, influence how this system is implemented.

Re: Re: Re: Writing to a file on two different servers
by davorg (Chancellor) on Dec 06, 2000 at 13:52 UTC

    If the files are supposed to be exactly the same, why not creat the file on your current server and then use FTP to copy it to the other one?

    --
    <http://www.dave.org.uk>

    "Perl makes the fun jobs fun
    and the boring jobs bearable" - me

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2024-03-29 08:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found