-->
<!NOTATION PDF SYSTEM "PDF">
]>
-<!-- $Id: book.xml,v 1.42 2006-10-12 11:52:24 marc Exp $ -->
+<!-- $Id: book.xml,v 1.47 2007-01-08 12:27:27 marc Exp $ -->
<book id="metaproxy">
<bookinfo>
<title>Metaproxy - User's Guide and Reference</title>
<firstname>Mike</firstname><surname>Taylor</surname>
</author>
<copyright>
- <year>2006</year>
+ <year>2005-2007</year>
<holder>Index Data ApS</holder>
</copyright>
<abstract>
You may modify your copy of the software (fix bugs, add features)
if you need to. We encourage you to send your changes back to us for
integration into the master copy, but you are not obliged to do so. You
- may NOT pass your changes on to any other party.
+ may NOT pass your changes on to any other party.
</para>
</listitem>
<listitem>
packages
(<literal>frontend_net</literal>);
others are sinks: they consume packages and return a result
- (<literal>z3950_client</literal>,
- <literal>backend_test</literal>,
+ (<literal>backend_test</literal>,
<literal>bounce</literal>,
- <literal>http_file</literal>);
+ <literal>http_file</literal>,
+ <literal>z3950_client</literal>);
the others are true filters, that read, process and pass on the
packages they are fed
(<literal>auth_simple</literal>,
</section>
<section>
+ <title><literal>load_balance</literal>
+ (mp::filter::LoadBalance)</title>
+ <para>
+ Performs load balancing for incoming Z39.50 init requests.
+ It is used together with the <literal>virt_db</literal> filter,
+ but unlike the <literal>multi</literal> filter it does send an
+ entire session to only one of the virtual backends. The
+ <literal>load_balance</literal> filter is assuming that
+ all backend targets have equal content, and chooses the backend
+ with least load cost for a new session.
+ <warning>
+ <para>
+ This filter is experimental and yet not mature for heavy load
+ production sites.
+ </para>
+ </warning>
+ </para>
+ </section>
+
+ <section>
<title><literal>log</literal>
(mp::filter::Log)</title>
<para>
as multiple different logging formats.
</para>
</section>
-
+
<section>
<title><literal>multi</literal>
(mp::filter::Multi)</title>
(mp::filter::SRUtoZ3950)</title>
<para>
This filter transforms valid
- SRU/GET or SRU/SOAP requests to Z3950 requests, and wraps the
- received hit counts and XML records into suitable SRU response messages.
+ SRU GET/POST/SOAP searchRetrieve requests to Z3950 init, search,
+ and present requests, and wraps the
+ received hit counts and XML records into suitable SRU response
+ messages.
+ The <literal>sru_z3950</literal> filter processes also SRU
+ GET/POST/SOAP explain requests, returning
+ either the absolute minimum required by the standard, or a full
+ pre-defined ZeeReX explain record.
+ See the
+ <ulink url="&url.zeerex.explain;">ZeeReX Explain</ulink>
+ standard pages and the
+ <ulink url="&url.sru.explain;">SRU Explain</ulink> pages
+ for more information on the correct explain syntax.
+ SRU scan requests are not supported yet.
</para>
</section>
are passed untouched.
</para>
</section>
+
+
+ <section>
+ <title><literal>zeerex_explain</literal>
+ (mp::filter::ZeerexExplain)</title>
+ <para>
+ This filter acts as a sink for
+ Z39.50 explain requests, returning a static ZeeReX
+ Explain XML record from the config section. All other packages
+ are passed through.
+ See the
+ <ulink url="&url.zeerex.explain;">ZeeReX Explain</ulink>
+ standard pages
+ for more information on the correct explain syntax.
+ </para>
+ <warning>
+ <para>
+ This filter is not yet completed.
+ </para>
+ </warning>
+ </section>
+
+
</section>
</listitem>
</varlistentry>
<varlistentry>
- <term><literal>frontend_sru</literal> (source)</term>
- <listitem>
- <para>
- Receive SRU (and perhaps SRW) requests.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>sru2z3950</literal> (filter)</term>
- <listitem>
- <para>
- Translate SRU requests into Z39.50 requests.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
<term><literal>sru_client</literal> (sink)</term>
<listitem>
<para>
- SRU searching and retrieval.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><literal>srw_client</literal> (sink)</term>
- <listitem>
- <para>
- SRW searching and retrieval.
+ SRU/GET and SRU/SOAP searching and retrieval.
</para>
</listitem>
</varlistentry>
<para>
If Metaproxy is an interpreter providing operations on packages, then
its configuration file can be thought of as a program for that
- interpreter. Configuration is by means of a single file, the name
+ interpreter. Configuration is by means of a single XML file, the name
of which is supplied as the sole command-line argument to the
<command>metaproxy</command> program. (See
<link linkend="progref">the reference guide</link>
below for more information on invoking Metaproxy.)
</para>
- <para>
- The configuration files are written in XML. (But that's just an
- implementation detail - they could just as well have been written
- in YAML or Lisp-like S-expressions, or in a custom syntax.)
- </para>
</section>
<section id="overview.xml.structure">
<title>Overview of the config file XML structure</title>
<para>
All elements and attributes are in the namespace
- <ulink url="http://indexdata.dk/yp2/config/1"/>.
+ <ulink url="http://indexdata.com/metaproxy"/>.
This is most easily achieved by setting the default namespace on
the top-level element, as here:
</para>
<screen>
- <yp2 xmlns="http://indexdata.dk/yp2/config/1">
+ <metaproxy xmlns="http://indexdata.com/metaproxy" version="1.0">
</screen>
<para>
- The top-level element is <yp2>. This contains a
+ The top-level element is <metaproxy>. This contains a
<start> element, a <filters> element and a
<routes> element, in that order. <filters> is
optional; the other two are mandatory. All three are
client-server dialogues.
</para>
<screen><![CDATA[<?xml version="1.0"?>
-<yp2 xmlns="http://indexdata.dk/yp2/config/1">
+<metaproxy xmlns="http://indexdata.com/metaproxy" version="1.0">
<start route="start"/>
<filters>
<filter id="frontend" type="frontend_net">
<filter type="bounce"/>
</route>
</routes>
-</yp2>
+</metaproxy>
]]></screen>
<para>
It works by defining a single route, called
</virtual>
<virtual>
<database>marc</database>
- <target>indexdata.dk/marc</target>
+ <target>indexdata.com/marc</target>
</virtual>
</filter>]]></screen>
<para>
Index Data's tiny testing database of MARC records:
</para>
<screen><![CDATA[<?xml version="1.0"?>
-<yp2 xmlns="http://indexdata.dk/yp2/config/1">
+<metaproxy xmlns="http://indexdata.com/metaproxy" version="1.0">
<start route="start"/>
<routes>
<route id="start">
</virtual>
<virtual>
<database>marc</database>
- <target>indexdata.dk/marc</target>
+ <target>indexdata.com/marc</target>
</virtual>
<virtual>
<database>all</database>
<target>z3950.loc.gov:7090/voyager</target>
- <target>indexdata.dk/marc</target>
+ <target>indexdata.com/marc</target>
</virtual>
</filter>
<filter type="multi"/>
<filter type="bounce"/>
</route>
</routes>
-</yp2>]]></screen>
+</metaproxy>]]></screen>
<para>
(Using a
<literal>virt_db</literal>