SlideShare uma empresa Scribd logo
1 de 22
Baixar para ler offline
<Insert Picture Here>




          A General Extension System for Event Processing Languages
          Alexandre Alves - Oracle CEP




Monday, July 11, 2011
Agenda                                                   DEBS2011



        • Scenario 1
              •   String manipulation (programming-in-the-small)
        • Blending CQL and Java
        • Architecture
        • Scenario 2            Text
              •   Geo-fence (extensibility)
        • Blending CQL and Spatial
        • Architecture
        • Q/A




Monday, July 11, 2011
Scenario 1:                                   DEBS2011
          Programming-in-the-small

        • Correlate security price changes to real-time event
          news.



                                  Text




Monday, July 11, 2011
Scenario 1:                   DEBS2011
          Programming-in-the-small
                                     Oracle CQL
                                     Processor

           SELECT *
           FROM            Text
           news [RANGE 1 HOUR],
           stock_tick [RANGE 1 HOUR]
           WHERE /* join-criteria */



Monday, July 11, 2011
Scenario 1:                                                   DEBS2011
          Programming-in-the-small

        • Problem: the NEWS feed is a unstructured (String),
          hence not trivial to identify its event properties
              •   For example, a naive join criteria is to look for a stock’s
                  symbol
        • The problem of parsing a String can be solved using
          Regular Expressions. Text
        • Regular Expressions and other programming-in-the-
          small tasks have long been solved by general
          purpose programming languages
        • Can we leverage this within an event processing
          language (e.g. CQL)?



Monday, July 11, 2011
Java Regular Expressions                                       DEBS2011



        • Let’s look at a simple solution to the problem using
          Java:


               Matcher matcher =
                                             Text
                    Pattern.compile("[.,; ][A-Z][A-Z][A-Z][.,; ]").matcher
                    (message);
               if (matcher.find()) {
                                                                             Matches three letter
                symbol = message.substring(matcher.start() + 1,              symbols, separated by
                                                                             leading and trailing
                    matcher.end() - 1));                                     white-spaces
               }




Monday, July 11, 2011
Blending CQL with Java                                      DEBS2011



       CREATE VIEW filtered_news(message, matcher) AS
       SELECT
        message,
        Pattern.compile("[.,; ][A-Z][A-Z][A-Z][.,; ]").matcher(message) as
       matcher
       FROM news [RANGE 1 HOUR] Text

       SELECT
        location, item_description, message
       FROM filtered_news, stock_tick[RANGE 1 HOUR]
       WHERE
        matcher.find() = true AND
        filtered_news.message.substring(matcher.start() + 1,
          matcher.end() - 1) = stock_tick.symbol



Monday, July 11, 2011
Blending CQL with Java                                     DEBS2011
                                                                 CQL char conversion
                                                                 to Java String

       CREATE VIEW filtered_news(message, matcher) AS
       SELECT
        message,
        Pattern.compile("[.,; ][A-Z][A-Z][A-Z][.,; ]").matcher(message) as matcher
       FROM news [RANGE 1 HOUR]
                                          Text
       SELECT
        location, item_description, message                      Method invocation
       FROM filtered_news, stock_tick[RANGE 1 HOUR]
       WHERE
        matcher.find() = true AND                                Static method
        filtered_news.message.substring(matcher.start() + 1,     invocation
          matcher.end() - 1) = stock_tick.symbol




Monday, July 11, 2011
Blending CQL with Java                                     DEBS2011


                                                                 ‘matcher’ is a Java
                                                                 Object, and treated as
       CREATE VIEW filtered_news(message, matcher) AS
                                                                 a complex type by
       SELECT                                                    CQL
        message,
        Pattern.compile("[.,; ][A-Z][A-Z][A-Z][.,; ]").matcher(message) as matcher
       FROM news [RANGE 1 HOUR]
                                          Text
       SELECT                                                     Overload of CQL ‘+’
        location, item_description, message                      operator to handle
       FROM filtered_news, stock_tick[RANGE 1 HOUR]              Java Integer
       WHERE
        matcher.find() = true AND                                Overload of CQL
        filtered_news.message.substring(matcher.start() + 1,     equality to handle
          matcher.end() - 1) = stock_tick.symbol                 Java String




