1 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.4//EN"
2 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
3 <!ENTITY copyright SYSTEM "copyright.xml">
4 <!ENTITY % idcommon SYSTEM "common/common.ent">
7 <refentry id="ref-virt_db">
9 <productname>Metaproxy</productname>
10 <info><orgname>Index Data</orgname></info>
14 <refentrytitle>virt_db</refentrytitle>
15 <manvolnum>3mp</manvolnum>
16 <refmiscinfo class="manual">Metaproxy Module</refmiscinfo>
20 <refname>virt_db</refname>
21 <refpurpose>Metaproxy Virtual Databases Module</refpurpose>
24 <refsect1><title>DESCRIPTION</title>
26 This filter allows one Z39.50 database to be me mapped to
27 another target; or even multiple targets.
30 The configuration of virt_db consists of zero or more
31 <literal><virtual></literal> elements each describing the
32 Z39.50 virtual database recognized.
33 The name of the database is the text content of the
34 <literal><database></literal> element which should be
35 first element inside the virtual section.
38 For Metaproxy 1.0.20 and later, the database is treated as a glob pattern.
39 This allows operators * (any number of any character) and
40 ? (any single character). The virtual sections are inspected in
41 the order given. The first matching virtual database is used.
44 Following that is one or more <literal><target></literal>
45 elements with the identifier of each target that the virtual database
46 maps to. If a database is given for a target (following a slash), that
47 database name is used as Z39.50 database for this target. If the
48 database is omitted for the target, the original (virtual) database
49 is used as Z39.50 database.
52 If multiple targets are given that has special meaning depending on the
53 filter following virt_db. If the following filter is load_balance, then
54 the load_balance filter will load balance between the targets given
55 (assuming they serve same content). If the following filter is multi,
56 then results will be merged from all targets instead.
59 The z3950_filter, on the other hand, does not support multiple targets.
62 For <literal><virtual></literal> a route may be given as
63 an attribute. This will make Metaproxy route traffic to the route
64 given. Note that virtual databases may not be combined if all
65 databases do not result in the same routing.
69 <refsect1><title>SCHEMA</title>
70 <literallayout><xi:include
71 xi:href="../xml/schema/filter_virt_db.rnc" xi:parse="text"
72 xmlns:xi="http://www.w3.org/2001/XInclude" />
76 <refsect1><title>EXAMPLES</title>
78 Consider this virt_db configuration:
80 <filter type="virt_db">
82 <database>db1</database>
83 <target>localhost:9999/Default</target>
86 <database>db2</database>
87 <target>indexdata.com/gils</target>
90 <database>combined</database>
91 <target>indexdata.com/gils</target>
92 <target>localhost:9999/Default</target>
94 <virtual route="special">
95 <database>db3</database>
96 <target>indexdata.com/special</target>
99 <database>*</database><!-- default -->
100 <target>localhost:9999</target><-- database not altered -->
105 This will offer 4 databases, <literal>db1</literal>,
106 <literal>db2</literal>, <literal>combined</literal> and
107 <literal>db3</literal>. If a Z39.50 specifies <literal>db1</literal>
108 and <literal>db2</literal> that will have same effect as specifying
109 the single database <literal>combined</literal>.
112 Since <literal>db3</literal> routes differently from the other databases,
113 this database may not be combined with the others.
117 <refsect1><title>SEE ALSO</title>
120 <refentrytitle>metaproxy</refentrytitle>
121 <manvolnum>1</manvolnum>
126 <refentrytitle>multi</refentrytitle>
127 <manvolnum>3mp</manvolnum>
130 <refentrytitle>load_balance</refentrytitle>
131 <manvolnum>3mp</manvolnum>
139 <!-- Keep this comment at the end of the file