Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.

Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.

3.
Predictive Business
"In the future, every company must be able to
recognize what is coming early enough to take
evasive action or steer towards an emerging
opportunity."[Frederick W. Smith-CEO
FedEx]
JTeam
Innovating J2EE Development
Wednesday, April 1, 2009

9.
Concepts - Event
An event is a piece of data that represents
that something happened in the real world,
or in software system.
e.g. Stock Tick, Weather, UserClick
JTeam
Innovating J2EE Development
Wednesday, April 1, 2009

10.
Concepts - Complex Event
An event that could only happen when lots
of other events happen.
e.g. Housing Price Drop
JTeam
Innovating J2EE Development
Wednesday, April 1, 2009

12.
Concepts - Event Cloud
A partially ordered set of events form
Event Cloud
e.g.
Set of all stock trades for GOOG within a 5
minute time window is an Event Stream. While all
Stocks sold in a business day is an Event Cloud.
JTeam
Innovating J2EE Development
Wednesday, April 1, 2009

14.
ESP and CEP
Event Stream Processing is focused more
on high-speed querying of data in streams
of events and applying mathematical
algorithms to the event data.
Complex Event Processing includes event
data analysis, but places emphasis on
patterns of events, and abstracting and
simplifying information in the patterns.
JTeam
Innovating J2EE Development
Wednesday, April 1, 2009

36.
UpdateListener
Receives updated data as soon as
it is processed for the statement.
JTeam
Innovating J2EE Development
Wednesday, April 1, 2009

37.
Subscriber
• Must provide a method by name update
to receive insert stream events row-by-
row
• The number and types of parameters
declared by the update method must
match the number and types of columns
as speciﬁed in the select clause, in the
same order as in the select clause
• JTeam
Innovating J2EE Development
Wednesday, April 1, 2009

39.
Esper Engine Integration
• Obtain an Esper engine instance
• Create a statement (using the Esper query
language)
• Register the statement with the engine
• Create a listener (by implementing a Java
interface that will be triggered when the
statement evaluates to true) and attach it to the
statement
JTeam
Innovating J2EE Development
Wednesday, April 1, 2009

54.
CEP Design Patterns (1/9)
Filtering:
e.g. Click-stream analysis: a filter may be used to capture the trades that
originate from a certain set of IP addresses.
JTeam
Innovating J2EE Development
Wednesday, April 1, 2009

55.
CEP Design Patterns (2/9)
In Memory Caching:
e.g. Click-stream analysis: a typical application may hold the recent clicks and
searches performed by the users, coupled with the relevant historical and reference
information.
JTeam
Innovating J2EE Development
Wednesday, April 1, 2009

56.
CEP Design Patterns (3/9)
Aggregation over Windows:
e.g. Click-stream analysis: it is often useful to compute the number of visitors
who click on a particular link within a specified time interval.
JTeam
Innovating J2EE Development
Wednesday, April 1, 2009

57.
CEP Design Patterns (4/9)
Database Lookups:
e.g. Trading: a trading application may look up historical price for a stock, or
certain information about an order, or certain rules and regulations stored in a
database.
JTeam
Innovating J2EE Development
Wednesday, April 1, 2009

60.
CEP Design Patterns (7/9)
Event Pattern Matching:
e.g. Fraud detection: fraud patterns are often described as a sequence of
events, in one or more streams.
JTeam
Innovating J2EE Development
Wednesday, April 1, 2009

61.
CEP Design Patterns (8/9)
Hierarchical Events:
e.g. Order Processing: Purchase Order can have multiple items which needs to
be processed differently.
JTeam
Innovating J2EE Development
Wednesday, April 1, 2009