Monday, July 11, 2011
Architecture                                                    DEBS2011




                  Pattern.compile("[.,; ][A-Z][A-Z][A-Z][.,; ]").matcher
                  Pattern.compile("[.,; ][A-Z][A-Z][A-Z][.,; ]").matcher(message)
                  (message)
        • Is this symbol:
              •                              Text
                   A stream attribute (e.g. message)?
              •    A stream alias (e.g. FROM S1 as A)
              •    A CQL function (e.g. SELECT myfunc())
              •    The l-value of complex type (e.g. myObj.myMethod())
              •    A constructor
              •    A (static) method
              •    A class name




Monday, July 11, 2011
Architecture                                                  DEBS2011




                Pattern.compile("[.,; ][A-Z][A-Z][A-Z][.,; ]").matcher
                Pattern.compile("[.,; ][A-Z][A-Z][A-Z][.,; ]").matcher(message)
                (message)
        • To be able to semantically compile symbols, we need
          to have type information.Text
        • However, CQL is not aware of Java, nor should it be.
        • There is a need of a generic type-system, and an
          extension model for providers to plug-in their own
          languages




Monday, July 11, 2011
Architecture                                   DEBS2011



                        CQL    Parser




                              Semantic         Type
                              Analyzer        Registry

                              Text

                                Code
                              Generator   Java
                                          Type-System




                               Code
                              Executor




Monday, July 11, 2011
Architecture                                                      DEBS2011




                Pattern.compile("[.,; ][A-Z][A-Z][A-Z][.,; ]").matcher
                Pattern.compile("[.,; ][A-Z][A-Z][A-Z][.,; ]").matcher(message)
                (message)

                                                              ComplexType

                 “Pattern”
                                             Text
                                          Type               fields
                                         Registry
                                                             methods




                                     Java
                                     Type-System




Monday, July 11, 2011
Architecture                                                      DEBS2011




                                                 ComplexType
                                                fields
    “Pattern”                Type
                            Registry
                                                methods



                                       Text
                        Java
                        Type-System

                                         CQL deals with a ‘complex type’ abstraction, and
                                         does not know of its ‘Java Language’ binding.




Monday, July 11, 2011
Architecture                                                  DEBS2011




                Pattern.compile("[.,; ][A-Z][A-Z][A-Z][.,; ]").matcher
                Pattern.compile("[.,; ][A-Z][A-Z][A-Z][.,; ]").matcher(message)
                (message)
                        Pattern
                  ComplexType
                 fields                      Text
                                         Find a “compile” method and its return type
                 methods




Monday, July 11, 2011
Architecture                                                   DEBS2011




                Pattern.compile("[.,; ][A-Z][A-Z][A-Z][.,; ]").matcher(message)


              Pattern                  Matcher
          ComplexType               ComplexType  Text
         fields                     fields                    Store ‘matcher’ as
         methods                   methods                  a stream/view attribute




Monday, July 11, 2011
Architecture                                                                      DEBS2011


                                             Extensible Language

                                              stream 1     *   attribute                      Type
                                                                           <<is-of>>



     ‘matcher’ is an attribute of the view
     of type ‘java.util.regex.Matcher’                                                   ComplexType


                                                  Text                                 <<metadata binding>>




                                                                               Extension Java Language

 CREATE VIEW filtered_news(message, matcher)
                                                                                          Java Class




Monday, July 11, 2011
Extensibility                                                          DEBS2011


                                  Extensible Language

                                   stream 1     *   attribute                      Type
                                                                <<is-of>>




                                                                              ComplexType


                                       Text                                 <<metadata binding>>




           How do we know which                                     Extension Java Language

           ‘language extension’ to use?
           How to provide new                                                  Java Class

           extensions?




