Updates for release 1.1
[memstore.git] / doc / memcache.html
1 <h1>Memcache</h1>
2
3 <p><em>Library for memcached protocol</em></p>
4
5 <p>Author: Kevin Rosenberg <a href="&#109;&#x61;&#x69;l&#x74;&#x6F;:&#x6B;&#x65;&#118;&#x69;&#x6E;&#64;&#114;o&#x73;&#101;&#110;&#x62;&#101;&#114;&#x67;&#46;&#x6E;&#x65;&#116;">&#x6B;&#x65;&#118;&#x69;&#x6E;&#64;&#114;o&#x73;&#101;&#110;&#x62;&#101;&#114;&#x67;&#46;&#x6E;&#x65;&#116;</a>, based on the
6 <code>cl-memcached</code> library by Abhijit 'quasi' Rao and 
7 Chaitanya Gupta .</p>
8
9 <p>Date Started: July 1, 2011</p>
10
11 <h2>Overview</h2>
12
13 <p>This package is based on the <code>cl-memcached</code> library.  It is
14 substantially modified for use with the
15 <a href="http://memstore.b9.com">memstore</a> library. The primary areas of
16 additional functionality are:</p>
17
18 <ul>
19 <li><p>Support for flags field with get and set functions.
20 This is required as memstore stores bit flags denoting
21 how the data is serialized. That information is required
22 to deserialize the data.</p></li>
23 <li><p>Support for additional memcached functionality, such as
24 the gets command for retrieving CAS identifiers. The CAS
25 unique ID is used for the added <code>:cas</code> storage command.
26 Other storage commands newly supported are <code>:append</code> and 
27 <code>:prepend</code>.</p></li>
28 <li><p>All communication now uses <code>mc-send-command</code> function with
29 transparently supports writing strings with <code>write-byte</code>.
30 This allows <code>usocket</code> to be used on other Lisp implementations
31 besides AllegroCL. Because cl-memcached used <code>write-string</code>
32 with usocket-stream, only AllegroCL was supported.
33 By sending all data as (unsigned-byte 8), all Lisp implementions
34 supported by <code>usocket</code> are now supported with <code>memcached</code>.</p></li>
35 <li><p>Encapsulated reading and writing to socket stream to avoid
36 handling \#return characters in high-level code.</p></li>
37 <li><p>Changes to support the change in statistics fields with membase.
38 Some fields were no longer present. Also, membase 1.7 has
39 187 statistics fields versus the 20 fields supported in
40 <code>cl-memcached</code>. New function <code>mc-get-stat</code> allows to retrieving
41 any statistics field by name.</p></li>
42 <li><p>More robust <code>print-object</code> functions to avoid errors if fields
43 in statistics are not present.</p></li>
44 <li><p>Removed compatibility functions in <code>compat.lisp</code> by using the
45 <a href="http://gitpub.b9.com/kmrcl.git"><code>kmrcl</code></a> library to provide those
46 functions as well as utilitizing other <code>kmrcl</code> functions to simplify
47 code.</p></li>
48 <li><p>Added functions to support all memcached API commands,
49 such as <code>flush_all</code> and <code>version</code>.</p></li>
50 <li><p>Support for the <code>moreply</code> command argument accepted by
51 many commands.</p></li>
52 <li><p>Support the <code>noreply</code> argument that many API commands accept.</p></li>
53 <li><p>Write nearly the entire code base for improved
54 clarity, robustness, and efficiency.</p></li>
55 </ul>