X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;ds=sidebyside;f=doc%2Fmemstore.html;fp=doc%2Fmemstore.html;h=62fbbb245563a8f3dc1b4e90a06d53cf900337c7;hb=91a4befe34e15ab6c4c74901b3a16ec370c5de02;hp=0000000000000000000000000000000000000000;hpb=881e2c561c5c9de3fe4bb962da256552fa03d796;p=memstore.git diff --git a/doc/memstore.html b/doc/memstore.html new file mode 100644 index 0000000..62fbbb2 --- /dev/null +++ b/doc/memstore.html @@ -0,0 +1,55 @@ +

Memstore

+ +

A high-level interface for the memcached and membase servers

+ +

Written by Kevin M. Rosenberg kevin@rosenberg.net

+ +

Downloads

+ + + +

Prerequisites

+ +

This library incorporates a heavily modified version of cl-memcached +version 0.4.1. The primary need for the modification is to support the +flags field supported by the memcached server. The flag field is +used to store information required to deserialize the object data from +memcached. In addition to adding the flags field, the library has +been heavily refactored. For more information on the changes in +memcache, see memcache.

+ +

This library also requires Common Lisp libraries of +kmrcl, +cl-store, +flexi-streams, +and zlib.

+ +

Overview

+ +

Memstore allows efficient storing of simple objects as well as +easy storing of complex objects and optional compression.

+ +

When storing an object, if the object is a string then that is +directly written to the memcached server. For non-strings, an attempt +to made to write the object to a string with *print-readably* bound +to t. If that succeeds, then the string is converted to a vector of +octets. If that fails, the cl-store is used to serialize that object +to a vector of octets.

+ +

Next, optional compression is applied to the octets. First, the +*compression-enabled* flag is checked to see if compression is +enabled. Next, the length of the objects is compared to +*compression-threshold*. Only objects larger than +*compression-threshold* will be compressed. For objects that qualify +for compression, the size of the compressed object is compared to the +length of the uncompressed object to decide if the object is shrunk +enough to make the compression worthwhile.

+ +

The flags parameter to cl-memcached stores whether cl-store or +write-to-string is used to serialize the object and whether +compression is applied. mem-restore uses those flags to determine +how to reconstruct the object.