Monday, July 11, 2011
Scenario 2:                                                   DEBS2011
          Spatial Integration

        • Targeted marketing for a mobile subscriber
              •   CEP application checks if the location of the subscriber is
                  within the distance of a registered shop


                                           Text
                                            Text


                                                               Oracle Spatial
                                                                    Shop
                                                            id: CHAR
                                                            geometry: SDO_GEOMETRY




Monday, July 11, 2011
Blending CQL with Spatial                                   DEBS2011




      CREATE VIEW CustomerLocation-Stream(point, custId) AS
      SELECT createPoint@spatial(lng, lat) as point, custId
      FROM Location-Stream
                                                              point is a spatial type
      SELECT loc.custId, shop.id         Text
      FROM
       CustomerLocation-Stream[NOW] AS loc, Shop as shop
      WHERE
       contain@spatial(shop.geometry, loc.point, 2.0d)   ‘spatial’ link points to
                                                              Oracle Spatial
                                                              ‘extension’, where
                                                              ‘contain’ function
                                                              resides




Monday, July 11, 2011
Architecture                                         DEBS2011



                                                       CQL
     CQL link specifies language
     extension, which are plugged
     into the system as a CQL
     cartridge

                                        Text                 <<link>>


                                                   CQL Cartridge
                                                      Cartridge


 contain@spatial(shop.geometry, loc.point, 2.0d)




Monday, July 11, 2011
Conclusion                                     DEBS2011



        • Blending of CQL with other languages allow for the
          creation of feature-rich CEP applications while still
          being highly descriptive
              •   Example:
                   • String manipulation using Java
                                          Text
                   • Geo-fencing using Oracle Spatial
        • Generic frameworks allows for the dynamic plugin of
          extensions (cartridges)




Monday, July 11, 2011

Mais conteúdo relacionado

Mais procurados

Mais procurados (18)

Vba functions
Vba functionsVba functions
Vba functions
 
Bean Intro
Bean IntroBean Intro
Bean Intro
 
Java beans
Java beansJava beans
Java beans
 
Xml session
Xml sessionXml session
Xml session
 
Go Faster With Native Compilation
Go Faster With Native CompilationGo Faster With Native Compilation
Go Faster With Native Compilation
 
Go faster with_native_compilation Part-2
Go faster with_native_compilation Part-2Go faster with_native_compilation Part-2
Go faster with_native_compilation Part-2
 
Java Beans
Java BeansJava Beans
Java Beans
 
JavaFX and Scala in the Cloud
JavaFX and Scala in the CloudJavaFX and Scala in the Cloud
JavaFX and Scala in the Cloud
 
Extending the Xbase Typesystem
Extending the Xbase TypesystemExtending the Xbase Typesystem
Extending the Xbase Typesystem
 
Jpa
JpaJpa
Jpa
 
Java Beans Unit 4(Part 1)
Java Beans Unit 4(Part 1)Java Beans Unit 4(Part 1)
Java Beans Unit 4(Part 1)
 
Introduction to JPA and Hibernate including examples
Introduction to JPA and Hibernate including examplesIntroduction to JPA and Hibernate including examples
Introduction to JPA and Hibernate including examples
 
En webinar jpa v2final
En webinar jpa v2finalEn webinar jpa v2final
En webinar jpa v2final
 
Sdtl manual
Sdtl manualSdtl manual
Sdtl manual
 
Modul Praktek Java OOP
Modul Praktek Java OOP Modul Praktek Java OOP
Modul Praktek Java OOP
 
Oop features java presentationshow
Oop features java presentationshowOop features java presentationshow
Oop features java presentationshow
 
Autonomous transaction
Autonomous transactionAutonomous transaction
Autonomous transaction
 
iOS overview
iOS overviewiOS overview
iOS overview
 

Destaque

