event processing course producers and consumers (relates to chapters 4 + 5)

32
Event Processing Course Producers and consumers (relates to chapters 4 + 5)

Post on 22-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Event Processing Course

Producers and consumers(relates to chapters 4 + 5)

2Copyright ©2009 Opher EtzionCopyright ©2009 Opher Etzion

Lecture outline

• Event producer – concept and definition element

• Event consumer – concept and definition element

• Type of event producers

• Type of event consumers

• Event consumers and producers in the Fast Flower Delivery example

3Copyright ©2009 Opher EtzionCopyright ©2009 Opher Etzion

Event Producer

Building Block describingevent Producer Icon:

Event Producer Category

Definition Element Type

Event Producer Identifier

Annotation

Query Capability

Event TypesTargets

Output Terminals:

Producer Details:

Relationship to other producers

Generalization / Specialization

4Copyright ©2009 Opher EtzionCopyright ©2009 Opher Etzion

Output terminals

ProducerChannel

Event types: A collection of event type identifiers showing the types of events that can be emitted through this output terminal. An output terminal can have one or more event types associated with it. This association is not exclusive (an event producer can have the same event type associated with multiple output terminals)

Targets: The identifier of the channel or other EPN which serves as a sink of the output terminal. Each output terminal can have zero or more targets.

5Copyright ©2009 Opher EtzionCopyright ©2009 Opher Etzion

Producers types

Hardware Human interaction Software

Physical SensorsEmbedded SensorsDetectorsCameras, Microphones

Simulated SensorsApplicationsInstrumentationAdaptorsData Feeds

Application programsVerification and paymentLocation and PresenceSocial communicationsSurveillance

Sensing producers

Reporting producers

Push

Pull / queriable

6Copyright ©2009 Opher EtzionCopyright ©2009 Opher Etzion

Producer – State Observer in workflows

State observerPush:

Instrumentation points;

Pull:

Query the state

7Copyright ©2009 Opher EtzionCopyright ©2009 Opher Etzion

Producer – active database

Database

insert

modify

delete

Retrieve

transaction

before

after

8Copyright ©2009 Opher EtzionCopyright ©2009 Opher Etzion

Producer – Code instrumentation

9Copyright ©2009 Opher EtzionCopyright ©2009 Opher Etzion

Producer – syndication

10Copyright ©2009 Opher EtzionCopyright ©2009 Opher Etzion

Producer – sensors

11Copyright ©2009 Opher EtzionCopyright ©2009 Opher Etzion

Producers – streams to events

12Copyright ©2009 Opher EtzionCopyright ©2009 Opher Etzion

Producers – meters

13Copyright ©2009 Opher EtzionCopyright ©2009 Opher Etzion

Producer – monitors

14Copyright ©2009 Opher EtzionCopyright ©2009 Opher Etzion

Producer – simulators

15Copyright ©2009 Opher EtzionCopyright ©2009 Opher Etzion

Event Consumer

Building Block describingevent consumer Icon:

Event Consumer Category

Definition Element Type

Event Consumer Identifier

AnnotationEvent TypesFiltersSources

Input Terminals:

Consumer Details:

Relationship to other consumers

Generalization / Specialization

16Copyright ©2009 Opher EtzionCopyright ©2009 Opher Etzion

Input terminals

ConsumerChannel

Event types: A collection of event type identifiers showing the types of events that can be accepted by this input terminal. An input terminal can have one or more event types associated with it.

Sources: Identifiers of channels or other EPN entities which can send events to the input terminal. Each input terminal can have zero or more sources.

17Copyright ©2009 Opher EtzionCopyright ©2009 Opher Etzion

Event consumers types

Hardware Human interaction Software

Physical ActuatorsIndustrial controlLighting systemsHVAC Home automation

Event LogsBusiness applicationsBusiness ProcessesState Machines

Alarm systemseMail, SMS, telephonyComputer User InterfacesNews feedsSocial Networking

18Copyright ©2009 Opher EtzionCopyright ©2009 Opher Etzion

Performance monitoring dashboard

19Copyright ©2009 Opher EtzionCopyright ©2009 Opher Etzion

Additional dashboard

20Copyright ©2009 Opher EtzionCopyright ©2009 Opher Etzion

Ambient Orb

21Copyright ©2009 Opher EtzionCopyright ©2009 Opher Etzion

Sixth sense

22Copyright ©2009 Opher EtzionCopyright ©2009 Opher Etzion

Tracking map

23Copyright ©2009 Opher EtzionCopyright ©2009 Opher Etzion

Twitter as a consumer

