Event-driven integration
So far you've been running the AssemblyLines as batch processes, manually starting them each time you want data to flow. We can also run AssemblyLines from the command line by invoking the Security Directory Integrator Server, like this1:ibmdisrv -c examples/Tutorial/Tutorial1.xml -r CSVtoXMLIn this way it's a simple task to use scheduling tools (for example, crontab) to schedule their operation, or to easily launch them from external applications.SDI provides a number of features for making the AssemblyLines event-aware, allowing the solutions to handle and respond to a wide variety of real-time triggers.
Examples of these triggers are:
- protocol requests coming over an IP port, like REST calls, SNMP and web services;
- new messages appearing on a queue;
- emails arriving in an Inbox;
- changes to data, for example in files, databases, directories, and Notes® databases;
- schedule or timer-based AssemblyLine operations.
This is not a complete list, and you will find both inspiration and guidance in other SDI literature, in the community websites and the newsgroups. Handling these events in the solution can be done in a number of ways:
- Connectors in Iterator Mode
- Some Connectors allow you to configure timeout parameters for Iterator Mode. One example is the FileSystem Connector, which can be set up to read through a file to the end and then wait for new information to appear - so-called 'tail read'.
Other Connectors, like those for RDBMS Change detection and LDAP Changelog, work in a similar way. These Connectors allow you to build AssemblyLines that run continuously, waiting for new changes to appear in the connected system.
There is also a Timer Connector that runs in Iterator Mode and can be configured to drive the AssemblyLine at timed intervals according to a scheduling parameter. You will be testing this one shortly.
SDI includes a Web Administration console as part of the standard installation. This browser-based application called the Administration and Monitoring Console (AMC) lets you monitor the health of the AssemblyLines, hot-load Configs to running Servers, start and stop ALs, and configure failure/response behavior to keep your integration solutions highly available. It can also be used to set up schedules for when the AssemblyLines should run. However, the Web Admin tool is beyond the scope of this Guide.
Note: The AMC feature is deprecated and will be removed in a future version of SDI.
- Connectors in Server Mode
- A few specialized Connectors, like the HTTP Server Connector and the LDAP Server Connector, allow you to build solutions that process incoming requests from external clients, perform requested actions and reply with appropriate responses. You will be using the HTTP Server Connector in the next exercise.
- Notifications and properties
- SDI has components that can subscribe to SDI notification events, just as there are components (and script calls) for sending these events – even between distinct SDI Servers running on different platforms.
This guide will take you on a closer look at AL scheduling and at Connector Server mode.
- schedule AssemblyLines
- Service request AssemblyLines
In this last exercise you will be building a web server AssemblyLine to provide a very simple user interface for launching your 'CSV2XML_LookupMode' AL; In other words, an HTTP service for initiating data transfers.
1 The SDI Server provides a usage message when invoked with no commandline arguments: ibmdisrv