Dealing with growing social demands in the mining industry
Dealing with growing social demands in the mining industryDealing with growing social demands in the mining industry
Dealing with growing social demands in the mining industryWayne Dunn
 
Englekirk Brochure
Englekirk BrochureEnglekirk Brochure
Englekirk Brochurekimtanouye
 
Plant Healthcare Client Report
Plant Healthcare Client ReportPlant Healthcare Client Report
Plant Healthcare Client Reportdavkearn
 
Discussion continuum - Dostep do leczenia
Discussion continuum - Dostep do leczeniaDiscussion continuum - Dostep do leczenia
Discussion continuum - Dostep do leczeniaXplore Health
 
Assignment 4 - Certification in Dispute Management
Assignment 4 - Certification in Dispute ManagementAssignment 4 - Certification in Dispute Management
Assignment 4 - Certification in Dispute ManagementJyotpreet Kaur
 
Multimedia01
Multimedia01Multimedia01
Multimedia01Les Davy
 
Kudavi 1.26.2016
Kudavi 1.26.2016Kudavi 1.26.2016
Kudavi 1.26.2016Tom Currier
 
Egoera: La economía de Bizkaia - Marzo 2016 - nº21
Egoera: La economía de Bizkaia - Marzo 2016 - nº21Egoera: La economía de Bizkaia - Marzo 2016 - nº21
Egoera: La economía de Bizkaia - Marzo 2016 - nº21Cámara de Comercio de Bilbao
 
Conversation01
Conversation01Conversation01
Conversation01Les Davy
 
Intravert Server side processing for Cassandra
Intravert Server side processing for CassandraIntravert Server side processing for Cassandra
Intravert Server side processing for CassandraEdward Capriolo
 
Training company une partnerships
Training company   une partnershipsTraining company   une partnerships
Training company une partnershipsjohnarthur101
 
하비인사업계획서0624홍보
하비인사업계획서0624홍보하비인사업계획서0624홍보
하비인사업계획서0624홍보비인 하
 
An Ounce of Prevention
An Ounce of PreventionAn Ounce of Prevention
An Ounce of Preventionmarinabooh
 
Desejo sexual com mais de 45 anos
Desejo sexual com mais de 45 anosDesejo sexual com mais de 45 anos
Desejo sexual com mais de 45 anosJosé Roberto Sousa
 

Destaque (20)

Dealing with growing social demands in the mining industry
Dealing with growing social demands in the mining industryDealing with growing social demands in the mining industry
Dealing with growing social demands in the mining industry
 
Englekirk Brochure
Englekirk BrochureEnglekirk Brochure
Englekirk Brochure
 
Kkk1
Kkk1Kkk1
Kkk1
 
Notam 01-01-17
Notam 01-01-17Notam 01-01-17
Notam 01-01-17
 
Plant Healthcare Client Report
Plant Healthcare Client ReportPlant Healthcare Client Report
Plant Healthcare Client Report
 
Discussion continuum - Dostep do leczenia
Discussion continuum - Dostep do leczeniaDiscussion continuum - Dostep do leczenia
Discussion continuum - Dostep do leczenia
 
Assignment 4 - Certification in Dispute Management
Assignment 4 - Certification in Dispute ManagementAssignment 4 - Certification in Dispute Management
Assignment 4 - Certification in Dispute Management
 
Multimedia01
Multimedia01Multimedia01
Multimedia01
 
Notam 05 02-16
Notam 05 02-16Notam 05 02-16
Notam 05 02-16
 
Kudavi 1.26.2016
Kudavi 1.26.2016Kudavi 1.26.2016
Kudavi 1.26.2016
 
Egoera: La economía de Bizkaia - Marzo 2016 - nº21
Egoera: La economía de Bizkaia - Marzo 2016 - nº21Egoera: La economía de Bizkaia - Marzo 2016 - nº21
Egoera: La economía de Bizkaia - Marzo 2016 - nº21
 
Conversation01
Conversation01Conversation01
Conversation01
 
