There is a long outstanding need for a better file locking mechanism, especially when multiple Mules are grazing off the same shared directory. Need to investigate use cases and ways to solve the problem without using the file system, since distributed file systems often have relaxed consistency and/or don't work cross-platform etc.
Description
There is a long outstanding need for a better file locking mechanism, especially when multiple Mules are grazing off the same shared directory. Need to investigate use cases and ways to solve the problem without using the file system, since distributed file systems often have relaxed consistency and/or don't work cross-platform etc.
Progress note:
My initial experiment with JGroups' DistributedLockManager is going well - a simple example that I modified works fine across multiple machines (until running several instances on each of my four computers got out of hand ), even in the face of random VM death which will properly release a lock until it is reacquired by another machine. While XML configuration and integration with the existing FileConnector is still a bit unclear, it should be easy enough to make the DLM optional and/or replace it with a VM-local dummy by default.
The best thing is that JGroups has a very light footprint (a single jar) and works cross-VM (but most likely not cross-machine) without configuration, so it may even be useful to simply use it always; we'll see.
Holger Hoffstaette added a comment - 25/Sep/07 09:48 AM Progress note:
My initial experiment with JGroups' DistributedLockManager is going well - a simple example that I modified works fine across multiple machines (until running several instances on each of my four computers got out of hand ), even in the face of random VM death which will properly release a lock until it is reacquired by another machine. While XML configuration and integration with the existing FileConnector is still a bit unclear, it should be easy enough to make the DLM optional and/or replace it with a VM-local dummy by default.
The best thing is that JGroups has a very light footprint (a single jar) and works cross-VM (but most likely not cross-machine) without configuration, so it may even be useful to simply use it always; we'll see.
My initial experiment with JGroups' DistributedLockManager is going well - a simple example that I modified works fine across multiple machines (until running several instances on each of my four computers got out of hand
The best thing is that JGroups has a very light footprint (a single jar) and works cross-VM (but most likely not cross-machine) without configuration, so it may even be useful to simply use it always; we'll see.