Added ztest.
[yaz-moved-to-github.git] / README
1
2  * Copyright (C) 1995-1997, Index Data.
3  * See the file LICENSE for details.
4  * Sebastian Hammer, Adam Dickmeiss
5
6 Compilation and installation
7
8 The primary output of the source here is the lib/libyaz.a library,
9 which contains support functions for implementing the server or client
10 role of Z39.50/SR.
11
12 Two test-programs of interest are generated when you type 'make' at
13 the top level. server/ztest and client/client. Ztest is a dummy database
14 server which returns canned responses to all queries. It's good for
15 verifying that the protocol works ok, and ztest.c shows a minimalistic
16 implementation of the 'backend' interface.
17
18 Client is a linemode Z39.50 client. It supports a fair amount of the
19 functionality of Z39.50v2/SR, but some things you need to enable or disable
20 by recompilation. Its primary purpose is to excersise the package, and
21 verify that the protocol works OK. It can be started by typing
22
23 client tcp:<hostname>:<port>
24
25 at the UNIX prompt, to connect to a Z39.50 server, or
26
27 client osi:[<tsel>'/']<hostname>:<port>
28
29 to connect to an OSI SR target (this requires mOSI-support). To connect to
30 the DANBIB test target, you might use:
31
32 client osi:0103/find2.denet.dk:4500
33
34 Use '?' to get a list of the available commands.
35
36 The current query language is a bit awkward, but functional:
37
38 query     ::= ['@attrset' <attribute-set>] rpn
39 rpn       ::= complex | simple | attr rpn
40 complex   ::= operator rpn rpn
41 operator  ::= '@and' | '@or' | '@not' | '@prox' proximity
42 simple    ::= term | set.
43 term      ::= <word> | '"' <term> ... '"'.
44 set       ::= '@set' <setname>.
45 attr      ::= '@attr' [<attribute-set>] <number> '=' <number>.
46 proximity ::= exclusion distance ordered relation which unit
47 exclusion ::= '1' | '0' | 'void'
48 distance  ::= <number>
49 ordered   ::= '1' | '0'
50 relation  ::= <number>
51 which     ::= 'known' | 'private'
52 unit      ::= <number>
53
54 Eg.:
55
56 Andersen
57
58 "Hans Andersen"
59
60 @and @attr 1=1 andersen @attr 1=4 @attr 4=2 duckling
61
62 @attrset Bib-1 @and @attr GILS 2=2008 Washington @attr 1=21 weather
63
64 The directories:
65
66 doc     - Documentation.
67
68 util    - Various little utility functions. Logging, memory debugging,
69         primitive ISO 2709 presentation for the client, etc.
70
71 odr     - Open Data Representation. This module implements the BER
72         encoding rules. Documentation is found in the files odr-use.man
73         and odr.txt.
74
75 asn     - This module implements the Z39.50/SR protocol. The best way
76         to find out how it works is to look in the sample
77         client/server code in server/seshigh.c or yazlib/tst.c. The
78         interface is still wholly described by the file proto.h
79         which defines structure and type definitions for each of the
80         types introduced in the protocol specification.
81
82 comstack- This module implements the transport transparency
83         stack (COMSTACK). The comstack implements a generic interface
84         for exchanging BER-encoded records over a network. It supports
85         the 'American' mode of exchanging the records straight over
86         TCP/IP, and uses Peter Furniss' XTIMOSI package over RFC1006.
87         Look for documentation in the file comstack.man.
88
89 rfc1006 - Xtimosi requires an implementation of the OSI transport
90         layer with an XTI-based API. Some systems (HP and DEC,
91         notably) provide this. For others, we provide an
92         implementation of the RFC1006 protocol (which is what
93         ISODE-based implementations often use). This module is not
94         neeeded if you don't use xtimosi, and it's not included in the
95         libyaz.a library.
96
97 server  - This is the implementation of the server frontend. It
98         provides event-handling and server managament functions,
99         and calls the backend primitives (best documentation of these
100         is in the file include/backend.h). See server.txt.
101
102 client  - A demonstration client. If we come upon a good design for a
103         higher level client API, that will live here.
104
105 ztest   - A demonstration server that implements a backend.
106
107 include - The various header files.
108
109 makelib - This is a simple utility that gathers the libraries from the
110         previous modules into libyaz.a.
111
112 lib     - The libraries. Primarily libyaz.a.
113
114 To get more information or assistance, send mail to yaz-help@index.ping.dk.
115
116 We maintain a mailing-list for the purpose of announcing new versions of
117 the software, bug-reports, discussion etc. You can sign up by sending
118 mail to yaz-request@index.ping.dk.