Beef up documentation for multi, virt_db
[metaproxy-moved-to-github.git] / doc / virt_db.xml
1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" 
2     "http://www.oasis-open.org/docbook/xml/4.1/docbookx.dtd" [
3  <!ENTITY copyright SYSTEM "copyright.xml">
4  <!ENTITY % idcommon SYSTEM "common/common.ent">
5      %idcommon;
6 ]>
7 <refentry id="ref-virt_db">
8  <refmeta>
9   <refentrytitle>virt_db</refentrytitle>
10   <manvolnum>3mp</manvolnum>
11    <refmiscinfo>Metaproxy Module</refmiscinfo>
12 </refmeta>
13  
14  <refnamediv>
15   <refname>virt_db</refname>
16   <refpurpose>Metaproxy Virtual Databases Module</refpurpose>
17  </refnamediv>
18  
19  <refsect1><title>DESCRIPTION</title>
20   <para>
21    This filter allows one Z39.50 database to be me mapped to
22    another target; or even multiple targets.
23   </para>
24   <para>
25    The configuration of virt_db consists of zero or more 
26    <literal>&lt;virtual&gt;</literal> elements each describing the
27    Z39.50 virtual database recognized.
28    The name of the database is the text content of the
29    <literal>&lt;database&gt;</literal> element which should be
30    first element inside th virtual section.
31   </para>
32   <para>
33    Following that is one or more <literal>&lt;target&gt;</literal>
34    elements with the identifier of each target that the virtual database
35    maps to.
36   </para>
37   <para>
38    If multiple targets are given that has special meaning depending on the
39    filter following virt_db. If the following filter is load_balance, then
40    the load_balance filter will load balance between the targets given
41    (assuming they serve same content). If the following filter is multi,
42    then results will be merged from all targets instead.
43   </para>
44   <para>
45    The z3950_filter, on the other hand, does not support multiple targets.
46   </para>
47   <para>
48    For <literal>&lt;virtual&gt;</literal> a route may be given as
49    an attribute. This will make Metaproxy route traffic to the route
50    given. Note that virtual databases may not be combined if all
51    databases do not result in the same routing.
52   </para>
53  </refsect1>
54  
55  <refsect1><title>EXAMPLES</title>
56   <para>
57    Consider this virt_db configuration:
58    <screen><![CDATA[
59     <filter type="virt_db">
60       <virtual>
61         <database>db1</database>
62         <target>localhost:9999/Default</target>
63       </virtual>
64       <virtual>
65         <database>db2</database>
66         <target>indexdata.com/gils</target>
67       </virtual>
68       <virtual>
69         <database>combined</database>
70         <target>indexdata.com/gils</target>
71         <target>localhost:9999/Default</target>
72       </virtual>
73       <virtual route="special">
74         <database>db3</database>
75         <target>indexdata.com/special</target>
76       </virtual>
77     </filter>
78 ]]>
79    </screen>
80    This will offer 4 databases, <literal>db1</literal>, 
81    <literal>db2</literal>, <literal>combined</literal> and
82    <literal>db3</literal>. If a Z39.50 specifies <literal>db1</literal>
83    and <literal>db2</literal> that will have same effect as specifying
84    the single database <literal>combined</literal>.
85   </para>
86   <para>
87    Since <literal>db3</literal> routes differently from the other databases,
88    this database may not be combined with the others.
89   </para>
90  </refsect1> 
91  
92  <refsect1><title>SEE ALSO</title>
93   <para>
94    <citerefentry>
95     <refentrytitle>metaproxy</refentrytitle>
96     <manvolnum>1</manvolnum>
97    </citerefentry>
98   </para>
99   <para>
100    <citerefentry>
101     <refentrytitle>multi</refentrytitle>
102     <manvolnum>3mp</manvolnum>
103    </citerefentry>
104    <citerefentry>
105     <refentrytitle>load_balance</refentrytitle>
106     <manvolnum>3mp</manvolnum>
107    </citerefentry>
108   </para>
109  </refsect1>
110  
111  &copyright;
112 </refentry>
113
114 <!-- Keep this comment at the end of the file
115 Local variables:
116 mode: sgml
117 sgml-omittag:t
118 sgml-shorttag:t
119 sgml-minimize-attributes:nil
120 sgml-always-quote-attributes:t
121 sgml-indent-step:1
122 sgml-indent-data:t
123 sgml-parent-document:nil
124 sgml-local-catalogs: nil
125 sgml-namecase-general:t
126 End:
127 -->