views:

141

answers:

1

I would like to know how to implement CRUD operations on common files and folders. My web site requires load balancing. The web site nodes need to CRUD files and folders in a common network location. Note: At the moment, I am dealing with file changes by locking the file in exclusive mode when writing and shared read when reading, if there are better alternatives (A separate lock file is a no-go as there are far too many files) I would like to know. Folders still work in progress

A: 

This link has a solution for a file-lock implemented using a separate file that allows for recovery from bad situations (like one server never releasing the lock)

http://mvolo.com/blogs/serverside...

Be sure to read the comments as the non-UTC implementation provided isn't ideal.

Hightechrider