I don't really think you can, unless the partition/folder is
shared across the network. Is there any way you could share
the file on an NFS partition or the windows equivelent?
Scott
Update: So you asked essentially the same question here:
UNCs. Why were those answers not acceptable. If
you are on windows, $code or die's answer should be enough.
If you are on unix, I suspect my answer is it. | [reply] |
Well, it would be nice if it were simple. =/
However, to my knowledge, there is no way to just modify your open()s to work like this.
In order to get that file, you'll need to transfer it over the network through standard methods.
The options that come immediately to mind are ftp or cvs (cvs would be my choice in this case).
There are modules to help you with either one. Both cases would require you to get the file, modify it, and send back the new version.
Keep in mind with using ftp, you may very well need to implement locking of some sort to keep the files in sync.
But this is a quick-fix type solution. A brute method.
IMO, this doesn't seem to be a situation in which load balancing is ideal. Perhaps it should be considered that only one of these servers be used to host the data file.
In my experience, it has been more trouble than it's worth to keep mirrors of constantly changing data on seperate servers.
Well anyway, sorry if this isn't what you were looking to hear. </my two cents> | [reply] |
I am sorry to say it, but I think that you are going down
the wrong path here.
First of all, you have the usual problems with maintaining
flatfiles. Next you need to access files on the correct
machine. Then you need to handle locking, (which few
people get wrong). Then you need to maintain
this as it grows.
It is a big pill to swallow, but personally I
think it would be a mistake to go farther down this
path. Instead I would suggest rewriting the whole thing
to use a relational database. | [reply] |
Hmmmm, module idea ... could one not write a module which overloads open(), and checks the string for ftp://, http://, etc ... and use sub-modules to invoke LWP, Net::FTP, etc ... ? If this was done, and the file name did not being with one of these known strings, the module could use the built-in open. That would make a new 'drop-in' solution. I will write the module, but does anyone think it will be usefull ?
can't sleep clowns will eat me
-- MZSanford
| [reply] [d/l] [select] |
Yea, that seems like a good idea.
The only catch, as I briefly stated above, is that you
would (in a lot of cases) also need a modified flock()
| [reply] [d/l] |