And I wrote IPC::Lock::Memcached for it. http://search.cpan.org/~earl/IPC-Lock-0.14/lib/IPC/Lock/Memcached.pm
Earl http://blog.spack.net http://holaservers.com ________________________________ From: Dustin <[email protected]> To: memcached <[email protected]> Sent: Wednesday, April 8, 2009 10:19:42 AM Subject: Re: Distributed resource locking using memcached On Apr 8, 7:07 am, Clint Webb <[email protected]> wrote: > Its possible... but really... its a cache. Thats what it is designed to do, > and that is what it is good for. memcached is not optimized at all to be a > lock server, why exactly are you wanting to use memcached for this instead > of an actual lock server? > > That being said, there are a number of issues when using memcached as a lock > server that would make it far less than ideal. > > Also a default unlock after 5 minutes rather defeats the purpose of a lock > server... I wouldn't recommend this at all. Far better off with an actual > lock server that can defect if a client has disconnected. I wrote elockd for this. I generally want a lock released at the very moment a client disconnects (though I have a feature that will allow a lock to linger beyond a disconnect and allow sessions and all of their locks to be resumed across connections). http://github.com/dustin/elock There are many other lock servers -- all better than memcached. :)
