-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
30 lines (23 loc) · 1 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
A generic guard process (to be implemented as a daemon) that client processes
can interact with to gain locked access to keys primarily for updating values in
key value storage systems like memcached.
Protocol is straightforward at the moment. All messages are CRLF terminated.
===============
Client commands
===============
'LOCK <key>\r\n'
If the key is not locked already, daemon replies back with 'LOCKED <key>\r\n'.
Otherwise if the same client has locked the key, reply is
'LOCK_ALREADY_ACQUIRED\r\n' and if some other client has locked the key, reply
is 'LOCK_EXISTS\r\n'.
'UNLOCK <key>\r\n'
If the key is locked, daemon replies back with 'UNLOCKED <key>\r\n'. If this is
applied on a key not locked, reply is 'LOCK_NEVER_ACQUIRED\r\n'.
'QUIT\r\n'
If the client is already holding a lock to a key and hasn't unlocked it, the
reply is 'LOCK_NOT_RELEASED' else the reply sent back is 'QUIT\r\n' as well
and the connection is closed
============
Dependencies
============
eventlet (Get it using easy_install or pip)