Amsterdam Server

Amsterdam Server contains a Service with which one can set up data feeds, called channels. It was an early creation of what is today often called an Enterprise Service Buss.

Usage is documented in the top level project manual, the API is documented in the javadoc.

Short Overview

Background

The Amsterdam Server Service was initially created in 2001 to handle the multitude of data-feeds common in the news business. The immediate background was a frustration of all the perl- and shellscript's that was spread all over the place to handle a little data feed here and a little data-feed there. Seldom where they documented, or logged or was supervised, often no one even know they existed. Amsterdam was created to centralize the handling of such tasks, and to place them in a managed environment.

The three most important influences was from the J2EE container concept, the JBoss container architecture, and JMS as the basis for an integration architecture. From J2EE came the idea of a managed environment, from JBoss came the idea of interceptor chains and from JMS the idea of integrating data through an info/message bus where standardized XML would flow.

Info-buss

The original usage for Amsterdam was to work as an adapter between systems outside of the organization (with non XML or non standardized XML data) and the info-buss on the inside. But Amsterdam has proven itself to quite useful in a lot of other scenarios where data must be received/fetched, worked upon and then be republished.

Amsterdam Architecture

Amsterdam is based on the pluggable design pattern used in JBoss. A channel is created by wiring together components through a deployment descriptor, and the resulting channel is deployd into an Amsterdam container.

Amsterdam Container

Typical usage

Typical usages for Amsterdam is to use it to integrate with external partners, to set up SOA services in a loosely coupled JMS environment, or to setup complex chains of data-handing when pushing/publishing data to the outside.

A channel

Here is a simple example of a GET channel that fetches data from directory, transforms it and publish it to a JMS destination. Read the manual to see how a channel is deployed.

<application>
  <service>
    <name>jmsin</name>
    <content-map>
      <content-map-entry name="jmsin">
        <url>.</url>
        <mime>text/xml</mime>
        <protocol>DIR</protocol>
        <root-element></root-element>
      </content-map-entry>
    </content-map>

    <get-service-invoker className="org.backsource.amsterdam.service.GETServiceInvoker">
      <worker-queue className="org.backsource.amsterdam.service.workerqueue.ThreadPoolWorkerQueue">
        <worker-que-conf>
          <max-threads>2</max-threads>
        </worker-que-conf>
      </worker-queue>

      <protocol-factory
        className="org.backsource.amsterdam.service.protocol.DefaultProtocolFactory">
        <protocol-handler-factory
          className="org.backsource.amsterdam.plugins.file.DirProtocolHandlerFactory">
          <protocol-conf>
            <conf name="BaseUrl">${jboss.server.data.dir}/channels/simplejms/data/</conf>
          </protocol-conf>
        </protocol-handler-factory>
      </protocol-factory>

      <handler-strategy
        selector="*"
        className="org.backsource.amsterdam.service.strategy.SimpleRemoveStrategy"></handler-strategy>
      <cron>
        <cron-entry>
          <schedule-at>* * * * *</schedule-at>
          <job nameref="jmsin"/>
        </cron-entry>
      </cron>

    </get-service-invoker>
    <filters>
      <filter
        className="org.backsource.amsterdam.plugins.xml.TransformerFilter">
        <filter-conf>
          <dom-cached-stream factory="org.backsource.utils.io.DOMCachedStreamFactory">
            <param name="encoding">iso-8859-1</param>
          </dom-cached-stream>
          <resolver base="resources/test/catalog/transformer/">
          </resolver>
          <filter-map baseUrl="file:resources/test/catalog/transformer/">
            <filter-map-entry namerefs="jmsin">
              <xsl>test.xsl</xsl>
            </filter-map-entry>
          </filter-map>
        </filter-conf>
      </filter>
    </filters>
    <publisher
      className="org.backsource.amsterdam.plugins.jms.SimpleJMSPublisher">
      <jms-factory-jndi>java:/ConnectionFactory</jms-factory-jndi>
      <jms-dest-type>javax.jms.Topic</jms-dest-type>
      <jms-dest-jndi>topic/testTopic</jms-dest-jndi>
    </publisher>
  </service>
</application>