A business event is a message that contains
information about an actual business event that occurred. Many business systems produce
streams of such events as things happen.
You can use streams, windows,
and delta streams with adapters to create complex projects. Streams, windows, and delta
streams allow you to consume and process input events and generate output events.
Examples of business events that are often
transmitted as streams of event messages include:
- Financial market data feeds that transmit trade and quote events, where each
event may consist of ticket symbol, price, quantity, time, and so on
- Radio Frequency Identification System (RFID) sensors that transmit events
indicating that an RFID tag was sensed nearby
- Click streams, which transmit a message (a click event) each time a user clicks
a link, button, or control on a Web site
- Database transaction events, which occur each time a record is added to a
database or updated in a database
Event Blocks
Business events can be published into an ESP model in collections called Event
Blocks, improving the performance of your ESP model. Event blocks come in two
different types: envelopes and transactions. As an event block is being processed by
a window, resulting rows are not sent downstream immediately. Instead, they are
stored until the last event of the block is processed, and the resulting events are
then sent downstream. Event blocks have the following properties:
- Envelopes:
- Each row in an envelope is treated atomically; a failure in an event
does not discard the envelope. This behavior is useful if a model's
performance is important, but not necessarily the integrity of the
data.
- Transactions:
- A transaction will be discarded if any one event in the block fails.
This behavior can be used to guarantee that logical blocks of events are
completely error-free.
- Before a transaction block is sent downstream, all events in the
transaction are compressed as much as possible. For example, an event
with an insert and then an update will compress down to a single insert
with updated values.