Традо питание по дошам
Традо питание по дошамТрадо питание по дошам
Традо питание по дошам
 
Intravert Server side processing for Cassandra
Intravert Server side processing for CassandraIntravert Server side processing for Cassandra
Intravert Server side processing for Cassandra
 
Training company une partnerships
Training company   une partnershipsTraining company   une partnerships
Training company une partnerships
 
Mm wcmc v12
Mm wcmc v12Mm wcmc v12
Mm wcmc v12
 
하비인사업계획서0624홍보
하비인사업계획서0624홍보하비인사업계획서0624홍보
하비인사업계획서0624홍보
 
An Ounce of Prevention
An Ounce of PreventionAn Ounce of Prevention
An Ounce of Prevention
 
Umbrella campaign
Umbrella campaignUmbrella campaign
Umbrella campaign
 
Desejo sexual com mais de 45 anos
Desejo sexual com mais de 45 anosDesejo sexual com mais de 45 anos
Desejo sexual com mais de 45 anos
 

Semelhante a A General Extension System for Event Processing Languages

Clojure talk at Münster JUG
Clojure talk at Münster JUGClojure talk at Münster JUG
Clojure talk at Münster JUGAlex Ott
 
Clojure for Java developers
Clojure for Java developersClojure for Java developers
Clojure for Java developersJohn Stevenson
 
scalaliftoff2009.pdf
scalaliftoff2009.pdfscalaliftoff2009.pdf
scalaliftoff2009.pdfHiroshi Ono
 
scalaliftoff2009.pdf
scalaliftoff2009.pdfscalaliftoff2009.pdf
scalaliftoff2009.pdfHiroshi Ono
 
scalaliftoff2009.pdf
scalaliftoff2009.pdfscalaliftoff2009.pdf
scalaliftoff2009.pdfHiroshi Ono
 
scalaliftoff2009.pdf
scalaliftoff2009.pdfscalaliftoff2009.pdf
scalaliftoff2009.pdfHiroshi Ono
 
JavaScript Editions ES7, ES8 and ES9 vs V8
JavaScript Editions ES7, ES8 and ES9 vs V8JavaScript Editions ES7, ES8 and ES9 vs V8
JavaScript Editions ES7, ES8 and ES9 vs V8Rafael Casuso Romate
 
An overview of java script in 2015 (ecma script 6)
An overview of java script in 2015 (ecma script 6)An overview of java script in 2015 (ecma script 6)
An overview of java script in 2015 (ecma script 6)LearningTech
 
Clojure made-simple - John Stevenson
Clojure made-simple - John StevensonClojure made-simple - John Stevenson
Clojure made-simple - John StevensonJAX London
 
Clojure - An Introduction for Java Programmers
Clojure - An Introduction for Java ProgrammersClojure - An Introduction for Java Programmers
Clojure - An Introduction for Java Programmerselliando dias
 
Reactive cocoa
Reactive cocoaReactive cocoa
Reactive cocoagillygize
 
An Introduction to Scala - Blending OO and Functional Paradigms
An Introduction to Scala - Blending OO and Functional ParadigmsAn Introduction to Scala - Blending OO and Functional Paradigms
An Introduction to Scala - Blending OO and Functional ParadigmsMiles Sabin
 
Kings 120711
Kings 120711Kings 120711
Kings 120711ClarkTony
 
Clojure - A new Lisp
Clojure - A new LispClojure - A new Lisp
Clojure - A new Lispelliando dias
 
Sql Summit Clr, Service Broker And Xml
Sql Summit   Clr, Service Broker And XmlSql Summit   Clr, Service Broker And Xml
Sql Summit Clr, Service Broker And XmlDavid Truxall
 

Semelhante a A General Extension System for Event Processing Languages (20)

Clojure talk at Münster JUG
Clojure talk at Münster JUGClojure talk at Münster JUG
Clojure talk at Münster JUG
 
Clojure for Java developers
Clojure for Java developersClojure for Java developers
Clojure for Java developers
 
