some google tries/histories and experiences: http://labs.google.com/papers/chubby.html
anothers interesting informations http://en.wikipedia.org/wiki/OpenVMS 2011/1/29 Roberto Spadim <[email protected]>: > hi guys, there's a high avaibility project (repcached) that is very > interesting, could we implement it in main source code? at compile > time we could select from repcached or memcached > http://repcached.sourceforge.net/ > > ======================================================================================================================= > another feature... > i was looking for a *DISTRIBUTED LOCK MANAGER*, but i only found > kernel linux lock manager, that's based on file system (flock) > could we implement a lock manager at memcached? > > what lock manager do? > client send: KEY NAME, lock type+client name (KEY VALUE), key timeout, > wait lock timeout (infinity/seconds) (this can be implement in > memcached protocol without many modifications!!!) > server side function: seek if client can have this lock (do while wait > lock timeout... this is a problem since we can have a very big wait > time... if client disconect exit do while) > yes=> change key value (give this lock to client) > yes/no=> return key value: lock type + client name (like a get > command, but with a set command before) > > ideas: > 1)maybe a separated memory size? we can run two separated servers, one > for keys another for lock system > > 2)this type of key is diferent from memcached key cache (objects) > but........ is managed with same functions... > write/delete MUST be done by LOCK function, > DELETE/UNLOCK function is a LOCK function with priority=0 > read can be done by get > > list keys can be used by today memcached protocol > > > WHY THIS FEATURE? > i didn't found a distributed lock manager for user space (not kernel > space) with easy to implement protocol, and many program languages, > and a very mature server and protocol. > > I DON'T NEED A SAMBA/NFS SERVER FOR NON FILESYSTEM LOCKING!!!!! UHUL!!!!! \o/ > I WILL NEVER USE FLOCK() AGAIN!!! \o/ !!! > > I JUST NEED=> MYSQL+MEMCACHED+APACHE+CGI/PHP/JAVA/PERL/PYTHON <= > NO MORE FILESYSTEM REPLICATIONS (DRBD, NBD+RAID) FOR MY HIGH > AVAIBILITY / CLUSTER SOLUTION!!!!! WE CAN USE REPCACHED (WE NEED A > SYNC MODE) > THINK ABOUT IT!!! > REPLICATION + FLOCK!!!!! IT'S A VERY VERY VERY NICE FEATURE!!!!! > > > type of object (1bit) default / lock manager can be putted on key > options/flags!!! > inside key value, we can put: > lock type(3 bits) > client name (a variable length, many bytes) > > http://en.wikipedia.org/wiki/Distributed_lock_manager > from wikipedia, TYPE OF LOCKS: > * Null Lock (NL). Indicates interest in the resource, but does not > prevent other processes from locking it. It has the advantage that the > resource and its lock value block are preserved, even when no > processes are locking it. > * Concurrent Read (CR). Indicates a desire to read (but not > update) the resource. It allows other processes to read or update the > resource, but prevents others from having exclusive access to it. This > is usually employed on high-level resources, in order that more > restrictive locks can be obtained on subordinate resources. > * Concurrent Write (CW). Indicates a desire to read and update the > resource. It also allows other processes to read or update the > resource, but prevents others from having exclusive access to it. This > is also usually employed on high-level resources, in order that more > restrictive locks can be obtained on subordinate resources. > * Protected Read (PR). This is the traditional share lock, which > indicates a desire to read the resource but prevents other from > updating it. Others can however also read the resource. > * Protected Write (PW). This is the traditional update lock, which > indicates a desire to read and update the resource and prevents others > from updating it. Others with Concurrent Read access can however read > the resource. > * Exclusive (EX). This is the traditional exclusive lock which > allows read and update access to the resource, and prevents others > from having any access to it. > > > > thanks guys!!! > -- > Roberto Spadim > Spadim Technology / SPAEmpresarial > -- Roberto Spadim Spadim Technology / SPAEmpresarial
