SlideShare a Scribd company logo
1 of 26
Download to read offline
Complex Event Processing
with Esper
Real-time Event Stream & Complex Event Processing
tedwon
1. Church bells ringing...
2. Appearance of a man in a tuxedo with a woman
in a flowing white gown...
3. Flower flying through the air.
Concept of CEP
Concept of CEP
● From these events CEP may infer a wedding.
● CEP as a technique helps discover complex events as a pattern by analyzing
and correlating other events
● http://en.wikipedia.org/wiki/Complex_event_processing#Conceptual_description
● Algorithmic Stock-Trading
● Real-time Stock Tick monitoring
● Detection of credit-card fraud
● Real-time ETL processing
● Business activity monitoring
● Real-time Mobile Targeting Ad & Recommendation
CEP Use Cases
CEP is
● based EDA(Event-driven architecture)
● not Request & Response style system
● Detection & Reaction style system
● not Pre-save and Post-process paradigm
● Pre-process and Post-save paradigm
● Loosely-coupled system
● Asynchronous style processing paradigm
● Intelligence system
Event Driven Architecture
● Software architecture pattern promoting the production, detection,
consumption of, and reaction to events.
eye,ear...sensory organs think,decision hand,foot...reaction
EDA Event Process
1. SEP - Simple Event Processing
a. JMS(Java Message Service)
b. ESB(Enterprise Service Bus)
2. ESP - Event Stream Processing
3. CEP - Complex Event Processing
ESP vs. CEP
● ESP
○ Monitor streams of event data, analyse those events, and act upon opportunities
○ Filtering, Aggregation, Join
○ Average of Google stock over the last (moving) 30min
● CEP
○ Detecting patterns among events
○ If this Google stock increased more than 5% two times followed by Apple stock
decreased more than 10% then…
CEP Open Source Projects
● JBoss Drools Fusion
○ Rule Script DSL
○ Java
● EsperTech Esper
○ SQL-like Script DSL
○ Java
EsperTech Esper
Open Source Esper
● Provide ESP/CEP Engine
● Provide SQL-like EPL(Event Processing Language)
● Well-documented reference
● Lightweight & Embeddable
Esper Architecture
Esper Architecture
Esper Architecture
● Real-time ETL application
ETL EPL
(Extract, Transform, Load)
Hadoop FileSystem API ImplThrift Server Impl
Esper with Runtime
● Esper + Java EE Platform
● Java Standalone Instance
● Esper + OSGi Server
Esper EPL Features
● Event filtering
● Sliding data windows
● Aggregation
● Pattern matching
● Joins and Outer Joins
● Subquery
● Reference historical data
Esper EPL Example
Order Top10 by item over last 30 min
OrderEvent.win:time(30 min)from
group by itemId
select itemId, count(*) as cnt
limit 10
Esper EPL Example
Continuous query
OrderEvent.win:time(30 min)from
group by itemId
select itemId, count(*) as cnt
limit 10
Esper EPL Features
MySQL native query
EPL Join
06 EPL과 Adapter 개발
where users visit in Gangnam district
over last one hour
“Place Name!!”
from LR.std:unique(assetId).win:time(1 hour) as lr,
sql:db[select zone_name from ZoneName
where zone=${lr.zone}]
select assetId, zone_name
where zone in (‘gangnam code’)
Esper Pattern EPL Example
select Part.zone from pattern [
every Part=CountZone(cnt in (1, 2)) ->
( not CountZone(zone=Part.zone, cnt in (0, 3))
and timer:interval(10 sec) )]
Quick Start Esper
Esper Quick Start Project
Esper Quick Start Project
Thank you
References
1. https://en.wikipedia.org/wiki/Event-driven_architecture
2. http://en.wikipedia.org/wiki/Complex_event_processing
3. http://www.espertech.com/esper/quickstart.php
4. https://github.com/espertechinc/esper
5. http://www.hawkular.org/blog/2017/01/13/events-aggregation-extension.html
6. https://github.com/tedwon/cep-esper-quick-start
7. https://www.slideshare.net/matthewmccullough/complex-event-processing-with-esper

More Related Content

What's hot

