multiskkserv -- simple skk multi-dictionary server
(C)Copyright 2001, 2002 by Hiroshi Takekawa <sian@big.or.jp>
Last Modified: Fri Feb  1 02:46:22 2002.
$Id: README,v 1.5 2002/01/31 17:48:42 sian Exp $

If you think my English is too bad to read, please correct.

multiskkserv is a skk server which can search multiple dictionaries.
This server uses cdb format as the dictionary format.  cdb is the
efficient and constant (i.e. cannot add, delete, modify) database
format by Dan J. Bernstein, which I think is the appropriate format
for the system-wide constant dictionary storage.

This is very experimental.  Please send me any bug reports, comments,
and so on.


1. Requirements

pthread:
 If you use libc5, install linuxthreads.
 Probably, you can get it at
 http://pauillac.inria.fr/~xleroy/linuxthreads/

cdb-0.75:
 At least, compile this package.  Installing is not required, though
 it may be useful.
 Grab http://cr.yp.to/cdb/cdb-0.75.tar.gz
 Unpack, change directory, run 'make it' to compile.
 Optionally, do 'make setup check' to install.


2. Build and install

Specify the full path of the directory where you unpacked cdb
distribution by --with-cdb.

% tar xvzf multiskkserv-2002xxxx.tar.gz
% mkdir multiskkserv.build && cd multiskkserv.build
% ../multiskkserv-2002xxxx/configure --with-cdb=/usr/src/cdb-0.75 && make
% su
# make install
# exit
% cd ..
% rm -rf multiskkserv.build

'make install' installs three binaries: multiskkserv, multiskkserv-ctl
in sbin, skkdic-p2cdb in bin.


3. Convert dictionary

skkdic-p2cdb converts plain text dictionary(such as SKK-JISYO.L) into
cdb format. Usage is simple:

% cd /usr/local/share/skk
% skkdic-p2cdb SKK-JISYO.L.cdb < SKK-JISYO.L


4. Invoke server

Server usage is also simple:

# /usr/local/sbin/multiskkserv /usr/local/share/skk/SKK-JISYO.L.cdb &

NOTE: multiskkserv won't auto-detach itself, use &. 

You can specify two or more dictionaries:

# /usr/local/sbin/multiskkserv /usr/local/share/skk/SKK-JISYO.L.cdb /usr/local/share/skk/SKK-JISYO.zipcode.cdb &

For more security, invoke as non-root, and use -r to chroot().

% /usr/local/sbin/multiskkserv -r /usr/local/share/skk SKK-JISYO.L.cdb &

You can use this server from inetd or tcpserver. Use -n. (Sorry, untested.)

inetd.conf:
skkserv stream  tcp     nowait  nobody  /usr/sbin/tcpd /usr/local/sbin/multiskkserv -n /usr/local/share/skk/SKK-JISYO.L.cdb

tcpserver:
tcpserver -v -R 0 skkserv /usr/local/sbin/multiskkserv -n /usr/local/share/skk/SKK-JISYO.L.cdb

For more options, try:

% /usr/local/sbin/multiskkserv -h


5. Statistics

Run:

% /usr/local/sbin/multiskkserv-ctl -s hostname stat

You'll get the numbers of total connections and active connections.


6. License

This software is distributed under GPL2.  See COPYING for more detail.


7. Contact

E-mail: Hiroshi Takekawa <sian@big.or.jp>


8. Acknowledgement

Thanks to Mr. Eiji Obata <obata@suzuki.kuee.kyoto-u.ac.jp>:

 He informed me that some header files are missing.  He also informed
 me that the same yomi entries from different dictionaries are not
 merged.
