X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=doc%2Ffrontend.xml;h=84bb35ac6253c7229118b6e4e9ebfec879c271d3;hb=598c8178dc444f596d5bd6111b4fed52745cad5e;hp=03ee19aed22363c793fe55620ce9f42d857cdf51;hpb=3227202c561b3189378cba8318c7610aeae1421a;p=yaz-moved-to-github.git diff --git a/doc/frontend.xml b/doc/frontend.xml index 03ee19a..84bb35a 100644 --- a/doc/frontend.xml +++ b/doc/frontend.xml @@ -1,14 +1,12 @@ - - Making an IR Server for Your Database + + Generic server Introduction If you aren't into documentation, a good way to learn how the - backend interface works is to look at the backend.h + back end interface works is to look at the backend.h file. Then, look at the small dummy-server in - ztest/ztest.c. Finally, you can have a look at - the seshigh.c file, which is where most of the - logic of the frontend server is located. The backend.h + ztest/ztest.c. The backend.h file also makes a good reference, once you've chewed your way through the prose of this file. @@ -34,18 +32,18 @@ The backend interface was designed in anticipation of a specific integration task, while still attempting to achieve some degree of - generality. We realise fully that there are points where the + generality. We realize fully that there are points where the interface can be improved significantly. If you have specific functions or parameters that you think could be useful, send us a mail (or better, sign on to the mailing list referred to in the - toplevel README file). We will try to fit good suggestions into future + top-level README file). We will try to fit good suggestions into future releases, to the extent that it can be done without requiring too many structural changes in existing applications. - The Database Frontend + The Database Frontend We refer to this software as a generic database frontend. Your @@ -102,22 +100,22 @@ - The Backend API + The Backend API - The headers files that you need to use the interface are in the - include/yaz directory. They are called - statserv.h and backend.h. They - will include other files from the include/yaz - directory, so you'll probably want to use the -I option of your - compiler to tell it where to find the files. When you run - make in the toplevel &yaz; directory, - everything you need to create your server is put the - lib/libyaz.a library. + The header file that you need to use the interface are in the + include/yaz directory. It's called + backend.h. It will include other files from + the include/yaz directory, so you'll + probably want to use the -I option of your compiler to tell it + where to find the files. When you run + make in the top-level &yaz; directory, + everything you need to create your server is to link with the + lib/libyaz.la library. - Your main() Routine + Your main() Routine As mentioned, your main() routine can be quite brief. @@ -219,8 +217,8 @@ statserv_options_block *statserv_getcontrol(void); enum oid_proto default_proto; - Either PROTO_SR or - PROTO_Z3950. + Either PROTO_Z3950 or + PROTO_SR. Default is PROTO_Z39_50. @@ -269,7 +267,7 @@ statserv_options_block *statserv_getcontrol(void); void (*bend_stop)(struct statserv_options_block *p) - Pointer to function which is called whenver the server + Pointer to function which is called whenever the server has stopped listening for incoming connections. This function pointer has a default value of NULL in which case it isn't called. When the server operates as an NT service this handler is called @@ -304,7 +302,7 @@ void statserv_setcontrol(statserv_options_block *block); - The Backend Functions + The Backend Functions For each service of the protocol, the backend interface declares one or @@ -412,7 +410,7 @@ typedef struct bend_initresult Search and retrieve We now describe the handlers that are required to support search - - and retrieve. You must support two functions - one for seearch - and one + and retrieve. You must support two functions - one for search - and one for fetch (retrieval of one record). If desirable you can provide a third handler which is called when a present request is received which allows you to optimize retrieval of multiple-records. @@ -604,7 +602,7 @@ typedef struct { Delete - For backends that supports delete of a result set only one handler + For back-ends that supports delete of a result set only one handler must be defined. @@ -672,7 +670,7 @@ typedef struct bend_scan_rr { - Application Invocation + Application Invocation The finished application has the following @@ -778,11 +776,11 @@ typedef struct bend_scan_rr { A listener specification consists of a transport mode followed by a colon (:) followed by a listener address. The transport mode is - either osi or tcp. + either tcp or ssl. - For TCP, an address has the form + For TCP and SSL, an address has the form @@ -794,46 +792,19 @@ typedef struct bend_scan_rr { - For osi, the address form is - - - - [t-selector /] hostname | IP-number [: portnumber] - - - - The transport selector is given as a string of hex digits (with an even - number of digits). The default port number is 102 (RFC1006 port). - - - Examples tcp:dranet.dra.com - osi:0402/dbserver.osiworld.com:3000 + ssl:ssl.enterprise.com:3000 In both cases, the special hostname "@" is mapped to the address INADDR_ANY, which causes the server to listen on any local - interface. To start the server listening on the registered ports for - Z39.50 and SR over OSI/RFC1006, and to drop root privileges once the - ports are bound, execute the server like this (from a root shell): - - - - my-server -u daemon tcp:@ -s osi:@ - - - - You can replace daemon with another user, eg. your - own account, or a dedicated IR server account. - my-server should be the name of your - server application. You can test the procedure with the - yaz-ztest application. + interface. @@ -849,7 +820,7 @@ typedef struct bend_scan_rr { sgml-indent-step:1 sgml-indent-data:t sgml-parent-document: "yaz.xml" - sgml-local-catalogs: "../../docbook/docbook.cat" + sgml-local-catalogs: nil sgml-namecase-general:t End: -->