author | Alberto Bertogli
<albertito@gmail.com> 2007-08-26 21:56:44 UTC |
committer | Alberto Bertogli
<albertito@gmail.com> 2007-08-26 21:56:44 UTC |
parent | 61700af42cd60e1bc91a4c05f8490074876314c6 |
README | +2 | -2 |
doc/design.rst | +2 | -2 |
doc/guide.rst | +3 | -3 |
doc/network.rst | +5 | -4 |
libnmdb/libnmdb.3 | +4 | -2 |
nmdb/nmdb.1 | +14 | -3 |
diff --git a/README b/README index e6ef667..c68fab8 100644 --- a/README +++ b/README @@ -4,7 +4,7 @@ Alberto Bertogli (albertito@gmail.com) --------------------------------------------------- nmdb is a network database that can use different protocols to communicate -with its clients. At the moment, it supports TIPC, TCP and UDP. +with its clients. At the moment, it supports TIPC, TCP, UDP and SCTP. It consists of an in-memory cache, that saves (key, value) pairs, and a persistent backend that stores the pairs on disk. @@ -44,7 +44,7 @@ Requisites to enable TIPC: To compile the server and the library, you can just use "make" on the top level directory. To install them, use "make install". By default, all protocols are enabled, including TIPC. To disable any of them, run something -like "make ENABLE_TIPC=0". +like "make ENABLE_TIPC=0 ENABLE_SCTP=0". 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. diff --git a/doc/design.rst b/doc/design.rst index 105370c..ea929d0 100644 --- a/doc/design.rst +++ b/doc/design.rst @@ -21,8 +21,8 @@ Network interface ================= The server communicates with its clients using messages, which can be -delivered through TIPC_, TCP or UDP. Messages are limited by design to 64k so -they stay inside within TIPC_'s limits. +delivered through TIPC_, TCP, UDP or SCTP. Messages are limited by design to +64k so they stay inside within TIPC_'s limits. TIPC_ is completely connectionless, and uses the reliable datagram layer provided by TIPC_. The network protocol is specified in another document, and diff --git a/doc/guide.rst b/doc/guide.rst index 1100af2..ed8fe17 100644 --- a/doc/guide.rst +++ b/doc/guide.rst @@ -11,8 +11,8 @@ Introduction nmdb_ is a simple and fast cache and database for controlled networks. It allows applications in the network to use a centralized, shared cache and database in a very easy way. It stores *(key, value)* pairs, with each key -having only one associated value. At the moment, it supports the TIPC_, TCP -and UDP protocols. +having only one associated value. At the moment, it supports the TIPC_, TCP, +UDP and SCTP protocols. This document explains how to setup nmdb and a simple guide to writing clients. It also includes a "quick start" section for the anxious. @@ -88,7 +88,7 @@ TIPC setup If you want to use the server and the clients in different machines using TIPC, you need to setup your TIPC network. If you just want to run everything in one machine, you already have a TIPC network set up, or you only want to -use TCP or UDP connections, you can skip this section. +use TCP, UDP or SCTP connections, you can skip this section. Before we begin, all the machines should already be connected in an Ethernet LAN, and have the tipc-config application that should come with your Linux diff --git a/doc/network.rst b/doc/network.rst index 7df5cae..3419fbb 100644 --- a/doc/network.rst +++ b/doc/network.rst @@ -7,10 +7,11 @@ nmdb_ Network Protocol **NOTE:** All integers are in network byte order. The nmdb network protocol relies on a message passing underlying transport -protocol. It normally uses TIPC, but can use UDP, or TCP with a messaging -layer too. This document describes the protocol in a transport-independent -way, assuming the transport protocol can send and receive messages reliably -and preserve message boundaries. No ordering guarantees are required. +protocol. It can be used on top of TIPC, UDP, TCP (with a thin messaging +layer) or SCTP. This document describes the protocol in a +transport-independent way, assuming the transport protocol can send and +receive messages reliably and preserve message boundaries. No ordering +guarantees are required. Requests diff --git a/libnmdb/libnmdb.3 b/libnmdb/libnmdb.3 index 778980d..ff0776b 100644 --- a/libnmdb/libnmdb.3 +++ b/libnmdb/libnmdb.3 @@ -9,6 +9,7 @@ libnmdb - Library for interacting with a nmdb server .BI "int nmdb_add_tipc_server(nmdb_t *" db ", int " port ");" .BI "int nmdb_add_tcp_server(nmdb_t *" db ", const char * " addr ", int " port ");" .BI "int nmdb_add_udp_server(nmdb_t *" db ", const char * " addr ", int " port ");" +.BI "int nmdb_add_sctp_server(nmdb_t *" db ", const char * " addr ", int " port ");" .BI "int nmdb_free(nmdb_t *" db ");" .sp .BI "int nmdb_set(nmdb_t *" db "," @@ -62,9 +63,10 @@ You can add any number of servers, and each time a request is made, one will be selected. Be aware that you should add all the servers before start using the database. For .BR nmdb_add_tipc_server() , -.B nmdb_add_tcp_server() +.BR nmdb_add_tcp_server() , +.B nmdb_add_udp_server() and -.BR nmdb_add_udp_server() , +.BR nmdb_add_sctp_server() , if you pass -1 as the port, it will select the default one. They return 1 on success or 0 on error (or if the specified protocol was not compiled in). diff --git a/nmdb/nmdb.1 b/nmdb/nmdb.1 index c33e98b..cf6ac67 100644 --- a/nmdb/nmdb.1 +++ b/nmdb/nmdb.1 @@ -2,12 +2,16 @@ .SH NAME nmdb - A multiprotocol network database manager .SH SYNOPSYS -nmdb [-d dbpath] [-l lower] [-L upper] [-t tcpport] [-T tcpaddr] -[-u udpport] [-U udpaddr] [-c nobj] [-f] [-p] [-h] +nmdb [-d dbpath] [-l lower] [-L upper] + [-t tcpport] [-T tcpaddr] + [-u udpport] [-U udpaddr] + [-s sctpport] [-S sctpaddr] + [-c nobj] [-f] [-p] [-h] + .SH DESCRIPTION nmdb is a network database that can use different protocols to communicate -with its clients. At the moment, it supports TIPC, TCP and UDP. +with its clients. At the moment, it supports TIPC, TCP, UDP and SCTP. It can also be used as a generic caching system (pretty much like memcached), because it has a very fast cache that can be used without impacting on the @@ -59,6 +63,12 @@ UDP listening port. Defaults to 26010. .B "-U udpaddr" IP listening address for UDP. Defaults to all local addresses. .TP +.B "-s sctpport" +SCTP listening port. Defaults to 26010. +.TP +.B "-S sctpaddr" +IP listening address for SCTP. Defaults to all local addresses. +.TP .B "-c nobj" Sets the maximum number of objects the cache will held, in thousands. Note that the size of the memory used by the cache layer depends on the size of the @@ -103,6 +113,7 @@ can't bind a port twice. .B TIPC (http://tipc.sf.net), .BR qdbm (3). + .SH AUTHORS Created by Alberto Bertogli (albertito@gmail.com).