Data Lineage with Apache Airflow using Marquez
Data Lineage with Apache Airflow using Marquez Data Lineage with Apache Airflow using Marquez
Data Lineage with Apache Airflow using Marquez
Willy Lulciuc
 

What's hot (20)

Data Lineage with Apache Airflow using Marquez
Data Lineage with Apache Airflow using Marquez Data Lineage with Apache Airflow using Marquez
Data Lineage with Apache Airflow using Marquez
 
Advanced Terraform
Advanced TerraformAdvanced Terraform
Advanced Terraform
 
Opentelemetry - From frontend to backend
Opentelemetry - From frontend to backendOpentelemetry - From frontend to backend
Opentelemetry - From frontend to backend
 
Google cloud Dataflow & Apache Flink
Google cloud Dataflow & Apache FlinkGoogle cloud Dataflow & Apache Flink
Google cloud Dataflow & Apache Flink
 
[NDC18] 야생의 땅 듀랑고의 데이터 엔지니어링 이야기: 로그 시스템 구축 경험 공유
[NDC18] 야생의 땅 듀랑고의 데이터 엔지니어링 이야기: 로그 시스템 구축 경험 공유[NDC18] 야생의 땅 듀랑고의 데이터 엔지니어링 이야기: 로그 시스템 구축 경험 공유
[NDC18] 야생의 땅 듀랑고의 데이터 엔지니어링 이야기: 로그 시스템 구축 경험 공유
 
Open core summit: Observability for data pipelines with OpenLineage
Open core summit: Observability for data pipelines with OpenLineageOpen core summit: Observability for data pipelines with OpenLineage
Open core summit: Observability for data pipelines with OpenLineage
 
Apache flink
Apache flinkApache flink
Apache flink
 
Apache Airflow
Apache AirflowApache Airflow
Apache Airflow
 
Introducing Apache Airflow and how we are using it
Introducing Apache Airflow and how we are using itIntroducing Apache Airflow and how we are using it
Introducing Apache Airflow and how we are using it
 
