The Sequencing Problem

The below diagram shows the basic business events workflow.

Figure 1-1 Business Events Workflow


This figure shows the basic business events workflow.

OHIP currently integrates only with OPERA Cloud and provides APIs to retrieve business events. The basic problem is that you have a stream of events that must be executed in order, for example, new reservation, update reservation, check in, and check out. The latter three activities cannot occur until the first one has completed.

Before you can sequence events, you must know the order in which the events should be processed. Therefore, you must use some sort of sequencing ID. This ID could be a timestamp or an actual sequence identifier. If you are using timestamps, the closer to the event origin that the timestamp is applied the better. For example, if you take the timestamp from when the event arrives in Oracle Integration, then a network delay may have already caused our events to be out of order.

Typically, you do not want all events to be in the same ordered sequence. In our reservation example, only events for a given reservation in a hotel must be ordered. Events for different hotel reservations in same chain as well as a different hotel chain can execute in parallel.

After you have the events and know their order, you can process them. Inherent in a re-sequencing solution is some type of delay to allow events to arrive out of order and then be sorted into order. The size of the delay specifies how much time you can accept an event to be delayed before you move forward without it.