2. Virtual databases with the virt_db filter

Working alone, the purpose of the virt_db filter is to route search requests to one of a selection of back-end databases. In this way, a single Z39.50 endpoint (running Metaproxy) can provide access to several different underlying services, including those that would otherwise be inaccessible due to firewalls. In many useful configurations, the back-end databases are local to the Metaproxy installation, but the software does not enforce this, and any valid Z39.50 servers may be used as back-ends.

For example, a virt_db filter could be set up so that searches in the virtual database "lc" are forwarded to the Library of Congress bibliographic catalogue server, and searches in the virtual database "marc" are forwarded to the toy database of MARC records that Index Data hosts for testing purposes. A virt_db configuration to make this switch would look like this:

<filter type="virt_db">
  <virtual>
    <database>lc</database>
    <target>lx2.loc.gov:210/LCDB_MARC8</target>
  </virtual>
  <virtual>
    <database>marc</database>
    <target>indexdata.com/marc</target>
  </virtual>
</filter>

As well as being useful in it own right, this filter also provides the foundation for multi-database searching.