Machine Learning on Streaming Data using Kafka, Beam, and TensorFlow (Mikhail...
Machine Learning on Streaming Data using Kafka, Beam, and TensorFlow (Mikhail...Machine Learning on Streaming Data using Kafka, Beam, and TensorFlow (Mikhail...
Machine Learning on Streaming Data using Kafka, Beam, and TensorFlow (Mikhail...
 
CDC patterns in Apache Kafka®
CDC patterns in Apache Kafka®CDC patterns in Apache Kafka®
CDC patterns in Apache Kafka®
 
Running Airflow Workflows as ETL Processes on Hadoop
Running Airflow Workflows as ETL Processes on HadoopRunning Airflow Workflows as ETL Processes on Hadoop
Running Airflow Workflows as ETL Processes on Hadoop
 
Distributed tracing 101
Distributed tracing 101Distributed tracing 101
Distributed tracing 101
 
The Patterns of Distributed Logging and Containers
The Patterns of Distributed Logging and ContainersThe Patterns of Distributed Logging and Containers
The Patterns of Distributed Logging and Containers
 
Airflow를 이용한 데이터 Workflow 관리
Airflow를 이용한  데이터 Workflow 관리Airflow를 이용한  데이터 Workflow 관리
Airflow를 이용한 데이터 Workflow 관리
 
Nifi
NifiNifi
Nifi
 
Building a Virtual Data Lake with Apache Arrow
Building a Virtual Data Lake with Apache ArrowBuilding a Virtual Data Lake with Apache Arrow
Building a Virtual Data Lake with Apache Arrow
 
Data ingestion and distribution with apache NiFi
Data ingestion and distribution with apache NiFiData ingestion and distribution with apache NiFi
Data ingestion and distribution with apache NiFi
 
[NDC18] 야생의 땅 듀랑고의 데이터 엔지니어링 이야기: 로그 시스템 구축 경험 공유 (2부)
[NDC18] 야생의 땅 듀랑고의 데이터 엔지니어링 이야기: 로그 시스템 구축 경험 공유 (2부)[NDC18] 야생의 땅 듀랑고의 데이터 엔지니어링 이야기: 로그 시스템 구축 경험 공유 (2부)
[NDC18] 야생의 땅 듀랑고의 데이터 엔지니어링 이야기: 로그 시스템 구축 경험 공유 (2부)
 
Unified Stream and Batch Processing with Apache Flink
Unified Stream and Batch Processing with Apache FlinkUnified Stream and Batch Processing with Apache Flink
Unified Stream and Batch Processing with Apache Flink
 

Similar to Complex Event Processing with Esper

A Practical Event Driven Model
A Practical Event Driven ModelA Practical Event Driven Model
A Practical Event Driven Model
Xi Wu
 
ICIC 2013 New Product Introductions CEPT
ICIC 2013 New Product Introductions CEPTICIC 2013 New Product Introductions CEPT
ICIC 2013 New Product Introductions CEPT
Dr. Haxel Consult
 

Similar to Complex Event Processing with Esper (20)

Complex Event Processing with Esper
Complex Event Processing with EsperComplex Event Processing with Esper
Complex Event Processing with Esper
 
Complex Event Processing - A brief overview
Complex Event Processing - A brief overviewComplex Event Processing - A brief overview
Complex Event Processing - A brief overview
 
Creating a Context-Aware solution, Complex Event Processing with FIWARE Perseo
Creating a Context-Aware solution, Complex Event Processing with FIWARE PerseoCreating a Context-Aware solution, Complex Event Processing with FIWARE Perseo
Creating a Context-Aware solution, Complex Event Processing with FIWARE Perseo
 
Overview Of Parallel Development - Ericnel
Overview Of Parallel Development -  EricnelOverview Of Parallel Development -  Ericnel
Overview Of Parallel Development - Ericnel
 
A Practical Event Driven Model
A Practical Event Driven ModelA Practical Event Driven Model
A Practical Event Driven Model
 
Time Series Anomaly Detection with Azure and .NETT
Time Series Anomaly Detection with Azure and .NETTTime Series Anomaly Detection with Azure and .NETT
Time Series Anomaly Detection with Azure and .NETT
 
Do you have an "analytics"? How analytics tools work
Do you have an "analytics"? How analytics tools workDo you have an "analytics"? How analytics tools work
Do you have an "analytics"? How analytics tools work
 
Elasticsearch Performance Testing and Scaling @ Signal
Elasticsearch Performance Testing and Scaling @ SignalElasticsearch Performance Testing and Scaling @ Signal
Elasticsearch Performance Testing and Scaling @ Signal
 
IoT Supercharged: Complex event processing for MQTT with Eclipse technologies
IoT Supercharged: Complex event processing for MQTT with Eclipse technologiesIoT Supercharged: Complex event processing for MQTT with Eclipse technologies
IoT Supercharged: Complex event processing for MQTT with Eclipse technologies
 
Considerations for Abstracting Complexities of a Real-Time ML Platform, Zhenz...
Considerations for Abstracting Complexities of a Real-Time ML Platform, Zhenz...Considerations for Abstracting Complexities of a Real-Time ML Platform, Zhenz...
Considerations for Abstracting Complexities of a Real-Time ML Platform, Zhenz...
 
ICIC 2013 New Product Introductions CEPT
ICIC 2013 New Product Introductions CEPTICIC 2013 New Product Introductions CEPT
ICIC 2013 New Product Introductions CEPT
 
FIWARE Tech Summit - Complex Event Processing in FIWARE
FIWARE Tech Summit - Complex Event Processing in FIWAREFIWARE Tech Summit - Complex Event Processing in FIWARE
FIWARE Tech Summit - Complex Event Processing in FIWARE
 
ERP Concepts for Educational Systems
ERP Concepts for Educational SystemsERP Concepts for Educational Systems
ERP Concepts for Educational Systems
 
Scaling Security Threat Detection with Apache Spark and Databricks
Scaling Security Threat Detection with Apache Spark and DatabricksScaling Security Threat Detection with Apache Spark and Databricks
Scaling Security Threat Detection with Apache Spark and Databricks
 
Deep Dive Time Series Anomaly Detection in Azure with dotnet
Deep Dive Time Series Anomaly Detection in Azure with dotnetDeep Dive Time Series Anomaly Detection in Azure with dotnet
Deep Dive Time Series Anomaly Detection in Azure with dotnet
 
Are logs a software engineer’s best friend? Yes -- follow these best practices
Are logs a software engineer’s best friend? Yes -- follow these best practicesAre logs a software engineer’s best friend? Yes -- follow these best practices
Are logs a software engineer’s best friend? Yes -- follow these best practices
 
Complex event processing platform handling millions of users - Krzysztof Zarz...
Complex event processing platform handling millions of users - Krzysztof Zarz...Complex event processing platform handling millions of users - Krzysztof Zarz...
Complex event processing platform handling millions of users - Krzysztof Zarz...
 
Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...
Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...
Łukasz Romaszewski on Internet of Things Raspberry Pi and Java Embedded JavaC...
 
Building data "Py-pelines"
Building data "Py-pelines"Building data "Py-pelines"
Building data "Py-pelines"
 
Smarter internet of things with stream and event processing virtual io_t_meet...
Smarter internet of things with stream and event processing virtual io_t_meet...Smarter internet of things with stream and event processing virtual io_t_meet...
Smarter internet of things with stream and event processing virtual io_t_meet...
 

More from Ted Won

Jenkins X Hands-on - automated CI/CD solution for cloud native applications o...
Jenkins X Hands-on - automated CI/CD solution for cloud native applications o...Jenkins X Hands-on - automated CI/CD solution for cloud native applications o...
Jenkins X Hands-on - automated CI/CD solution for cloud native applications o...
Ted Won
 
JCO 11th 클라우드 환경에서 Java EE 운영 환경 구축하기
JCO 11th 클라우드 환경에서 Java EE 운영 환경 구축하기JCO 11th 클라우드 환경에서 Java EE 운영 환경 구축하기
JCO 11th 클라우드 환경에서 Java EE 운영 환경 구축하기
Ted Won
 

More from Ted Won (17)

Undertow RequestBufferingHandler 소개
Undertow RequestBufferingHandler 소개Undertow RequestBufferingHandler 소개
Undertow RequestBufferingHandler 소개
 
JBoss EAP 7 & JDG 7 최신 기술 소개
JBoss EAP 7 & JDG 7 최신 기술 소개JBoss EAP 7 & JDG 7 최신 기술 소개
JBoss EAP 7 & JDG 7 최신 기술 소개
 
JBoss Modules Internal
JBoss Modules InternalJBoss Modules Internal
JBoss Modules Internal
 
오픈 소스 컨트리뷰션 가이드
오픈 소스 컨트리뷰션 가이드오픈 소스 컨트리뷰션 가이드
오픈 소스 컨트리뷰션 가이드
 
Jenkins X Hands-on - automated CI/CD solution for cloud native applications o...
Jenkins X Hands-on - automated CI/CD solution for cloud native applications o...Jenkins X Hands-on - automated CI/CD solution for cloud native applications o...
Jenkins X Hands-on - automated CI/CD solution for cloud native applications o...
 
Jenkins X - automated CI/CD solution for cloud native applications on Kubernetes
Jenkins X - automated CI/CD solution for cloud native applications on KubernetesJenkins X - automated CI/CD solution for cloud native applications on Kubernetes
Jenkins X - automated CI/CD solution for cloud native applications on Kubernetes
 
Hawkular overview
Hawkular overviewHawkular overview
Hawkular overview
 
JDG 7 & Spark Integration
JDG 7 & Spark IntegrationJDG 7 & Spark Integration
JDG 7 & Spark Integration
 
지금 핫한 Real-time In-memory Stream Processing 이야기
지금 핫한 Real-time In-memory Stream Processing 이야기지금 핫한 Real-time In-memory Stream Processing 이야기
지금 핫한 Real-time In-memory Stream Processing 이야기
 
Nara - Personalized Web Recommendation Service Quick Review
Nara - Personalized Web Recommendation Service Quick ReviewNara - Personalized Web Recommendation Service Quick Review
Nara - Personalized Web Recommendation Service Quick Review
 
JBoss Community's Application Monitoring Platform
JBoss Community's Application Monitoring PlatformJBoss Community's Application Monitoring Platform
JBoss Community's Application Monitoring Platform
 
Real-time Big Data Analytics Practice with Unstructured Data
Real-time Big Data Analytics Practice with Unstructured DataReal-time Big Data Analytics Practice with Unstructured Data
Real-time Big Data Analytics Practice with Unstructured Data
 
Red Hat Forum 2012 - JBoss RHQ - Java Application Monitoring & Management Pla...
Red Hat Forum 2012 - JBoss RHQ - Java Application Monitoring & Management Pla...Red Hat Forum 2012 - JBoss RHQ - Java Application Monitoring & Management Pla...
Red Hat Forum 2012 - JBoss RHQ - Java Application Monitoring & Management Pla...
 
Building Real-time CEP Application with Open Source Projects
Building Real-time CEP Application with Open Source Projects Building Real-time CEP Application with Open Source Projects
Building Real-time CEP Application with Open Source Projects
 
JCO 11th 클라우드 환경에서 Java EE 운영 환경 구축하기
JCO 11th 클라우드 환경에서 Java EE 운영 환경 구축하기JCO 11th 클라우드 환경에서 Java EE 운영 환경 구축하기
JCO 11th 클라우드 환경에서 Java EE 운영 환경 구축하기
 
JBoss RHQ와 Byteman을 이용한 오픈소스 자바 애플리케이션 모니터링
JBoss RHQ와 Byteman을 이용한 오픈소스 자바 애플리케이션 모니터링JBoss RHQ와 Byteman을 이용한 오픈소스 자바 애플리케이션 모니터링
JBoss RHQ와 Byteman을 이용한 오픈소스 자바 애플리케이션 모니터링
 
RHQ 공감 Seminar 6th
RHQ 공감 Seminar 6thRHQ 공감 Seminar 6th
RHQ 공감 Seminar 6th
 

Recently uploaded

AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
Alluxio, Inc.
 

Recently uploaded (20)

AI Hackathon.pptx
AI                        Hackathon.pptxAI                        Hackathon.pptx
AI Hackathon.pptx
 
5 Reasons Driving Warehouse Management Systems Demand
5 Reasons Driving Warehouse Management Systems Demand5 Reasons Driving Warehouse Management Systems Demand
5 Reasons Driving Warehouse Management Systems Demand
 
Odoo vs Shopify: Why Odoo is Best for Ecommerce Website Builder in 2024
Odoo vs Shopify: Why Odoo is Best for Ecommerce Website Builder in 2024Odoo vs Shopify: Why Odoo is Best for Ecommerce Website Builder in 2024
Odoo vs Shopify: Why Odoo is Best for Ecommerce Website Builder in 2024
 
Workforce Efficiency with Employee Time Tracking Software.pdf
Workforce Efficiency with Employee Time Tracking Software.pdfWorkforce Efficiency with Employee Time Tracking Software.pdf
Workforce Efficiency with Employee Time Tracking Software.pdf
 
How to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabberHow to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabber
 
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdf
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdfStrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdf
StrimziCon 2024 - Transition to Apache Kafka on Kubernetes with Strimzi.pdf
 
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
 
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
Facemoji Keyboard released its 2023 State of Emoji report, outlining the most...
 
Modern binary build systems - PyCon 2024
Modern binary build systems - PyCon 2024Modern binary build systems - PyCon 2024
Modern binary build systems - PyCon 2024
 
Crafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationCrafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM Integration
 
10 Essential Software Testing Tools You Need to Know About.pdf
10 Essential Software Testing Tools You Need to Know About.pdf10 Essential Software Testing Tools You Need to Know About.pdf
10 Essential Software Testing Tools You Need to Know About.pdf
 
IT Software Development Resume, Vaibhav jha 2024
IT Software Development Resume, Vaibhav jha 2024IT Software Development Resume, Vaibhav jha 2024
IT Software Development Resume, Vaibhav jha 2024
 
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCAOpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
 
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdfThe Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
 
Naer Toolbar Redesign - Usability Research Synthesis
Naer Toolbar Redesign - Usability Research SynthesisNaer Toolbar Redesign - Usability Research Synthesis
Naer Toolbar Redesign - Usability Research Synthesis
 
Lessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdfLessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdf
 
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
 
AI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning Framework
 
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
 
Microsoft 365 Copilot; An AI tool changing the world of work _PDF.pdf
Microsoft 365 Copilot; An AI tool changing the world of work _PDF.pdfMicrosoft 365 Copilot; An AI tool changing the world of work _PDF.pdf
Microsoft 365 Copilot; An AI tool changing the world of work _PDF.pdf
 

Complex Event Processing with Esper

  • 1. Complex Event Processing with Esper Real-time Event Stream & Complex Event Processing tedwon
  • 2. 1. Church bells ringing... 2. Appearance of a man in a tuxedo with a woman in a flowing white gown... 3. Flower flying through the air. Concept of CEP
  • 3. Concept of CEP ● From these events CEP may infer a wedding. ● CEP as a technique helps discover complex events as a pattern by analyzing and correlating other events ● http://en.wikipedia.org/wiki/Complex_event_processing#Conceptual_description
  • 4. ● Algorithmic Stock-Trading ● Real-time Stock Tick monitoring ● Detection of credit-card fraud ● Real-time ETL processing ● Business activity monitoring ● Real-time Mobile Targeting Ad & Recommendation CEP Use Cases
  • 5. CEP is ● based EDA(Event-driven architecture) ● not Request & Response style system ● Detection & Reaction style system ● not Pre-save and Post-process paradigm ● Pre-process and Post-save paradigm ● Loosely-coupled system ● Asynchronous style processing paradigm ● Intelligence system
  • 6. Event Driven Architecture ● Software architecture pattern promoting the production, detection, consumption of, and reaction to events. eye,ear...sensory organs think,decision hand,foot...reaction
  • 7. EDA Event Process 1. SEP - Simple Event Processing a. JMS(Java Message Service) b. ESB(Enterprise Service Bus) 2. ESP - Event Stream Processing 3. CEP - Complex Event Processing
  • 8. ESP vs. CEP ● ESP ○ Monitor streams of event data, analyse those events, and act upon opportunities ○ Filtering, Aggregation, Join ○ Average of Google stock over the last (moving) 30min ● CEP ○ Detecting patterns among events ○ If this Google stock increased more than 5% two times followed by Apple stock decreased more than 10% then…
  • 9. CEP Open Source Projects ● JBoss Drools Fusion ○ Rule Script DSL ○ Java ● EsperTech Esper ○ SQL-like Script DSL ○ Java
  • 11. Open Source Esper ● Provide ESP/CEP Engine ● Provide SQL-like EPL(Event Processing Language) ● Well-documented reference ● Lightweight & Embeddable
  • 14. Esper Architecture ● Real-time ETL application ETL EPL (Extract, Transform, Load) Hadoop FileSystem API ImplThrift Server Impl
  • 15. Esper with Runtime ● Esper + Java EE Platform ● Java Standalone Instance ● Esper + OSGi Server
  • 16. Esper EPL Features ● Event filtering ● Sliding data windows ● Aggregation ● Pattern matching ● Joins and Outer Joins ● Subquery ● Reference historical data
  • 17. Esper EPL Example Order Top10 by item over last 30 min OrderEvent.win:time(30 min)from group by itemId select itemId, count(*) as cnt limit 10
  • 18. Esper EPL Example Continuous query OrderEvent.win:time(30 min)from group by itemId select itemId, count(*) as cnt limit 10
  • 20. MySQL native query EPL Join 06 EPL과 Adapter 개발 where users visit in Gangnam district over last one hour “Place Name!!” from LR.std:unique(assetId).win:time(1 hour) as lr, sql:db[select zone_name from ZoneName where zone=${lr.zone}] select assetId, zone_name where zone in (‘gangnam code’)
  • 21. Esper Pattern EPL Example select Part.zone from pattern [ every Part=CountZone(cnt in (1, 2)) -> ( not CountZone(zone=Part.zone, cnt in (0, 3)) and timer:interval(10 sec) )]
  • 23. Esper Quick Start Project
  • 24. Esper Quick Start Project
  • 26. References 1. https://en.wikipedia.org/wiki/Event-driven_architecture 2. http://en.wikipedia.org/wiki/Complex_event_processing 3. http://www.espertech.com/esper/quickstart.php 4. https://github.com/espertechinc/esper 5. http://www.hawkular.org/blog/2017/01/13/events-aggregation-extension.html 6. https://github.com/tedwon/cep-esper-quick-start 7. https://www.slideshare.net/matthewmccullough/complex-event-processing-with-esper