scalaliftoff2009.pdf
scalaliftoff2009.pdfscalaliftoff2009.pdf
scalaliftoff2009.pdf
 
scalaliftoff2009.pdf
scalaliftoff2009.pdfscalaliftoff2009.pdf
scalaliftoff2009.pdf
 
scalaliftoff2009.pdf
scalaliftoff2009.pdfscalaliftoff2009.pdf
scalaliftoff2009.pdf
 
scalaliftoff2009.pdf
scalaliftoff2009.pdfscalaliftoff2009.pdf
scalaliftoff2009.pdf
 
JavaScript Editions ES7, ES8 and ES9 vs V8
JavaScript Editions ES7, ES8 and ES9 vs V8JavaScript Editions ES7, ES8 and ES9 vs V8
JavaScript Editions ES7, ES8 and ES9 vs V8
 
An overview of java script in 2015 (ecma script 6)
An overview of java script in 2015 (ecma script 6)An overview of java script in 2015 (ecma script 6)
An overview of java script in 2015 (ecma script 6)
 
Seeking Clojure
Seeking ClojureSeeking Clojure
Seeking Clojure
 
Clojure made-simple - John Stevenson
Clojure made-simple - John StevensonClojure made-simple - John Stevenson
Clojure made-simple - John Stevenson
 
Clojure
ClojureClojure
Clojure
 
Clojure - An Introduction for Java Programmers
Clojure - An Introduction for Java ProgrammersClojure - An Introduction for Java Programmers
Clojure - An Introduction for Java Programmers
 
Reactive cocoa
Reactive cocoaReactive cocoa
Reactive cocoa
 
ICSM07.ppt
ICSM07.pptICSM07.ppt
ICSM07.ppt
 
An Introduction to Scala - Blending OO and Functional Paradigms
An Introduction to Scala - Blending OO and Functional ParadigmsAn Introduction to Scala - Blending OO and Functional Paradigms
An Introduction to Scala - Blending OO and Functional Paradigms
 
Kings 120711
Kings 120711Kings 120711
Kings 120711
 
Clojure - A new Lisp
Clojure - A new LispClojure - A new Lisp
Clojure - A new Lisp
 
Java 7
Java 7Java 7
Java 7
 
Sql Summit Clr, Service Broker And Xml
Sql Summit   Clr, Service Broker And XmlSql Summit   Clr, Service Broker And Xml
Sql Summit Clr, Service Broker And Xml
 
What's new in Java EE 6
What's new in Java EE 6What's new in Java EE 6
What's new in Java EE 6
 

Mais de Alexandre de Castro Alves (7)

A Guideline to Statistical and Machine Learning
A Guideline to Statistical and Machine LearningA Guideline to Statistical and Machine Learning
A Guideline to Statistical and Machine Learning
 
Developing Modular Systems using OSGi
Developing Modular Systems using OSGiDeveloping Modular Systems using OSGi
Developing Modular Systems using OSGi
 
Speeding up big data with event processing
Speeding up big data with event processingSpeeding up big data with event processing
Speeding up big data with event processing
 
Ts 4783 1
Ts 4783 1Ts 4783 1
Ts 4783 1
 
Bpel4 Ws 1.1 To Ws Bpel 2.0
Bpel4 Ws 1.1 To Ws Bpel 2.0Bpel4 Ws 1.1 To Ws Bpel 2.0
Bpel4 Ws 1.1 To Ws Bpel 2.0
 
Introduction to OSGi
Introduction to OSGiIntroduction to OSGi
Introduction to OSGi
 
Alves Mea Pch1 Free
Alves Mea Pch1 FreeAlves Mea Pch1 Free
Alves Mea Pch1 Free
 

Último

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 

