SlideShare a Scribd company logo
1 of 70
Download to read offline
Esper
                                   The Power to Predict




            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
Agenda


         • Predictive Business
         • Complex Event Processing
         • Esper
         • Demo
         • Questions
            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
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
Business Demands


                              High throughput

                               Complexity       High Availability

                Low latency              Insight


            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
Conventional Models


     •       RDBMS
               •       Adds delays into data storage
               •       Uses Polling Model
               •       Wasteful Use of Resources

            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
Conventional Models


     •       Messaging Systems
               •       Process Unitary Events
               •       No Correlation support



            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
Agenda


         • Predictive Business
         • Complex Event Processing
         • Esper
         • Demo
         • Questions
            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
Complex Event Processing




            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
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
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
Concepts - Event Stream

             A linearly ordered (often by time)
             sequence of events forms Event Stream.
             e.g. Click Stream




            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
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
Concepts - Event Cloud




            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
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
CEP Engine



             An event processor is an application that
             performs operations on event objects,
             including creating, reading, transforming,
             aggregating, correlating or removing them.




            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
CEP Engine




            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
CEP Engine Characteristics

     1. Keep the data moving
     2. Query on streams
     3. Handle Stream Imperfections
     4. Integrate Stored and Streaming Data
     5. Guarantee Data Safety and Availability


            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
CEP Engine Characteristics

     6. Partition and scale applications automatically
     7. Process and Respond instantaneously
     8. Interoperability




            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
CEP in Application Architecture




            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
Commercial CEP Products

     •       Weblogic Event Server

     •       Coral8

     •       TIBCO

     •       IBM

     •       StreamBase

     •       Progress




            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
CEP/EDA and SOA [1/3]



                                     EDA is SOA 2.0




                                                  EDA is Proactive SOA
                           EDA and SOA
                           Complementary




            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
CEP/EDA and SOA [2/3]




            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
CEP/EDA and SOA [3/3]




            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
Real World Applications


             Capital Markets
             BAM - Business Activity Monitoring
             Supply Chain Management
             Flight Operations Monitoring
             Fraud Detection
            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
Agenda


         • Predictive Business
         • Complex Event Processing
         • Esper
         • Demo
         • Questions
            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
Esper


         • Dual Licensing model
               •       Open Source GPL

               •       Esper Tech

               •       Q2/2007 BEA Partner



            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
Good Documentation

     •       Nice reference document
     •       Patterns catalogue available online
     •       Lots of examples




            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
Lightweight

     •       ANTLR
     •       CGLIB
     •       LOG4J




            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
Ohloh Analysis Summary




            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
Pluggability


     •       Works with any Java Process
     •       OSGI Enabled




            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
Architecture

                 ESPER Engine

                             EPServiceProvider


                            Event           EPL
                                                              JDB
                           Objects       Statements   Confi
                                                              C
                                                      gurat
                                                              Adap
                                                       ion
                                 Listeners                    ter



                                Subscribers



            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
API Overview

     •       EPServiceProvider
               •       Acts as Engine
     •       EPStatement
               •       Queries written in EQL
     •       UpdateListener
            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
Event

     •       POJOs
     •       Key value pairs (java.util.Map)
     •       XML Documents



            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
Event




            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
Event Properties


                     Type                Syntax      Example
           Simple                  name           sensor

           Indexed                 name[index]    sensor[0]

           Mapped                  name(key)      sensor(‘light’)

           Nested                  name.nested    sensor.value
                                   Name
            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
UpdateListener


             Receives updated data as soon as
             it is processed for the statement.




            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
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 specified in the select clause, in the
             same order as in the select clause
     •      JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
