43
Processing Business Events by W. B. Monitor

Processing Business Events -- 2008-12-15

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Processing Business Eventsby

W. B. Monitor

Prologue

The Monitor Model Editor

What should I enter here?

What are the correct selections?

At the end of this slide show, you’ll be able to explain how filters, correlation expressions,

event delivery options, and metric expressions (maps) control the processing of events in

WebSphere Business Monitor.

When will this be evaluated?

Starring ...

Event Bus

... the Business Events

?

... the Filter Guards

... the Correlating Distributors

# 174

# 174 anyone ?

... the Monitoring Context Agents

Yes !

# 174

# 196

# 201

10:15$ 56.20

12:30$ 88.00

17:45$ 19.75

SCENE 1The business events meet the filter guards

filter correlate update

SCENE 1The business events meet the filter guards

There are different kinds of events on the bus. We may not be interested in all of them. To monitor a fleet of limousines, for example, we may be interested only in events reporting facts about those cars: new trip dispatched, passenger picked up, passenger dropped off, and so on.

Hence, for each event on the bus, we’ll need to decide whether it’s we're interested in. That's what the filter guards do. Each of them recognizes one particular kind of event. When such an event arrives, it opens its gate and allows a clone of the event to enter. The original travels on, and may be admitted through other gates down the road.

filter correlate update

Event Bus

There are different kinds of events on the bus.

filter correlate update

To monitor a fleet of limousines, for example, we may be interested only in events reporting facts about those cars: new trip dispatched, passenger picked up, passenger dropped off, and so on.

Order # 324 canceled

Passenger Jones picked up at 10:30

New order for $ 3200

filter correlate update

Are you anew order

event?

For each event on the bus, we need to decide if it’s one we’re interested in. That's what the filter guards do.

filter correlate update

No !

Each filter guard recognizes one particular kind of event.

filter correlate update

Are you a passenger

pick-up event?

When such an event arrives ...

filter correlate update

Yes !

... the guard opens its gate and allows a clone of the event to enter. The original travels on and may be admitted through other gates down the road.

filter correlate update

TECHNICAL REMARK: The events are not physically copied. We show a "clone" entering through the gate to highlight the fact that the consumption of an event by one subscription does not preclude it from being consumed by other subscriptions.

filter correlate update

SCENE 1TECHNICAL SUMMARY

A monitor model defines event subscriptions. Each subscription is for a particular kind of event. The subscription defines a Boolean filter expression, which is evaluated for each event on the bus. When it evaluates to true, the event on the bus is recognized as one that the subscription is looking for.

The filter expression must be selective enough to distinguish the events being subscribed to from other kinds of events on the bus. Obviously, there is a trade-off between filter precision (in the extreme case, testing for the presence of every event field we might ever use) and filter evaluation time.

filter correlate update

SCENE 2The correlating distributors send events to the monitoring contexts

filter correlate update

SCENE 2The correlating distributors send events to the monitoring contexts

A monitoring context (MC) is an "observer object" for a monitored entity.

To monitor a fleet of limousines for example, we may create an MC for every limousine trip. All events about this trip must then be received by that MC.

After an event has been identified as one of those we’re interested in, it must be delivered to the appropriate monitoring contexts. To this end, information in the event is compared with information in each MC to determine where it should be delivered. If no MC qualifies as a target, a new one may be created to receive the event.

filter correlate update

I need to compare the event's tripID with that of each monitoring context.

After an event has been identified as one of those we’re interested in (for example, as a passenger pick-up event) it must be delivered to the appropriate monitoring contexts.

filter correlate update

For which trip is the passenger pick-up you are reporting?

174

To this end, information in the event ...

filter correlate update

174

Trip 174.

... is retrieved ...

filter correlate update

174

Passenger pick-up event

for trip 174 anyone?

# 174

# 196

# 201

... and compared with information in each existing monitoring context ...

10:15$ 56.20

12:30$ 88.00

17:45$ 19.75

filter correlate update

Yes !

# 174

# 196

# 201

... to determine where the event should be delivered.

10:15$ 56.20

12:30$ 88.00

17:45$ 19.75

filter correlate update

174

# 174

# 196

# 201

One matching MC:we need to deliver

the event to it.

10:15$ 56.20

12:30$ 88.00

17:45$ 19.75

filter correlate update

174

# 174

# 196

# 201

Please proceedto the first MC.

10:15$ 56.20

12:30$ 88.00

17:45$ 19.75

filter correlate update

174

# 174

# 196

# 201

OK.

10:15$ 56.20

12:30$ 88.00

17:45$ 19.75

filter correlate update

174

174

# 17410:15

$ 56.20

# 19612:30

$ 88.00

# 20117:45

$ 19.75

Here you are.

filter correlate update

SCENE 2TECHNICAL SUMMARY

Each monitoring context (MC) has a monitoring context definition (MCD), which among other things defines its event subscriptions.

Besides a filter expression, an event subscription has a correlation predicate and settings for zero, one, and multiple correlation matches. The predicate is evaluated for each existing instance of the MCD and typically compares key values in the event with fields containing the same values in those instances.

The evaluation results in zero, one, or multiple matches. For each case, the event subscription defines the disposition of the event: it may be delivered to the matching MCs, delivered to a newly created MC if none was matching, ignored, put aside for later retry, or treated as an error.

SCENE 3The events cause updates of the target monitoring contexts

filter correlate update

SCENE 3The events cause updates of the target monitoring contexts

The fields in a monitoring context (called metrics) are similar to the cells in a spreadsheet. Their values are determined by formulas (called maps) which can take input from incoming events and other metrics.

When an event is delivered to a monitoring context, all maps that depend on this event are run and their target metrics are updated. Next, all maps that depend on the updated metrics are run, and their targets are updated in turn, and so on until all cascading updates have been made.

filter correlate update

# 174

# 196

# 201

174

10:30

10:15$ 56.20

12:30$ 88.00

17:45$ 19.75

Pick-up time 10:30.

When an event is delivered to a monitoring context ...

filter correlate update

# 196

# 201

10:15$ 56.20

12:30$ 88.00

17:45$ 19.75

10:30# 174

Let's record that.

174

10:30

... all maps that depend on the event are run and their target metrics are updated.

filter correlate update

# 196

# 201

10:15$ 56.20

12:30$ 88.00

17:45$ 19.75

10:30# 174

–0:15

Pick-up was 15 minutes late. Let's record that as well.

Next, all maps that depend on the updated metrics are run and their targets are updated in turn, ...

filter correlate update

# 196

# 201

10:15$ 56.20

12:30$ 88.00

17:45$ 19.75

10:30# 174

–0:15

... and so on, until all cascading updates have been made.

filter correlate update

SCENE 3TECHNICAL SUMMARY

Besides event subscriptions, MCDs define metrics.

A metric is a typed slot in a monitoring context, whose value is determined by a map expression (which is similar to a spreadsheet formula). A map that depends on an event subscription is automatically run in a target monitoring context when an event is delivered to that context via the subscription. A map that only depends on metrics is run whenever any of these metrics is updated.

The dependency graph defined by all maps must not have cycles, and a map may never depend on more than one event subscription.

filter correlate update

FINALEThe story at a glance

filter correlate update

FINALEThe story at a glance

(Legend for picture that follows)

1. Many different kinds of events travel on the bus.2. Events are filtered to establish their nature, or kind.3. Events are correlated with target monitoring contexts. 4. The monitoring contexts that receive an event are updated.

filter correlate update