Último (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 

A General Extension System for Event Processing Languages

  • 1. <Insert Picture Here> A General Extension System for Event Processing Languages Alexandre Alves - Oracle CEP Monday, July 11, 2011
  • 2. Agenda DEBS2011 • Scenario 1 • String manipulation (programming-in-the-small) • Blending CQL and Java • Architecture • Scenario 2 Text • Geo-fence (extensibility) • Blending CQL and Spatial • Architecture • Q/A Monday, July 11, 2011
  • 3. Scenario 1: DEBS2011 Programming-in-the-small • Correlate security price changes to real-time event news. Text Monday, July 11, 2011
  • 4. Scenario 1: DEBS2011 Programming-in-the-small Oracle CQL Processor SELECT * FROM Text news [RANGE 1 HOUR], stock_tick [RANGE 1 HOUR] WHERE /* join-criteria */ Monday, July 11, 2011
  • 5. Scenario 1: DEBS2011 Programming-in-the-small • Problem: the NEWS feed is a unstructured (String), hence not trivial to identify its event properties • For example, a naive join criteria is to look for a stock’s symbol • The problem of parsing a String can be solved using Regular Expressions. Text • Regular Expressions and other programming-in-the- small tasks have long been solved by general purpose programming languages • Can we leverage this within an event processing language (e.g. CQL)? Monday, July 11, 2011
  • 6. Java Regular Expressions DEBS2011 • Let’s look at a simple solution to the problem using Java: Matcher matcher = Text Pattern.compile("[.,; ][A-Z][A-Z][A-Z][.,; ]").matcher (message); if (matcher.find()) { Matches three letter symbol = message.substring(matcher.start() + 1, symbols, separated by leading and trailing matcher.end() - 1)); white-spaces } Monday, July 11, 2011
  • 7. Blending CQL with Java DEBS2011 CREATE VIEW filtered_news(message, matcher) AS SELECT message, Pattern.compile("[.,; ][A-Z][A-Z][A-Z][.,; ]").matcher(message) as matcher FROM news [RANGE 1 HOUR] Text SELECT location, item_description, message FROM filtered_news, stock_tick[RANGE 1 HOUR] WHERE matcher.find() = true AND filtered_news.message.substring(matcher.start() + 1, matcher.end() - 1) = stock_tick.symbol Monday, July 11, 2011
  • 8. Blending CQL with Java DEBS2011 CQL char conversion to Java String CREATE VIEW filtered_news(message, matcher) AS SELECT message, Pattern.compile("[.,; ][A-Z][A-Z][A-Z][.,; ]").matcher(message) as matcher FROM news [RANGE 1 HOUR] Text SELECT location, item_description, message Method invocation FROM filtered_news, stock_tick[RANGE 1 HOUR] WHERE matcher.find() = true AND Static method filtered_news.message.substring(matcher.start() + 1, invocation matcher.end() - 1) = stock_tick.symbol Monday, July 11, 2011
  • 9. Blending CQL with Java DEBS2011 ‘matcher’ is a Java Object, and treated as CREATE VIEW filtered_news(message, matcher) AS a complex type by SELECT CQL message, Pattern.compile("[.,; ][A-Z][A-Z][A-Z][.,; ]").matcher(message) as matcher FROM news [RANGE 1 HOUR] Text SELECT Overload of CQL ‘+’ location, item_description, message operator to handle FROM filtered_news, stock_tick[RANGE 1 HOUR] Java Integer WHERE matcher.find() = true AND Overload of CQL filtered_news.message.substring(matcher.start() + 1, equality to handle matcher.end() - 1) = stock_tick.symbol Java String Monday, July 11, 2011
  • 10. Architecture DEBS2011 Pattern.compile("[.,; ][A-Z][A-Z][A-Z][.,; ]").matcher Pattern.compile("[.,; ][A-Z][A-Z][A-Z][.,; ]").matcher(message) (message) • Is this symbol: • Text A stream attribute (e.g. message)? • A stream alias (e.g. FROM S1 as A) • A CQL function (e.g. SELECT myfunc()) • The l-value of complex type (e.g. myObj.myMethod()) • A constructor • A (static) method • A class name Monday, July 11, 2011
  • 11. Architecture DEBS2011 Pattern.compile("[.,; ][A-Z][A-Z][A-Z][.,; ]").matcher Pattern.compile("[.,; ][A-Z][A-Z][A-Z][.,; ]").matcher(message) (message) • To be able to semantically compile symbols, we need to have type information.Text • However, CQL is not aware of Java, nor should it be. • There is a need of a generic type-system, and an extension model for providers to plug-in their own languages Monday, July 11, 2011
  • 12. Architecture DEBS2011 CQL Parser Semantic Type Analyzer Registry Text Code Generator Java Type-System Code Executor Monday, July 11, 2011
  • 13. Architecture DEBS2011 Pattern.compile("[.,; ][A-Z][A-Z][A-Z][.,; ]").matcher Pattern.compile("[.,; ][A-Z][A-Z][A-Z][.,; ]").matcher(message) (message) ComplexType “Pattern” Text Type fields Registry methods Java Type-System Monday, July 11, 2011
  • 14. Architecture DEBS2011 ComplexType fields “Pattern” Type Registry methods Text Java Type-System CQL deals with a ‘complex type’ abstraction, and does not know of its ‘Java Language’ binding. Monday, July 11, 2011
  • 15. Architecture DEBS2011 Pattern.compile("[.,; ][A-Z][A-Z][A-Z][.,; ]").matcher Pattern.compile("[.,; ][A-Z][A-Z][A-Z][.,; ]").matcher(message) (message) Pattern ComplexType fields Text Find a “compile” method and its return type methods Monday, July 11, 2011
  • 16. Architecture DEBS2011 Pattern.compile("[.,; ][A-Z][A-Z][A-Z][.,; ]").matcher(message) Pattern Matcher ComplexType ComplexType Text fields fields Store ‘matcher’ as methods methods a stream/view attribute Monday, July 11, 2011
  • 17. Architecture DEBS2011 Extensible Language stream 1 * attribute Type <<is-of>> ‘matcher’ is an attribute of the view of type ‘java.util.regex.Matcher’ ComplexType Text <<metadata binding>> Extension Java Language CREATE VIEW filtered_news(message, matcher) Java Class Monday, July 11, 2011
  • 18. Extensibility DEBS2011 Extensible Language stream 1 * attribute Type <<is-of>> ComplexType Text <<metadata binding>> How do we know which Extension Java Language ‘language extension’ to use? How to provide new Java Class extensions? Monday, July 11, 2011
  • 19. Scenario 2: DEBS2011 Spatial Integration • Targeted marketing for a mobile subscriber • CEP application checks if the location of the subscriber is within the distance of a registered shop Text Text Oracle Spatial Shop id: CHAR geometry: SDO_GEOMETRY Monday, July 11, 2011
  • 20. Blending CQL with Spatial DEBS2011 CREATE VIEW CustomerLocation-Stream(point, custId) AS SELECT createPoint@spatial(lng, lat) as point, custId FROM Location-Stream point is a spatial type SELECT loc.custId, shop.id Text FROM CustomerLocation-Stream[NOW] AS loc, Shop as shop WHERE contain@spatial(shop.geometry, loc.point, 2.0d) ‘spatial’ link points to Oracle Spatial ‘extension’, where ‘contain’ function resides Monday, July 11, 2011
  • 21. Architecture DEBS2011 CQL CQL link specifies language extension, which are plugged into the system as a CQL cartridge Text <<link>> CQL Cartridge Cartridge contain@spatial(shop.geometry, loc.point, 2.0d) Monday, July 11, 2011
  • 22. Conclusion DEBS2011 • Blending of CQL with other languages allow for the creation of feature-rich CEP applications while still being highly descriptive • Example: • String manipulation using Java Text • Geo-fencing using Oracle Spatial • Generic frameworks allows for the dynamic plugin of extensions (cartridges) Monday, July 11, 2011