Event sources
Any source of index-worthy data, such as a discussion forum,
has internal activities like the addition of a discussion post.
For independent indexing to stay synchronized, the indexing engine
needs to be informed of such events, either when they occur (at
runtime) or via some regular polling for all changes occurring
within a certain polling period. For runtime events, there are
several ways to get notifications from a typical discussion forum
like Drupal:
Events generated within the target application
A discussion forum like Tomoye-Ecco
or Drupal may have an internal event system that can be manipulated
to send messages into an indexing system. Such an event system
typically provides a means to register for events, and thereby
receive callbacks when such events take place. The callbacks are
usually offered only in the native language of the forum application
(e.g., PHP for Drupal), but the callback routine may be able to
send email or messages to an external system. For example, the
Drupal workflow
module promises to act on events to produce certain behaviors,
like setting a post's editorial status based on the actions of
users of various roles. See more discussion
of Drupal hooks.
Intermediate Database Drivers
An intermediate Database Driver provides events by inserting
an additional layer between the application and the database.
The system administrator of an event source changes the driver
from, say, the oracle-provided driver to an
intermediate
driver that can filter and distribute the database load. (The
intermediate driver connects to the actual database(s) by using
the native driver(s)). Such intermediate drivers can, in turn,
be modified to send out events. This method for getting events
has the advantage of needing little information about the internals
of a given event source, but does require a good deal of analysis
of the database schema of the event source, perhaps including
the parsing of SQL. The two intermediate drivers in the links
above are both JDBC drivers, suitable for event sources written
in java.
Database triggers
Most enterprise databases support triggers--events that are generated
within the database engine. Since triggers are entirely outside
of the context of the application, the event source requires no
modification or even awareness of the events caused by triggers.
Triggers for latest (v.6.0) MySQL do not permit communication
with other processes, but there are projects
that provide this ability. This method for getting events has
pros/cons similar to the above method that uses an intermediate
database driver. Triggers have an additional benefits: triggers
react to any data change, like changes from command-line
SQL or management consoles external to the primary event source.
This page
is licensed under a Creative
Commons License.
|