Subscriber

             select orderId, price, count(*) from
             OrderEvent
             public class MySubscriber { ...
              public void update(String orderId, double
             price, long count) {...}
             }


            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
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
Esper Engine Integration

               //Register events
               Configuration configuration = new Configuration();
                     configuration.addEventType("TempEvent",
               BodyTemperatureEvent.class.getName());

               // Get Esper CEP Engine
               EPServiceProvider cepEngine = EPServiceProviderManager.getProvider("esper-sports-
               poc", configuration);
               // Create EPStatement
               PlayerBMIStatement playerBMIStatement = new
               PlayerBMIStatement(cepEngine.getEPAdministrator());
               playerBMIStatement.addListener(new PlayerBMIListener());
               // Dispatch Event
               cepEngine.getEPRuntime().sendEvent(eventInstance);


            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
EPL


             Similar to SQL
                                                Stream
                      Name                BP
                                 Event
                       Ross               110
                     Rachel               120
                           Joe            100



            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
Sliding Window Support




            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
Streams


             Input stream denotes new events
             arriving, the term remove stream
             denotes events leaving a data
             window.



            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
Windows

     •       win:length(4)

     •       win:time(4 sec)

     •       win:time_batch(4 sec)

     •       win:length_batch(4)




            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
Batch Time Window




            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
Named Windows


     •       Analogous to database views
     •       Created using SELECT queries
     •       Define window (view) first and
             insert data
             create window OrdersTimeWindow.win:time(30
             sec) as select symbol, volume, price from
             OrderEvent
            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
Filters


             select * from
             Withdrawal(amount>=200).win:le
             ngth(5)




            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
Aggregations

     •       sum
     •       avg
     •       count
     •       min/max
     •       stddev

            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
Output Rate Limiting


             Engine dispatches to Listener
             when output condition occurs.
             e.g.
             select irstream symbol, volume, price from
             MarketData.win:time(5.5 sec) output every 1 seconds



            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
Event Patterns


             Pattern Expression = Pattern
             atoms + Pattern Operators
             every (spike=ServiceMeasurement(latency>20000)
             or error=ServiceMeasurement(success=false))
             select s from pattern [every s=SubmitOrderEvent ->
             (timer:interval(30 sec) and not
             OrderAcceptedEvent(theOrder.id=s.theOrder.id))]


            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
RDBMS Integration




            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
RDBMS Integration



             select name, healthy_temp from
             TempEvent.win:time(60 sec) temp, sql:mydb3 ['
             select name,healthy_temp from Player where
             name = ${temp.playerName} and $
             {temp.temperature} > healthy_temp ']




            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
Non Event Based Data Integration

             public class InstrumentRepository {
               public static Exchange[]
             getExchangesForSymbol(String symbol) {
             
       ...
                 }
             select ord, eligibleExchanges from TheOrder as ord,
             method:com.ociweb.jnb.esper.InstrumentRepository.ge
             tExchangesForSymbol(ord.symbol) as eligibleExchanges
             }
            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
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
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
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
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
CEP Design Patterns (5/9)


             Database Writes:
     e.g. Click-stream analysis: storing the raw click-stream history, together with
     derived data, in the database




            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
CEP Design Patterns (6/9)


             Correlation (Joins):
     e.g. Trading: correlating information from multiple exchanges to find arbitrage
     opportunities.




            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
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
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
CEP Design Patterns (9/9)


             Dynamic Queries:
     e.g. Trading environments: every trader can enter their subscriptions like
     X=MSFT, Y=.1%, Z=10 am.




            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
EsperIO


             Provides adapters support:
     •       CSVAdapter
     •       JMSAdapter
     •       OpenTick Adapter

            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
Demo




            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
Performance Tips

             // Better performance
             select * from RFIDEvent

             // Less good performance
             select assetId, zone, xlocation, ylocation
             from RFIDEvent


            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
Conclusion


                     Do I really need it?



                             Do I have the right
                            infrastructure?




            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
Conclusion


     •       Learning Curve of EPL
     •       No Standardization of EPL
     •       EPL is still evolving



            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
Questions?




            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
CEP in Dutch Market


     •       KLM - TIBCO
     •       Boekhandels Groep Nederlands
             (BGN)




            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009
Resources


          Esper             http://esper.codehaus.org/
                            http://complexevents.com/
          CEP               http://www.cepbusinesscast.com/
                            Open Source SOA




            JTeam
           Innovating J2EE Development
Wednesday, April 1, 2009

More Related Content

What's hot

Jenkins Pipeline meets Oracle
Jenkins Pipeline meets OracleJenkins Pipeline meets Oracle
Jenkins Pipeline meets OracleOliver Lemm
 
My Experiences as a Beginner of OpenJDK Contributor (JCConf Taiwan 2021)
My Experiences as a Beginner of OpenJDK Contributor (JCConf Taiwan 2021)My Experiences as a Beginner of OpenJDK Contributor (JCConf Taiwan 2021)
My Experiences as a Beginner of OpenJDK Contributor (JCConf Taiwan 2021)NTT DATA Technology & Innovation
 
Binderのはじめの一歩とAndroid
Binderのはじめの一歩とAndroidBinderのはじめの一歩とAndroid
Binderのはじめの一歩とAndroidl_b__
 
GitHub Actions - using Free Oracle Cloud Infrastructure (OCI)
GitHub Actions - using Free Oracle Cloud Infrastructure (OCI)GitHub Actions - using Free Oracle Cloud Infrastructure (OCI)
GitHub Actions - using Free Oracle Cloud Infrastructure (OCI)Phil Wilkins
 
Lxc で始めるケチケチ仮想化生活?!
Lxc で始めるケチケチ仮想化生活?!Lxc で始めるケチケチ仮想化生活?!
Lxc で始めるケチケチ仮想化生活?!Etsuji Nakai
 
Web hdfs and httpfs
Web hdfs and httpfsWeb hdfs and httpfs
Web hdfs and httpfswchevreuil
 
twMVC#44 讓我們用 k6 來進行壓測吧
twMVC#44 讓我們用 k6 來進行壓測吧twMVC#44 讓我們用 k6 來進行壓測吧
twMVC#44 讓我們用 k6 來進行壓測吧twMVC
 
ルーティングチュートリアルチュートリアル TCP/IP編
ルーティングチュートリアルチュートリアル TCP/IP編ルーティングチュートリアルチュートリアル TCP/IP編
ルーティングチュートリアルチュートリアル TCP/IP編Yuya Rin
 
IT Pro のための PowerShell スクリプティング
IT Pro のための PowerShell スクリプティングIT Pro のための PowerShell スクリプティング
IT Pro のための PowerShell スクリプティングKazuki Takai
 
今こそ知りたいSpring Batch(Spring Fest 2020講演資料)
今こそ知りたいSpring Batch(Spring Fest 2020講演資料)今こそ知りたいSpring Batch(Spring Fest 2020講演資料)
今こそ知りたいSpring Batch(Spring Fest 2020講演資料)NTT DATA Technology & Innovation
 
Spring IO 2023 - Dynamic OpenAPIs with Spring Cloud Gateway
Spring IO 2023 - Dynamic OpenAPIs with Spring Cloud GatewaySpring IO 2023 - Dynamic OpenAPIs with Spring Cloud Gateway
Spring IO 2023 - Dynamic OpenAPIs with Spring Cloud GatewayIván López Martín
 
Pythonはどうやってlen関数で長さを手にいれているの?
Pythonはどうやってlen関数で長さを手にいれているの?Pythonはどうやってlen関数で長さを手にいれているの?
Pythonはどうやってlen関数で長さを手にいれているの?Takayuki Shimizukawa
 
차곡차곡 쉽게 알아가는 Elasticsearch와 Node.js
차곡차곡 쉽게 알아가는 Elasticsearch와 Node.js차곡차곡 쉽게 알아가는 Elasticsearch와 Node.js
차곡차곡 쉽게 알아가는 Elasticsearch와 Node.jsHeeJung Hwang
 
REST APIs with Spring
REST APIs with SpringREST APIs with Spring
REST APIs with SpringJoshua Long
 
YOW2018 Cloud Performance Root Cause Analysis at Netflix
YOW2018 Cloud Performance Root Cause Analysis at NetflixYOW2018 Cloud Performance Root Cause Analysis at Netflix
YOW2018 Cloud Performance Root Cause Analysis at NetflixBrendan Gregg
 
Extending Java EE with CDI and JBoss Forge
Extending Java EE with CDI and JBoss ForgeExtending Java EE with CDI and JBoss Forge
Extending Java EE with CDI and JBoss ForgeAntoine Sabot-Durand
 
ストリーム処理におけるApache Avroの活用について(NTTデータ テクノロジーカンファレンス 2019 講演資料、2019/09/05)
ストリーム処理におけるApache Avroの活用について(NTTデータ テクノロジーカンファレンス 2019 講演資料、2019/09/05)ストリーム処理におけるApache Avroの活用について(NTTデータ テクノロジーカンファレンス 2019 講演資料、2019/09/05)
ストリーム処理におけるApache Avroの活用について(NTTデータ テクノロジーカンファレンス 2019 講演資料、2019/09/05)NTT DATA Technology & Innovation
 
Apache NiFi Meetup - Princeton NJ 2016
Apache NiFi Meetup - Princeton NJ 2016Apache NiFi Meetup - Princeton NJ 2016
Apache NiFi Meetup - Princeton NJ 2016Timothy Spann
 

What's hot (20)

Jenkins Pipeline meets Oracle
Jenkins Pipeline meets OracleJenkins Pipeline meets Oracle
Jenkins Pipeline meets Oracle
 
My Experiences as a Beginner of OpenJDK Contributor (JCConf Taiwan 2021)
My Experiences as a Beginner of OpenJDK Contributor (JCConf Taiwan 2021)My Experiences as a Beginner of OpenJDK Contributor (JCConf Taiwan 2021)
My Experiences as a Beginner of OpenJDK Contributor (JCConf Taiwan 2021)
 
Binderのはじめの一歩とAndroid
Binderのはじめの一歩とAndroidBinderのはじめの一歩とAndroid
Binderのはじめの一歩とAndroid
 
GitHub Actions - using Free Oracle Cloud Infrastructure (OCI)
GitHub Actions - using Free Oracle Cloud Infrastructure (OCI)GitHub Actions - using Free Oracle Cloud Infrastructure (OCI)
GitHub Actions - using Free Oracle Cloud Infrastructure (OCI)
 
Lxc で始めるケチケチ仮想化生活?!
Lxc で始めるケチケチ仮想化生活?!Lxc で始めるケチケチ仮想化生活?!
Lxc で始めるケチケチ仮想化生活?!
 
API Design - 3rd Edition
API Design - 3rd EditionAPI Design - 3rd Edition
API Design - 3rd Edition
 
Web hdfs and httpfs
Web hdfs and httpfsWeb hdfs and httpfs
Web hdfs and httpfs
 
twMVC#44 讓我們用 k6 來進行壓測吧
twMVC#44 讓我們用 k6 來進行壓測吧twMVC#44 讓我們用 k6 來進行壓測吧
twMVC#44 讓我們用 k6 來進行壓測吧
 
ルーティングチュートリアルチュートリアル TCP/IP編
ルーティングチュートリアルチュートリアル TCP/IP編ルーティングチュートリアルチュートリアル TCP/IP編
ルーティングチュートリアルチュートリアル TCP/IP編
 
IT Pro のための PowerShell スクリプティング
IT Pro のための PowerShell スクリプティングIT Pro のための PowerShell スクリプティング
IT Pro のための PowerShell スクリプティング
 
Keystone fernet token
Keystone fernet tokenKeystone fernet token
Keystone fernet token
 
今こそ知りたいSpring Batch(Spring Fest 2020講演資料)
今こそ知りたいSpring Batch(Spring Fest 2020講演資料)今こそ知りたいSpring Batch(Spring Fest 2020講演資料)
今こそ知りたいSpring Batch(Spring Fest 2020講演資料)
 
Spring IO 2023 - Dynamic OpenAPIs with Spring Cloud Gateway
Spring IO 2023 - Dynamic OpenAPIs with Spring Cloud GatewaySpring IO 2023 - Dynamic OpenAPIs with Spring Cloud Gateway
Spring IO 2023 - Dynamic OpenAPIs with Spring Cloud Gateway
 
Pythonはどうやってlen関数で長さを手にいれているの?
Pythonはどうやってlen関数で長さを手にいれているの?Pythonはどうやってlen関数で長さを手にいれているの?
Pythonはどうやってlen関数で長さを手にいれているの?
 
차곡차곡 쉽게 알아가는 Elasticsearch와 Node.js
차곡차곡 쉽게 알아가는 Elasticsearch와 Node.js차곡차곡 쉽게 알아가는 Elasticsearch와 Node.js
차곡차곡 쉽게 알아가는 Elasticsearch와 Node.js
 
REST APIs with Spring
REST APIs with SpringREST APIs with Spring
REST APIs with Spring
 
YOW2018 Cloud Performance Root Cause Analysis at Netflix
YOW2018 Cloud Performance Root Cause Analysis at NetflixYOW2018 Cloud Performance Root Cause Analysis at Netflix
YOW2018 Cloud Performance Root Cause Analysis at Netflix
 
Extending Java EE with CDI and JBoss Forge
Extending Java EE with CDI and JBoss ForgeExtending Java EE with CDI and JBoss Forge
Extending Java EE with CDI and JBoss Forge
 
ストリーム処理におけるApache Avroの活用について(NTTデータ テクノロジーカンファレンス 2019 講演資料、2019/09/05)
ストリーム処理におけるApache Avroの活用について(NTTデータ テクノロジーカンファレンス 2019 講演資料、2019/09/05)ストリーム処理におけるApache Avroの活用について(NTTデータ テクノロジーカンファレンス 2019 講演資料、2019/09/05)
ストリーム処理におけるApache Avroの活用について(NTTデータ テクノロジーカンファレンス 2019 講演資料、2019/09/05)
 
Apache NiFi Meetup - Princeton NJ 2016
Apache NiFi Meetup - Princeton NJ 2016Apache NiFi Meetup - Princeton NJ 2016
Apache NiFi Meetup - Princeton NJ 2016
 

Similar to Esper - CEP Engine

Governing services, data, rules, processes and more
Governing services, data, rules, processes and moreGoverning services, data, rules, processes and more
Governing services, data, rules, processes and moreRandall Hauch
 
Smalltalk in Enterprise Applications
Smalltalk in Enterprise ApplicationsSmalltalk in Enterprise Applications
Smalltalk in Enterprise ApplicationsESUG
 
Amit Monovitch RSA Case Study - Agile SCRUM - The good, the bad and the ugly
Amit Monovitch RSA Case Study - Agile SCRUM - The good, the bad and the uglyAmit Monovitch RSA Case Study - Agile SCRUM - The good, the bad and the ugly
Amit Monovitch RSA Case Study - Agile SCRUM - The good, the bad and the uglyAgileSparks
 
Using The Page Object Pattern
Using The Page Object PatternUsing The Page Object Pattern
Using The Page Object PatternDante Briones
 
Java 7 - State of the Enterprise
Java 7 - State of the EnterpriseJava 7 - State of the Enterprise
Java 7 - State of the EnterpriseMarkus Eisele
 
Maven Application Lifecycle Management for Alfresco
Maven Application Lifecycle Management for AlfrescoMaven Application Lifecycle Management for Alfresco
Maven Application Lifecycle Management for Alfrescoguest67a9ba
 
Banking on Enterprise OSGi
Banking on Enterprise OSGiBanking on Enterprise OSGi
Banking on Enterprise OSGiGary Field
 
Smart+Shanghai+2008 09 05
Smart+Shanghai+2008 09 05Smart+Shanghai+2008 09 05
Smart+Shanghai+2008 09 05guestaa42e9
 
Smart+Shanghai+2008 09 05
Smart+Shanghai+2008 09 05Smart+Shanghai+2008 09 05
Smart+Shanghai+2008 09 05Guang Ying Yuan
 
Experiences with enterprise architecture using togaf and ibm rational system ...
Experiences with enterprise architecture using togaf and ibm rational system ...Experiences with enterprise architecture using togaf and ibm rational system ...
Experiences with enterprise architecture using togaf and ibm rational system ...james_dzidek
 
Process Project Mgt Seminar 8 Apr 2009(2)
Process Project Mgt Seminar 8 Apr 2009(2)Process Project Mgt Seminar 8 Apr 2009(2)
Process Project Mgt Seminar 8 Apr 2009(2)avitale1998
 
Taking Your Product Development to the Next Level with Full Stack
Taking Your Product Development to the Next Level with Full StackTaking Your Product Development to the Next Level with Full Stack
Taking Your Product Development to the Next Level with Full StackOptimizely
 
2011 June - Singapore GTUG presentation. App Engine program update + intro to Go
2011 June - Singapore GTUG presentation. App Engine program update + intro to Go2011 June - Singapore GTUG presentation. App Engine program update + intro to Go
2011 June - Singapore GTUG presentation. App Engine program update + intro to Goikailan
 

Similar to Esper - CEP Engine (20)

An Invitation To Jam!
An Invitation To Jam!An Invitation To Jam!
An Invitation To Jam!
 
Governing services, data, rules, processes and more
Governing services, data, rules, processes and moreGoverning services, data, rules, processes and more
Governing services, data, rules, processes and more
 
Smart
SmartSmart
Smart
 
Smalltalk in Enterprise Applications
Smalltalk in Enterprise ApplicationsSmalltalk in Enterprise Applications
Smalltalk in Enterprise Applications
 
Amit Monovitch RSA Case Study - Agile SCRUM - The good, the bad and the ugly
Amit Monovitch RSA Case Study - Agile SCRUM - The good, the bad and the uglyAmit Monovitch RSA Case Study - Agile SCRUM - The good, the bad and the ugly
Amit Monovitch RSA Case Study - Agile SCRUM - The good, the bad and the ugly
 
JPicus@ESE
JPicus@ESEJPicus@ESE
JPicus@ESE
 
Using The Page Object Pattern
Using The Page Object PatternUsing The Page Object Pattern
Using The Page Object Pattern
 
Java 7 - State of the Enterprise
Java 7 - State of the EnterpriseJava 7 - State of the Enterprise
Java 7 - State of the Enterprise
 
Maven Application Lifecycle Management for Alfresco
Maven Application Lifecycle Management for AlfrescoMaven Application Lifecycle Management for Alfresco
Maven Application Lifecycle Management for Alfresco
 
Architecting for failure
Architecting for failureArchitecting for failure
Architecting for failure
 
Banking on Enterprise OSGi
Banking on Enterprise OSGiBanking on Enterprise OSGi
Banking on Enterprise OSGi
 
Extreme Competition
Extreme CompetitionExtreme Competition
Extreme Competition
 
Smart+Shanghai+2008 09 05
Smart+Shanghai+2008 09 05Smart+Shanghai+2008 09 05
Smart+Shanghai+2008 09 05
 
Smart+Shanghai+2008 09 05
Smart+Shanghai+2008 09 05Smart+Shanghai+2008 09 05
Smart+Shanghai+2008 09 05
 
Experiences with enterprise architecture using togaf and ibm rational system ...
Experiences with enterprise architecture using togaf and ibm rational system ...Experiences with enterprise architecture using togaf and ibm rational system ...
Experiences with enterprise architecture using togaf and ibm rational system ...
 
Process Project Mgt Seminar 8 Apr 2009(2)
Process Project Mgt Seminar 8 Apr 2009(2)Process Project Mgt Seminar 8 Apr 2009(2)
Process Project Mgt Seminar 8 Apr 2009(2)
 
Taking Your Product Development to the Next Level with Full Stack
Taking Your Product Development to the Next Level with Full StackTaking Your Product Development to the Next Level with Full Stack
Taking Your Product Development to the Next Level with Full Stack
 
2011 June - Singapore GTUG presentation. App Engine program update + intro to Go
2011 June - Singapore GTUG presentation. App Engine program update + intro to Go2011 June - Singapore GTUG presentation. App Engine program update + intro to Go
2011 June - Singapore GTUG presentation. App Engine program update + intro to Go
 
STI Summit 2011 - Linked services
STI Summit 2011 - Linked servicesSTI Summit 2011 - Linked services
STI Summit 2011 - Linked services
 
Question 6.2
Question 6.2Question 6.2
Question 6.2
 

Recently uploaded

Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 

Recently uploaded (20)

Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 

Esper - CEP Engine

  • 1. Esper The Power to Predict JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 2. Agenda • Predictive Business • Complex Event Processing • Esper • Demo • Questions JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 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
  • 4. Business Demands High throughput Complexity High Availability Low latency Insight JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 5. Conventional Models • RDBMS • Adds delays into data storage • Uses Polling Model • Wasteful Use of Resources JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 6. Conventional Models • Messaging Systems • Process Unitary Events • No Correlation support JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 7. Agenda • Predictive Business • Complex Event Processing • Esper • Demo • Questions JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 8. Complex Event Processing 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
  • 11. Concepts - Event Stream A linearly ordered (often by time) sequence of events forms Event Stream. e.g. Click Stream 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
  • 13. Concepts - 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
  • 15. CEP Engine An event processor is an application that performs operations on event objects, including creating, reading, transforming, aggregating, correlating or removing them. JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 16. CEP Engine JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 17. CEP Engine Characteristics 1. Keep the data moving 2. Query on streams 3. Handle Stream Imperfections 4. Integrate Stored and Streaming Data 5. Guarantee Data Safety and Availability JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 18. CEP Engine Characteristics 6. Partition and scale applications automatically 7. Process and Respond instantaneously 8. Interoperability JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 19. CEP in Application Architecture JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 20. Commercial CEP Products • Weblogic Event Server • Coral8 • TIBCO • IBM • StreamBase • Progress JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 21. CEP/EDA and SOA [1/3] EDA is SOA 2.0 EDA is Proactive SOA EDA and SOA Complementary JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 22. CEP/EDA and SOA [2/3] JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 23. CEP/EDA and SOA [3/3] JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 24. Real World Applications Capital Markets BAM - Business Activity Monitoring Supply Chain Management Flight Operations Monitoring Fraud Detection JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 25. Agenda • Predictive Business • Complex Event Processing • Esper • Demo • Questions JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 26. Esper • Dual Licensing model • Open Source GPL • Esper Tech • Q2/2007 BEA Partner JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 27. Good Documentation • Nice reference document • Patterns catalogue available online • Lots of examples JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 28. Lightweight • ANTLR • CGLIB • LOG4J JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 29. Ohloh Analysis Summary JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 30. Pluggability • Works with any Java Process • OSGI Enabled JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 31. Architecture ESPER Engine EPServiceProvider Event EPL JDB Objects Statements Confi C gurat Adap ion Listeners ter Subscribers JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 32. API Overview • EPServiceProvider • Acts as Engine • EPStatement • Queries written in EQL • UpdateListener JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 33. Event • POJOs • Key value pairs (java.util.Map) • XML Documents JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 34. Event JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 35. Event Properties Type Syntax Example Simple name sensor Indexed name[index] sensor[0] Mapped name(key) sensor(‘light’) Nested name.nested sensor.value Name 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 specified in the select clause, in the same order as in the select clause • JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 38. Subscriber select orderId, price, count(*) from OrderEvent public class MySubscriber { ... public void update(String orderId, double price, long count) {...} } 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
  • 40. Esper Engine Integration //Register events Configuration configuration = new Configuration(); configuration.addEventType("TempEvent", BodyTemperatureEvent.class.getName()); // Get Esper CEP Engine EPServiceProvider cepEngine = EPServiceProviderManager.getProvider("esper-sports- poc", configuration); // Create EPStatement PlayerBMIStatement playerBMIStatement = new PlayerBMIStatement(cepEngine.getEPAdministrator()); playerBMIStatement.addListener(new PlayerBMIListener()); // Dispatch Event cepEngine.getEPRuntime().sendEvent(eventInstance); JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 41. EPL Similar to SQL Stream Name BP Event Ross 110 Rachel 120 Joe 100 JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 42. Sliding Window Support JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 43. Streams Input stream denotes new events arriving, the term remove stream denotes events leaving a data window. JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 44. Windows • win:length(4) • win:time(4 sec) • win:time_batch(4 sec) • win:length_batch(4) JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 45. Batch Time Window JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 46. Named Windows • Analogous to database views • Created using SELECT queries • Define window (view) first and insert data create window OrdersTimeWindow.win:time(30 sec) as select symbol, volume, price from OrderEvent JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 47. Filters select * from Withdrawal(amount>=200).win:le ngth(5) JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 48. Aggregations • sum • avg • count • min/max • stddev JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 49. Output Rate Limiting Engine dispatches to Listener when output condition occurs. e.g. select irstream symbol, volume, price from MarketData.win:time(5.5 sec) output every 1 seconds JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 50. Event Patterns Pattern Expression = Pattern atoms + Pattern Operators every (spike=ServiceMeasurement(latency>20000) or error=ServiceMeasurement(success=false)) select s from pattern [every s=SubmitOrderEvent -> (timer:interval(30 sec) and not OrderAcceptedEvent(theOrder.id=s.theOrder.id))] JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 51. RDBMS Integration JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 52. RDBMS Integration select name, healthy_temp from TempEvent.win:time(60 sec) temp, sql:mydb3 [' select name,healthy_temp from Player where name = ${temp.playerName} and $ {temp.temperature} > healthy_temp '] JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 53. Non Event Based Data Integration public class InstrumentRepository { public static Exchange[] getExchangesForSymbol(String symbol) { ... } select ord, eligibleExchanges from TheOrder as ord, method:com.ociweb.jnb.esper.InstrumentRepository.ge tExchangesForSymbol(ord.symbol) as eligibleExchanges } 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
  • 58. CEP Design Patterns (5/9) Database Writes: e.g. Click-stream analysis: storing the raw click-stream history, together with derived data, in the database JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 59. CEP Design Patterns (6/9) Correlation (Joins): e.g. Trading: correlating information from multiple exchanges to find arbitrage opportunities. 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
  • 62. CEP Design Patterns (9/9) Dynamic Queries: e.g. Trading environments: every trader can enter their subscriptions like X=MSFT, Y=.1%, Z=10 am. JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 63. EsperIO Provides adapters support: • CSVAdapter • JMSAdapter • OpenTick Adapter JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 64. Demo JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 65. Performance Tips // Better performance select * from RFIDEvent // Less good performance select assetId, zone, xlocation, ylocation from RFIDEvent JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 66. Conclusion Do I really need it? Do I have the right infrastructure? JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 67. Conclusion • Learning Curve of EPL • No Standardization of EPL • EPL is still evolving JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 68. Questions? JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 69. CEP in Dutch Market • KLM - TIBCO • Boekhandels Groep Nederlands (BGN) JTeam Innovating J2EE Development Wednesday, April 1, 2009
  • 70. Resources Esper http://esper.codehaus.org/ http://complexevents.com/ CEP http://www.cepbusinesscast.com/ Open Source SOA JTeam Innovating J2EE Development Wednesday, April 1, 2009