24Copyright ©2009 Opher EtzionCopyright ©2009 Opher Etzion

Business Process Management system as a consumer

25Copyright ©2009 Opher EtzionCopyright ©2009 Opher Etzion

26Copyright ©2009 Opher EtzionCopyright ©2009 Opher Etzion

FFD Producer - Store

THE STORE EVENT PRODUCER

We start with the definition element for the Store producer. I ts definition element type is

producer class since the application treats all the participating flower stores in a similar

manner, so we can have a single event producer definition that represents them all.

I ts event producer category is Human Interaction, as its delivery requests are

entered by personnel in the flower store, and it has four output terminals, as shown in table

B.40.

Table B.40 The output terminals for the Store event producer

Identifier Event Types Targets

Request Delivery Request Request enrichment EPA

Assignment Manual Assignment Assignment Channel

Confirm Pick-up Pick-up Confirmation Pick-up alert EPA

Cancelation Delivery Request cancellation Delivery Cancellation channel

27Copyright ©2009 Opher EtzionCopyright ©2009 Opher Etzion

Driver as producer

THE DRIVER EVENT PRODUCER

The Driver event producer definition element represents all the drivers using the

application, so it too has a definition element type which has the value producer class. Although the driver uses a handheld device to submit events, we still give the definition

element an event producer category of Human Interaction, since it is the driver that we

are modeling not the device (we are assuming here that there's a one-one association of

drivers to devices). The event producer's output terminals are shown in table B.41.

Table B.41 The output terminals for the Driver event producer

Identifier Event Types Targets

Bid Delivery Bid Delivery Bid Channel

Confirm Delivery Confirmation Delivery Alert EPA

28Copyright ©2009 Opher EtzionCopyright ©2009 Opher Etzion

GPS Sensor as producer THE GPS SENSOR EVENT PRODUCER

We have included the GPS Sensor event producer to illustrate producer specialization. This

event producer is abstract so, naturally, its definition element type is abstract type, and, as you might expect, its event producer category is Sensor. The type has just one output terminal, as shown in table B.42.

Table B.42 The output terminal for the GPS sensor abstract event producer

Identifier Event Types Targets

Report GPS location -

THE VEHICLE EVENT PRODUCER

Our final definition element is the Vehicle event producer. I ts definition element type is

producer class as it represents all the vehicles that are being used for flower delivery. I t

is a specialization of the GPS Sensor type, reflecting the fact that there is a physical GPS

sensor in each vehicle, and the events are actually produced by that sensor. I ts event

producer category is therefore Sensor, just like the GPS Sensor type and, as you can see

from table B.43, it has the same output terminal.

Table B.43 The output terminal for the Vehicle event producer

Output Terminal Event Type Targets

Report Location GPS Location Location service EPA

29Copyright ©2009 Opher EtzionCopyright ©2009 Opher Etzion

The Driver event consumer

THE DRIVER EVENT CONSUMER

The Driver definition element represents the class of all drivers and so it has a definition

element type of consumer class.

I ts event consumer category is Human Interaction, and it has two input terminals as

shown in table B.44.

Table B.44 The input terminals for the Driver class

Input Terminal Event Types Source

Bids Bid Request Delivery request channel

Assignments Assignment Assignment channel

30Copyright ©2009 Opher EtzionCopyright ©2009 Opher Etzion

The Store event consumer

Table B.45 The input terminals for the Store class

Input Terminal Event Types Source

Bids Delivery Bid Assignment request channel

Alerts No Bidders Alert

Manual Assignment Timeout Alert

Pick-up Alert

Delivery Alert

Alerts channel

A store that has elected to do manual assignment will receive Delivery Bid requests from

drivers bidding for work on its Bids input terminal. Stores also receive alert events if

something goes wrong in the process, and we have chosen to have all alerts handled by a

single input terminal.

31Copyright ©2009 Opher EtzionCopyright ©2009 Opher Etzion

The Drivers Guild event consumer

THE DRIVERS' GUILD EVENT CONSUMER

The Drivers' Guild event consumer feeds evaluation reports to the guild. I ts definition

element type is consumer instance, as there is only one guild.

I ts event consumer category is Human Interaction, and it a single input terminal as

shown in table B.46.

Table B.46 The input terminals for the Drivers' Guild.

Input Terminal Event Types

Evaluation Improvement Note

Driver Report

32Copyright ©2009 Opher EtzionCopyright ©2009 Opher Etzion

Lecture Summary

• In this lecture we have discussed the following topics:

– The concept of event producer and consumer;

– Types of consumers and producers

– Their interaction with the event processing system

– The "Fast Flower Delivery" use case the accompanies this book