From: Adam Dickmeiss Date: Mon, 14 Mar 2005 11:12:16 +0000 (+0000) Subject: All elements for YAZ GFS XML config described X-Git-Tag: YAZ.2.1.0~8 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=e232998663cbfa8e9c489d99245e530c03223571;p=yaz-moved-to-github.git All elements for YAZ GFS XML config described --- diff --git a/doc/frontend.xml b/doc/frontend.xml index 7ab9e83..2247a5f 100644 --- a/doc/frontend.xml +++ b/doc/frontend.xml @@ -1,4 +1,4 @@ - + Generic server Introduction @@ -99,6 +99,10 @@ Result-Set Sort (optional). + + Return Explain for SRW/SRU (optional). + + @@ -372,6 +376,8 @@ typedef struct bend_initrequest /* character set and language negotiation - see include/yaz/z-charneg.h */ Z_CharSetandLanguageNegotiation *charneg_request; Z_External *charneg_response; + int (*bend_srw_explain)(void *handle, bend_explain_rr *rr); + int (*bend_srw_scan)(void *handle, bend_scan_rr *rr); } bend_initrequest; typedef struct bend_initresult @@ -458,6 +464,7 @@ typedef struct { int hits; /* number of hits */ int errcode; /* 0==OK */ char *errstring; /* system error string or NULL */ + Z_OtherInformation *search_info; } bend_search_rr; @@ -715,8 +722,22 @@ typedef struct bend_scan_rr { bend_scan_status status; int errcode; char *errstring; + char *scanClause; /* CQL scan clause */ } bend_scan_rr; + + This backend server handles both Z39.50 scan + and SRW/SRU scan. In order for a + handler to distinguish between SRW/SRU (CQL) scan + Z39.50 Scan , it must check for a non-NULL value of + scanClause. + + + + if designed today, it would be a choice using a union or similar, + but that would break binary compatibility with existing servers. + + @@ -814,7 +835,7 @@ typedef struct bend_scan_rr { - Virtual hosts + Virtual Hosts &gfs-virtual; diff --git a/doc/gfs-options.xml b/doc/gfs-options.xml index 6d56637..7091155 100644 --- a/doc/gfs-options.xml +++ b/doc/gfs-options.xml @@ -1,5 +1,5 @@ @@ -61,7 +61,7 @@ A user option that serves as a specifier for some sort of configuration, usually a filename. The argument to this option is transferred to member - confignameof the + configname of the statserv_options_block. diff --git a/doc/gfs-virtual.xml b/doc/gfs-virtual.xml index d307f62..8766992 100644 --- a/doc/gfs-virtual.xml +++ b/doc/gfs-virtual.xml @@ -1,6 +1,6 @@ @@ -10,6 +10,13 @@ the TCP/IP binding (port+listening adddress) and/or the virtual host. + A backend can be configured to execute in a particular working + directory. Or the YAZ frontend may perform CQL to RPN conversion, thus + allowing traditional Z39.50 backends to be offered as a SRW/SRU + service. SRW/SRU Explain information for a particular backend may also + be specified. + + For the HTTP protocol, the virtual host is specified in the Host header. For the Z39.50 protocol, the virtual host is specified as in the Initialize Request in the OtherInfo, OID 1.2.840.10003.10.1000.81.1. @@ -33,44 +40,167 @@ The listen describes listener (transport end point), - such as TCP/IP, Unix file socket or SSL server. + such as TCP/IP, Unix file socket or SSL server. Content for + a listener: + + CDATA (required) + + + The CDATA for the listen element holds the + listener string, such as tcp:@:210, + tcp:server1:2100, + etc. + + + + attribute id (optional) + + + identifier for this listener. This may be referred to from + server sections. + + + + + + + We expect more information to be added for the listen section in + a future version, such as CERT file for SSL servers. + + - The server describes a server and includes sub - elements which servers as parameters for this server. + The server describes a server and the parameters + for this server type. Content for a server: + + attribute id (optional) + + + Identifier for this server. Currently not used for anything, + but it might be for logging purposes. + + + + + attribute listenref (optional) + + + Specifies listener for this server. If this attribute is not + given, the server is accessible from all listener. In order + for the server to be used for real, howeever, the virtual host + must match (if specified in the configuration). + + + + + element config (optional) + + + Specifies the server configuration. This is equivalent + to the config specified using command line option + -c. + + + + + element directory (optional) + + + Specifies a working directory for this backend server. If + specifid, the YAZ fronend changes current working directory + to this directory whenever a backend of this type is + started (backend handler bend_start), stopped (backend handler hand_stop) + and initialized (bend_init). + + + + + element host (optional) + + + Specifies the virtual host for this server. If this is specified + a client must specify this host string in + order to use this backend. + + + + + element cql2rpn (optional) + + + Specifies a filename that includes CQL to RPN conversion for this + backend server. See &reference-tools-cql-map; + If given, the backend server will only "see" a Type-1/RPN query. + + + + + element explain (optional) + + + Specifies SRW/SRU ZeeRex content for this server. Copied verbatim + to the client. As things are now, some of the Explain content + seeem redundant because host information, etc. is also stored + elsewhere. + + + + + - The XML below configures a server with 2 listeners and 3 backend - servers. The server listens on port 9900 and 9901 identified - with references "public9900" and "public9901". - - [More to be written] + The XML below configures a server that accepts connections from + two ports, TCP/IP port 9900 and a local UNIX file socket. + We name the TCP/IP server public and the + other server internal. + - tcp:@:9900 - tcp:@:9901 - - host1 + + tcp:@:9900 + unix:/var/tmp/socket + + server1.mydomain /var/www/s1 - zebra1.cfg + config.cfg - - host2 + + server2.mydomain /var/www/s2 - zebra2.cfg - - - /var/www/s3 - zebra3.cfg + config.cfg ../etc/pqf.properties - - explain + + + server2.mydomain + 9900 + a + + + /var/www/s3 + config.cfg + ]]> + + There are three configured backend servers. The first two + servers, "server1" and "server2", + can be reached by both listener addresses - since + no listenref attribute is specified. + In order to distinguish between the two a virtual host has + been specified for each of server in the host + elements. + + + For "server2" elements for CQL to RPN conversion + is supported and explain information has been added (a short one here + to keep the example small). + + + The third server, "server3" can only be reached + via listener "internal". + Supporting Tools @@ -1214,7 +1214,7 @@ int cql_transform_FILE(cql_transform_t ct, - Specification of CQL to RPN mapping + Specification of CQL to RPN mappings The file supplied to functions cql_transform_open_FILE, diff --git a/doc/yaz-ztest-man.xml b/doc/yaz-ztest-man.xml index 094a588..0007b2b 100644 --- a/doc/yaz-ztest-man.xml +++ b/doc/yaz-ztest-man.xml @@ -3,8 +3,9 @@ + ]> - + @@ -23,7 +24,7 @@ DESCRIPTION yaz-ztest is a Z39.50 test server that uses - the YAZ frontend server API. + the YAZ generic frontend server API. The server acts as a real Z39.50 server but does not use a database. It returns a random hit count and returns a subset of a few built-in records. @@ -48,6 +49,9 @@ OPTIONS &gfs-options; + VIRTUAL HOSTS + &gfs-virtual; + FILES yaz-<version>/ztest/yaz-ztest.c @@ -56,10 +60,7 @@ yaz-<version>/include/yaz/backend.h - VIRTUAL HOSTS - &gfs-virtual; - - SEE ALSO + SEE ALSO yaz diff --git a/doc/yaz.xml.in b/doc/yaz.xml.in index ba3712a..d5c1081 100644 --- a/doc/yaz.xml.in +++ b/doc/yaz.xml.in @@ -27,8 +27,9 @@ COMSTACK"> ZOOM"> + "> ]> - + YAZ User's Guide and Reference