git » nmdb » commit b55affe

Minor documentation updates

author Alberto Bertogli
2010-04-17 21:53:21 UTC
committer Alberto Bertogli
2010-04-17 22:12:02 UTC
parent 2df81c3beafda57ec3cd5dfb3812a7d7549973f2

Minor documentation updates

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>

INSTALL +9 -7
doc/design.rst +7 -6
doc/guide.rst +12 -11
nmdb/nmdb.1 +8 -5

diff --git a/INSTALL b/INSTALL
index 839a6b4..0f7d4e0 100644
--- a/INSTALL
+++ b/INSTALL
@@ -51,13 +51,6 @@ For instance, to build with bdb backend and without TIPC support, use:
  $ make BE_ENABLE_BDB=1 ENABLE_TIPC=0
 
 
-Tests
------
-
-To run some tests, start the server and then go to the "tests/c/" directory.
-Run "make.sh build" and then run any of the generated tests.
-
-
 Bindings
 --------
 
@@ -70,3 +63,12 @@ The other bindings do not have a properly defined install procedure, and
 you'll need knowledge of the language to install them.
 
 
+Tests
+-----
+
+Tests are available in the "tests/" directory. Some are written in C
+("tests/c/"), some in Python ("tests/python/").
+
+Python tests are useful for stress and coverage tests, while the C ones are
+useful for performance measurements.
+
diff --git a/doc/design.rst b/doc/design.rst
index 4470fec..bb8e467 100644
--- a/doc/design.rst
+++ b/doc/design.rst
@@ -123,8 +123,8 @@ operation. A specific solution could have been used, and the database backend
 code is isolated enough to allow this to happen in the future if necessity
 arises.
 
-Several backends are supported (at the moment QDBM_, BDB_, tokyocabinet_ and a
-null backend); the selection is done at build time.
+Several backends are supported (at the moment QDBM_, BDB_, tokyocabinet_, tdb_
+and a null backend); the selection is done at build time.
 
 The processing is performed by taking requests from the aforementioned queue,
 and acting upon the database accordingly, which involves calling the backend's
@@ -163,13 +163,13 @@ The cache layer is implemented by a modified hash table, to make eviction
 efficient and cheap.
 
 The hash table is quite normal: several buckets (the size is decided at
-initialization time), and each bucket containing a linked list with the
-objects assigned to it.
+initialization time), and each bucket containing a list with the objects
+assigned to it.
 
 There a some tricks, though:
 
 - In order to keep a bound on the number of objects in the cache, the number
-  of elements in each linked list is limited to 4.
+  of elements in each list is limited to 4.
 - Whenever a lookup is made, the entry that matched is promoted to the head of
   the list containing it.
 - When inserting a new element in the cache, it's always inserted to the top
@@ -204,5 +204,6 @@ pattern involves handling lots of different keys.
 .. _memcached: http://www.danga.com/memcached/
 .. _QDBM: http://qdbm.sf.net
 .. _BDB: http://www.oracle.com/technology/products/berkeley-db/db/
-.. _tokyocabinet: http://tokyocabinet.sf.net/index.html
+.. _tokyocabinet: http://1978th.net/tokyocabinet/
+.. _tdb: http://tdb.samba.org
 
diff --git a/doc/guide.rst b/doc/guide.rst
index 3d94cfd..5af4056 100644
--- a/doc/guide.rst
+++ b/doc/guide.rst
@@ -31,11 +31,9 @@ Prerequisites
 Before you install nmdb, you will need the following software:
 
 - libevent_, a library for fast event handling.
-- Either QDBM_, BDB_ or tokyocabinet_ for the database backend.
-
-And, if you're going to use TIPC_:
-
-- `Linux kernel`_ 2.6.16 or newer, compiled with TIPC_ support.
+- One or more of QDBM_, BDB_, tokyocabinet_ or tdb_ for the database backend.
+- If you want TIPC_ support, `Linux kernel`_ 2.6.16 or newer.
+- If you want SCTP_ support, libsctp-dev (or equivalent package).
 
 
 Compiling and installing
@@ -49,8 +47,9 @@ To install the server and the C library, run ``make install; ldconfig``. To
 install the Python module, run ``make python_install`` after installing the C
 library.
 
-If you want to disable support for some protocol (i.e. TIPC), you can do so by
-running ``make ENABLE_TIPC=0 install``.
+The build system autodetects the available backends and protocols, but if you
+want to manually override it, you can you can do so by running, for example,
+``make ENABLE_TIPC=0 BE_ENABLE_BDB=1 install`` to disable TIPC and enable BDB.
 
 
 Quick start
@@ -141,8 +140,8 @@ Cache size
   in it, and not by byte size.
 
 Backend database
-  The backend database engine can be selected at build time; QDBM_ is the
-  default.
+  The backend database engine can be selected at run time via a command-line
+  option.
 
   If for some reason (hardware failure, for instance) the database becomes
   corrupt, you should use your database utilities to fix it. It shouldn't
@@ -259,7 +258,7 @@ the default port.
 
 
 The Python module
-------------------
+-----------------
 
 The Python module it's quite easy to use, because its interface is very
 similar to a dictionary. It has similar limitations regarding the key (it must
@@ -416,11 +415,13 @@ know at albertito@blitiri.com.ar.
 .. _nmdb: http://blitiri.com.ar/p/nmdb/
 .. _libevent: http://www.monkey.org/~provos/libevent/
 .. _TIPC: http://tipc.sf.net
+.. _SCTP: http://en.wikipedia.org/wiki/Stream_Control_Transmission_Protocol
 .. _memcached: http://www.danga.com/memcached/
 .. _`Linux kernel`: http://kernel.org
 .. _tetrations: http://en.wikipedia.org/wiki/Tetration
 .. _QDBM: http://qdbm.sf.net
 .. _BDB: http://www.oracle.com/technology/products/berkeley-db/db/
-.. _tokyocabinet: http://tokyocabinet.sf.net/index.html
+.. _tokyocabinet: http://1978th.net/tokyocabinet/
+.. _tdb: http://tdb.samba.org
 
 
diff --git a/nmdb/nmdb.1 b/nmdb/nmdb.1
index dffe48e..31c061d 100644
--- a/nmdb/nmdb.1
+++ b/nmdb/nmdb.1
@@ -2,7 +2,8 @@
 .SH NAME
 nmdb - A multiprotocol network database manager
 .SH SYNOPSIS
-nmdb [-d dbpath] [-l lower] [-L upper]
+nmdb [-b backend] [-d dbpath]
+  [-l lower] [-L upper]
   [-t tcpport] [-T tcpaddr]
   [-u udpport] [-U udpaddr]
   [-s sctpport] [-S sctpaddr]
@@ -27,6 +28,11 @@ For additional documentation, go to the project's website at
 
 .SH OPTIONS
 .TP
+.B "-b backend"
+Which database library to use as backend. It can be one of tdb, tc, qdbm, bdb,
+or null, although not all of them may be available, depending on build-time
+options. On doubt, use the default.
+.TP
 .B "-d dbpath"
 Indicate the path to the database file to use. It will be created if it
 doesn't exist. If a name is not provided, "database" will be used.
@@ -99,10 +105,7 @@ clients. This behaviour is different from the normal IP networking, where you
 can't bind a port twice.
 
 .SH SEE ALSO
-.BR libnmdb (3),
-.B TIPC
-(http://tipc.sf.net),
-.BR qdbm (3).
+.BR libnmdb (3).
 
 .SH AUTHORS
 Created by Alberto Bertogli (albertito@blitiri.com.ar).