RE: XML file locking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



i seriously 2nd what Ivy has stated... 

i recently had a short situation where i was dealing with an nfs shared folder, and had to roll my own "locking" process...

also, keep in mind that if you have multiple processes accessing the targeted file, then you really need to test various situations to get a feel for how often you might run into file conflicts...



-----Original Message-----
From: Iv Ray [mailto:pobox@xxxxxxxxxxxxx]
Sent: Monday, May 19, 2008 7:45 AM
To: bruce
Cc: 'Kaja'; php-general@xxxxxxxxxxxxx
Subject: Re:  XML file locking


bruce wrote:
> Couldn't you also create a rather simple test to determine if the locking of the file takes place?

I personally do not trust file system level locks. Even if a software is 
not intended to be portable across operating systems, it is possible to 
use different file systems under the same operating system, and the 
rules might be different. Using file system level locks would require 
all possible file systems to be taken into account. And on top of that, 
the file systems are actively developed, so this is one more point to 
monitor, while maintaining the software. A less trouble free way is to 
create a file with the same name and extension ".locked" or similar, 
prior to read/write operations. Of course, this works only if the file 
is accessing only by one program, or if all programs accessing the file 
follow the same convention - but you should see that many file system 
level locks are advisory, as well.

See this -

http://en.wikipedia.org/wiki/File_locking

--

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux