SlideShare a Scribd company logo
1 of 17
Download to read offline
Politecnico di Torino
                                                          Dip. Automatica e Informatica


                                                                         Torino, Italy
The 3rd International Conference on
Ambient Systems, Networks and Technologies

August 27-29, 2012, Niagara Falls, Ontario, Canada
                                                                                      http://elite.polito.it




                                                 spChains:
                  A Declarative Framework for Data Stream
                       Processing in Pervasive Applications

                                                     Dario Bonino, Fulvio Corno
Goals
       Enable real-time ambient & sensor data processing
       Allow AmI designers to easily specify required
        computations
       Provide an extensible open source processing library




    2                      ANT’2012, Niagara Falls, Canada     spChains
Outline
       Motivation and Background
       Stream processing
       spChains Framework
       Use cases
       Conclusions




    3                     ANT’2012, Niagara Falls, Canada   spChains
Motivation
       Ambient Intelligence Systems
           100’s or 1,000’s of sensors
           Different physical quantities (ºC, %H2O, kW, kWh, …)
           Sampling frequencies from seconds to minutes
       Huge stream of data being generated
           Storage and retrieval
           On-line processing
           Off-line processing
           Analytics




    4                           ANT’2012, Niagara Falls, Canada    spChains
On-line processing: Applications
       Data Decimation (from kHz to mHz)
           Aggregation (over time, over space, over sensor types)
           Averaging
       Feeding User Displays and Dashboards
           Computing up-to-date and user-meaningful information
       Monitoring and Alerting
           Checking Thresholds
           Generating Alert messages
       Virtual Sensors
           Computing derivative quantities


    5                          ANT’2012, Niagara Falls, Canada       spChains
Requirements
       Input: up to 10,000-100,000 events/second
       Data: real-valued quantities, explicit units of measure
       Output: real-valued or Boolean, often at much lower
        frequency
       Computation: custom-defined depending on the
        application requirements
       Operators: reusable standard temporal operations
        applicable to data streams
       Usability: should not require database expert to define
        computations, domain experts must be autonomous


    6                      ANT’2012, Niagara Falls, Canada   spChains
Technology scouting
       Standard Relational DBMS                  Custom programming
           Good for storage                          Perfect fit with application
           Not efficient for                          requirements
            computations                              Very expensive to
           Rely on central servers                    customize
       NoSQL approaches                          Stream Processing
           Great for storage                         No storage
           May do computations,                      Excellent for computations
            require custom                            Requires custom expertise
            programming and expertise
           Rely on central (or cloud)
            servers

    7                          ANT’2012, Niagara Falls, Canada                 spChains
Stream Processing
(or Complex Event Processing, CEP)
       Event processing: tracking and analyzing streams of data
        «events», and deriving a conclusion from them
       Defines a set of (fixed) queries
       Event streams are analyzed in real time (often with in-
        memory processing) according to the programmed queries
       Guarantees fast and scalable processing
       Increasingly adopted in different domains: Business Process
        Management, Recommender Systems, Financial Services, Time
        Series, …
       Several tools available (commercial and open source)
       Specific skills needed to write efficient queries, in tool-
        dependent languages
    8                       ANT’2012, Niagara Falls, Canada    spChains
Stream Processing
(or Complex Event Processing, CEP)
       Event processing: tracking and analyzing streams of data
        «events», and deriving a conclusion from them
                 insert into RealEvent(src, streamName, value,
       Defines a set of (fixed) queries
                 unitOfMeasure) select ‘‘Average’’,
                 ‘‘Average-out’’, avg(value) as value,
       Event streams are analyzed in real(streamName=’’M1’’). in-
                 unitOfMeasure from realEvent time (often with
        memorywin:time_batch(‘‘1h’’) to the programmed queries
                  processing) according
                 group by src, streamName, unitOfMeasure;
       Guarantees fast and scalable processing
                 insert into BooleanEvent(src, streamName,
                 booleanValue) select ‘‘Threshold’’,
       Increasingly adopted in different domains: Business Process
                 ‘‘Threshold-out’’ as streamName, true as value from pattern
                 [every (oldSample=RealEvent(
        Management, Recommender Systems, Financial Services, Time
                 streamName=‘‘Average-out’’,
        Series, …MeasureEventComparator.compareToMeasure(oldSample,‘‘1kW’’,
                 EventComparisonEnum.LESS_THAN_OR_EQUAL)) ->
       Several tools available (commercial and open source)
                 newSample=RealEvent(streamName=oldSample.streamName,
                 MeasureEventComparator.compareToMeasure(newSample,‘‘1kW’’,
       Specific skills needed to write efficient queries, in tool-
                 EventComparisonEnum.GREATER_THAN)))].win:length(2);
        dependent languages
    9                          ANT’2012, Niagara Falls, Canada         spChains
Proposed approach (1)
    Stream Processing for event data processing in real time
    (Extensible) Library of predefined operators (spBlocks)
    Declarative framework (spChains) to express the
     required computations
        Each Computation = Stream Processing Chain
        Chain = Sequence of Stream Processing Blocks
        Block = predefined operator, configured with parameters




    10                      ANT’2012, Niagara Falls, Canada        spChains
Proposed approach (2)
      The set of spChains is described as a simple XML file
      All chains are automatically mapped to Stream
       Processing queries
<spXML:blocks>                                   insert into RealEvent(src, streamName, value,
                                                 unitOfMeasure) select ‘‘Average’’,
  <spXML:block id="Avg1“                         ‘‘Average-out’’, avg(value) as value,
    function="AVERAGE">                          unitOfMeasure from realEvent
  <spXML:param name="window" value="1“           (streamName=’’M1’’).
                                                 win:time_batch(‘‘1h’’)
    unitOfMeasure="h"/>                          group by src, streamName, unitOfMeasure;
  <spXML:param name="mode“                       insert into BooleanEvent(src, streamName,
    value="batch"/>                              booleanValue) select ‘‘Threshold’’,
                                                 ‘‘Threshold-out’’ as streamName, true as value
</spXML:block>                                   from pattern [every (oldSample=RealEvent(
                                                 streamName=‘‘Average-out’’,
<spXML:block id="Th1“                            MeasureEventComparator.compareToMeasure(oldSamp
                                                 le,‘‘1kW’’,
  function="THRESHOLD">                          EventComparisonEnum.LESS_THAN_OR_EQUAL)) ->
  <spXML:param name="threshold“                  newSample=RealEvent(streamName=oldSample.stream
  value="1" unitOfMeasure="kW"/>                 Name,
                                                 MeasureEventComparator.compareToMeasure(newSamp
</spXML:block>                                   le,‘‘1kW’’,
                                                 EventComparisonEnum.GREATER_THAN)))].win:length
</spXML:blocks>                                  (2);
     11                      ANT’2012, Niagara Falls, Canada                        spChains
spChains Framework

                                                     spBlocks



                                                         Stream                      Pattern Match / Alerts
                                                        Processing
                                                          Block


                                                                                                               Pervasive
                                     Event Sources
                                                                                                              application




                                                                      Event Drains
                    Environmental                         Stream                     Aggregate / Computed         (s)           Final Users
                         Data                            Processing                        Measures
                                                           Chains




Pervasive/Ubiquitous Communication
Infrastructure


                                                                                        Chain Definition




     12                                    ANT’2012, Niagara Falls, Canada                                                  spChains
Basic spBlock Library




13            ANT’2012, Niagara Falls, Canada   spChains
Examples of spChains




14           ANT’2012, Niagara Falls, Canada   spChains
Examples of spChains




         <spXML:blockid = "Avg1" function = "AVERAGE">
           <spXML:param name = "window"
                        value = "1"
                        unitOfMeasure = "h" / >
           <spXML:param name = "mode"
                        value = "batch" />
         </spXML:block>
15            ANT’2012, Niagara Falls, Canada   spChains
Implementation
    Java spChains library (Apache v2.0 license)
        Core library                                  http://elite.polito.it/spchains
        Esper bindings
        Basic spBlock library
        Scales up to 200 k events/sec
    Already in use
        3 different data centers, running on embedded PCs
        Monitoring environment, electrical power consumption,
         thermal flows (heating and cooling), polled by means of the
         Dog2.x multiprotocol gateway
        Computed quantity are “pushed” to Web Service collectors
        Over 3 months of uptime, no issues found
    16                      ANT’2012, Niagara Falls, Canada                  spChains
Conclusions
    Complex computations in
     the field and in real time
    Efficient and easy to
     integrate
    Lowered the barrier to
     adoption of Stream
     Processing

    Future work                                       http://elite.polito.it

        User interface                                http://elite.polito.it/spchains

        Large-scale installations                     fulvio.corno@polito.it
                                                       dario.bonino@polito.it
    17                        ANT’2012, Niagara Falls, Canada                    spChains

More Related Content

Similar to spChains: A Declarative Framework for Data Stream Processing in Pervasive Applications

Apache Beam: A unified model for batch and stream processing data
Apache Beam: A unified model for batch and stream processing dataApache Beam: A unified model for batch and stream processing data
Apache Beam: A unified model for batch and stream processing dataDataWorks Summit/Hadoop Summit
 
Intelligent Monitoring
Intelligent MonitoringIntelligent Monitoring
Intelligent MonitoringIntelie
 
NoLambda: Combining Streaming, Ad-Hoc, Machine Learning and Batch Analysis
NoLambda: Combining Streaming, Ad-Hoc, Machine Learning and Batch AnalysisNoLambda: Combining Streaming, Ad-Hoc, Machine Learning and Batch Analysis
NoLambda: Combining Streaming, Ad-Hoc, Machine Learning and Batch AnalysisHelena Edelson
 
[DSC Europe 23] Pramod Immaneni - Real-time analytics at IoT scale
[DSC Europe 23] Pramod Immaneni - Real-time analytics at IoT scale[DSC Europe 23] Pramod Immaneni - Real-time analytics at IoT scale
[DSC Europe 23] Pramod Immaneni - Real-time analytics at IoT scaleDataScienceConferenc1
 
Streaming data analytics (Kinesis, EMR/Spark) - Pop-up Loft Tel Aviv
Streaming data analytics (Kinesis, EMR/Spark) - Pop-up Loft Tel Aviv Streaming data analytics (Kinesis, EMR/Spark) - Pop-up Loft Tel Aviv
Streaming data analytics (Kinesis, EMR/Spark) - Pop-up Loft Tel Aviv Amazon Web Services
 
Dataservices: Processing (Big) Data the Microservice Way
Dataservices: Processing (Big) Data the Microservice WayDataservices: Processing (Big) Data the Microservice Way
Dataservices: Processing (Big) Data the Microservice WayQAware GmbH
 
SnappyData at Spark Summit 2017
SnappyData at Spark Summit 2017SnappyData at Spark Summit 2017
SnappyData at Spark Summit 2017Jags Ramnarayan
 
SnappyData, the Spark Database. A unified cluster for streaming, transactions...
SnappyData, the Spark Database. A unified cluster for streaming, transactions...SnappyData, the Spark Database. A unified cluster for streaming, transactions...
SnappyData, the Spark Database. A unified cluster for streaming, transactions...SnappyData
 
Awesome Banking API's
Awesome Banking API'sAwesome Banking API's
Awesome Banking API'sNatalino Busa
 
Cortana Analytics Workshop: Real-Time Data Processing -- How Do I Choose the ...
Cortana Analytics Workshop: Real-Time Data Processing -- How Do I Choose the ...Cortana Analytics Workshop: Real-Time Data Processing -- How Do I Choose the ...
Cortana Analytics Workshop: Real-Time Data Processing -- How Do I Choose the ...MSAdvAnalytics
 
Hadoop metric을 이용한 알람 개발
Hadoop metric을 이용한 알람 개발Hadoop metric을 이용한 알람 개발
Hadoop metric을 이용한 알람 개발효근 박
 
Big data reactive streams and OSGi - M Rulli
Big data reactive streams and OSGi - M RulliBig data reactive streams and OSGi - M Rulli
Big data reactive streams and OSGi - M Rullimfrancis
 
ML on Big Data: Real-Time Analysis on Time Series
ML on Big Data: Real-Time Analysis on Time SeriesML on Big Data: Real-Time Analysis on Time Series
ML on Big Data: Real-Time Analysis on Time SeriesSigmoid
 
Flink Forward San Francisco 2018: David Reniz & Dahyr Vergara - "Real-time m...
Flink Forward San Francisco 2018:  David Reniz & Dahyr Vergara - "Real-time m...Flink Forward San Francisco 2018:  David Reniz & Dahyr Vergara - "Real-time m...
Flink Forward San Francisco 2018: David Reniz & Dahyr Vergara - "Real-time m...Flink Forward
 
WSO2 Product Release Webinar - Introducing the WSO2 Complex Event Processor
WSO2 Product Release Webinar - Introducing the WSO2 Complex Event Processor WSO2 Product Release Webinar - Introducing the WSO2 Complex Event Processor
WSO2 Product Release Webinar - Introducing the WSO2 Complex Event Processor WSO2
 
Stream Analytics
Stream Analytics Stream Analytics
Stream Analytics Franco Ucci
 
Open Source Event Processing for Sensor Fusion Applications
Open Source Event Processing for Sensor Fusion ApplicationsOpen Source Event Processing for Sensor Fusion Applications
Open Source Event Processing for Sensor Fusion Applicationsguestc4ce526
 
Soa12c launch 5 event processing shmakov eng cr
Soa12c launch 5 event processing shmakov eng crSoa12c launch 5 event processing shmakov eng cr
Soa12c launch 5 event processing shmakov eng crVasily Demin
 
Real-time Analytics for Data-Driven Applications
Real-time Analytics for Data-Driven ApplicationsReal-time Analytics for Data-Driven Applications
Real-time Analytics for Data-Driven ApplicationsVMware Tanzu
 

Similar to spChains: A Declarative Framework for Data Stream Processing in Pervasive Applications (20)

Apache Beam: A unified model for batch and stream processing data
Apache Beam: A unified model for batch and stream processing dataApache Beam: A unified model for batch and stream processing data
Apache Beam: A unified model for batch and stream processing data
 
Intelligent Monitoring
Intelligent MonitoringIntelligent Monitoring
Intelligent Monitoring
 
NoLambda: Combining Streaming, Ad-Hoc, Machine Learning and Batch Analysis
NoLambda: Combining Streaming, Ad-Hoc, Machine Learning and Batch AnalysisNoLambda: Combining Streaming, Ad-Hoc, Machine Learning and Batch Analysis
NoLambda: Combining Streaming, Ad-Hoc, Machine Learning and Batch Analysis
 
[DSC Europe 23] Pramod Immaneni - Real-time analytics at IoT scale
[DSC Europe 23] Pramod Immaneni - Real-time analytics at IoT scale[DSC Europe 23] Pramod Immaneni - Real-time analytics at IoT scale
[DSC Europe 23] Pramod Immaneni - Real-time analytics at IoT scale
 
Streaming data analytics (Kinesis, EMR/Spark) - Pop-up Loft Tel Aviv
Streaming data analytics (Kinesis, EMR/Spark) - Pop-up Loft Tel Aviv Streaming data analytics (Kinesis, EMR/Spark) - Pop-up Loft Tel Aviv
Streaming data analytics (Kinesis, EMR/Spark) - Pop-up Loft Tel Aviv
 
Dataservices: Processing (Big) Data the Microservice Way
Dataservices: Processing (Big) Data the Microservice WayDataservices: Processing (Big) Data the Microservice Way
Dataservices: Processing (Big) Data the Microservice Way
 
SnappyData at Spark Summit 2017
SnappyData at Spark Summit 2017SnappyData at Spark Summit 2017
SnappyData at Spark Summit 2017
 
SnappyData, the Spark Database. A unified cluster for streaming, transactions...
SnappyData, the Spark Database. A unified cluster for streaming, transactions...SnappyData, the Spark Database. A unified cluster for streaming, transactions...
SnappyData, the Spark Database. A unified cluster for streaming, transactions...
 
Awesome Banking API's
Awesome Banking API'sAwesome Banking API's
Awesome Banking API's
 
Cortana Analytics Workshop: Real-Time Data Processing -- How Do I Choose the ...
Cortana Analytics Workshop: Real-Time Data Processing -- How Do I Choose the ...Cortana Analytics Workshop: Real-Time Data Processing -- How Do I Choose the ...
Cortana Analytics Workshop: Real-Time Data Processing -- How Do I Choose the ...
 
Hadoop metric을 이용한 알람 개발
Hadoop metric을 이용한 알람 개발Hadoop metric을 이용한 알람 개발
Hadoop metric을 이용한 알람 개발
 
Stream Processing Overview
Stream Processing OverviewStream Processing Overview
Stream Processing Overview
 
Big data reactive streams and OSGi - M Rulli
Big data reactive streams and OSGi - M RulliBig data reactive streams and OSGi - M Rulli
Big data reactive streams and OSGi - M Rulli
 
ML on Big Data: Real-Time Analysis on Time Series
ML on Big Data: Real-Time Analysis on Time SeriesML on Big Data: Real-Time Analysis on Time Series
ML on Big Data: Real-Time Analysis on Time Series
 
Flink Forward San Francisco 2018: David Reniz & Dahyr Vergara - "Real-time m...
Flink Forward San Francisco 2018:  David Reniz & Dahyr Vergara - "Real-time m...Flink Forward San Francisco 2018:  David Reniz & Dahyr Vergara - "Real-time m...
Flink Forward San Francisco 2018: David Reniz & Dahyr Vergara - "Real-time m...
 
WSO2 Product Release Webinar - Introducing the WSO2 Complex Event Processor
WSO2 Product Release Webinar - Introducing the WSO2 Complex Event Processor WSO2 Product Release Webinar - Introducing the WSO2 Complex Event Processor
WSO2 Product Release Webinar - Introducing the WSO2 Complex Event Processor
 
Stream Analytics
Stream Analytics Stream Analytics
Stream Analytics
 
Open Source Event Processing for Sensor Fusion Applications
Open Source Event Processing for Sensor Fusion ApplicationsOpen Source Event Processing for Sensor Fusion Applications
Open Source Event Processing for Sensor Fusion Applications
 
Soa12c launch 5 event processing shmakov eng cr
Soa12c launch 5 event processing shmakov eng crSoa12c launch 5 event processing shmakov eng cr
Soa12c launch 5 event processing shmakov eng cr
 
Real-time Analytics for Data-Driven Applications
Real-time Analytics for Data-Driven ApplicationsReal-time Analytics for Data-Driven Applications
Real-time Analytics for Data-Driven Applications
 

Recently uploaded

Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
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
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
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
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 

Recently uploaded (20)

Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
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
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 

spChains: A Declarative Framework for Data Stream Processing in Pervasive Applications

  • 1. Politecnico di Torino Dip. Automatica e Informatica Torino, Italy The 3rd International Conference on Ambient Systems, Networks and Technologies August 27-29, 2012, Niagara Falls, Ontario, Canada http://elite.polito.it spChains: A Declarative Framework for Data Stream Processing in Pervasive Applications Dario Bonino, Fulvio Corno
  • 2. Goals  Enable real-time ambient & sensor data processing  Allow AmI designers to easily specify required computations  Provide an extensible open source processing library 2 ANT’2012, Niagara Falls, Canada spChains
  • 3. Outline  Motivation and Background  Stream processing  spChains Framework  Use cases  Conclusions 3 ANT’2012, Niagara Falls, Canada spChains
  • 4. Motivation  Ambient Intelligence Systems  100’s or 1,000’s of sensors  Different physical quantities (ºC, %H2O, kW, kWh, …)  Sampling frequencies from seconds to minutes  Huge stream of data being generated  Storage and retrieval  On-line processing  Off-line processing  Analytics 4 ANT’2012, Niagara Falls, Canada spChains
  • 5. On-line processing: Applications  Data Decimation (from kHz to mHz)  Aggregation (over time, over space, over sensor types)  Averaging  Feeding User Displays and Dashboards  Computing up-to-date and user-meaningful information  Monitoring and Alerting  Checking Thresholds  Generating Alert messages  Virtual Sensors  Computing derivative quantities 5 ANT’2012, Niagara Falls, Canada spChains
  • 6. Requirements  Input: up to 10,000-100,000 events/second  Data: real-valued quantities, explicit units of measure  Output: real-valued or Boolean, often at much lower frequency  Computation: custom-defined depending on the application requirements  Operators: reusable standard temporal operations applicable to data streams  Usability: should not require database expert to define computations, domain experts must be autonomous 6 ANT’2012, Niagara Falls, Canada spChains
  • 7. Technology scouting  Standard Relational DBMS  Custom programming  Good for storage  Perfect fit with application  Not efficient for requirements computations  Very expensive to  Rely on central servers customize  NoSQL approaches  Stream Processing  Great for storage  No storage  May do computations,  Excellent for computations require custom  Requires custom expertise programming and expertise  Rely on central (or cloud) servers 7 ANT’2012, Niagara Falls, Canada spChains
  • 8. Stream Processing (or Complex Event Processing, CEP)  Event processing: tracking and analyzing streams of data «events», and deriving a conclusion from them  Defines a set of (fixed) queries  Event streams are analyzed in real time (often with in- memory processing) according to the programmed queries  Guarantees fast and scalable processing  Increasingly adopted in different domains: Business Process Management, Recommender Systems, Financial Services, Time Series, …  Several tools available (commercial and open source)  Specific skills needed to write efficient queries, in tool- dependent languages 8 ANT’2012, Niagara Falls, Canada spChains
  • 9. Stream Processing (or Complex Event Processing, CEP)  Event processing: tracking and analyzing streams of data «events», and deriving a conclusion from them insert into RealEvent(src, streamName, value,  Defines a set of (fixed) queries unitOfMeasure) select ‘‘Average’’, ‘‘Average-out’’, avg(value) as value,  Event streams are analyzed in real(streamName=’’M1’’). in- unitOfMeasure from realEvent time (often with memorywin:time_batch(‘‘1h’’) to the programmed queries processing) according group by src, streamName, unitOfMeasure;  Guarantees fast and scalable processing insert into BooleanEvent(src, streamName, booleanValue) select ‘‘Threshold’’,  Increasingly adopted in different domains: Business Process ‘‘Threshold-out’’ as streamName, true as value from pattern [every (oldSample=RealEvent( Management, Recommender Systems, Financial Services, Time streamName=‘‘Average-out’’, Series, …MeasureEventComparator.compareToMeasure(oldSample,‘‘1kW’’, EventComparisonEnum.LESS_THAN_OR_EQUAL)) ->  Several tools available (commercial and open source) newSample=RealEvent(streamName=oldSample.streamName, MeasureEventComparator.compareToMeasure(newSample,‘‘1kW’’,  Specific skills needed to write efficient queries, in tool- EventComparisonEnum.GREATER_THAN)))].win:length(2); dependent languages 9 ANT’2012, Niagara Falls, Canada spChains
  • 10. Proposed approach (1)  Stream Processing for event data processing in real time  (Extensible) Library of predefined operators (spBlocks)  Declarative framework (spChains) to express the required computations  Each Computation = Stream Processing Chain  Chain = Sequence of Stream Processing Blocks  Block = predefined operator, configured with parameters 10 ANT’2012, Niagara Falls, Canada spChains
  • 11. Proposed approach (2)  The set of spChains is described as a simple XML file  All chains are automatically mapped to Stream Processing queries <spXML:blocks> insert into RealEvent(src, streamName, value, unitOfMeasure) select ‘‘Average’’, <spXML:block id="Avg1“ ‘‘Average-out’’, avg(value) as value, function="AVERAGE"> unitOfMeasure from realEvent <spXML:param name="window" value="1“ (streamName=’’M1’’). win:time_batch(‘‘1h’’) unitOfMeasure="h"/> group by src, streamName, unitOfMeasure; <spXML:param name="mode“ insert into BooleanEvent(src, streamName, value="batch"/> booleanValue) select ‘‘Threshold’’, ‘‘Threshold-out’’ as streamName, true as value </spXML:block> from pattern [every (oldSample=RealEvent( streamName=‘‘Average-out’’, <spXML:block id="Th1“ MeasureEventComparator.compareToMeasure(oldSamp le,‘‘1kW’’, function="THRESHOLD"> EventComparisonEnum.LESS_THAN_OR_EQUAL)) -> <spXML:param name="threshold“ newSample=RealEvent(streamName=oldSample.stream value="1" unitOfMeasure="kW"/> Name, MeasureEventComparator.compareToMeasure(newSamp </spXML:block> le,‘‘1kW’’, EventComparisonEnum.GREATER_THAN)))].win:length </spXML:blocks> (2); 11 ANT’2012, Niagara Falls, Canada spChains
  • 12. spChains Framework spBlocks Stream Pattern Match / Alerts Processing Block Pervasive Event Sources application Event Drains Environmental Stream Aggregate / Computed (s) Final Users Data Processing Measures Chains Pervasive/Ubiquitous Communication Infrastructure Chain Definition 12 ANT’2012, Niagara Falls, Canada spChains
  • 13. Basic spBlock Library 13 ANT’2012, Niagara Falls, Canada spChains
  • 14. Examples of spChains 14 ANT’2012, Niagara Falls, Canada spChains
  • 15. Examples of spChains <spXML:blockid = "Avg1" function = "AVERAGE"> <spXML:param name = "window" value = "1" unitOfMeasure = "h" / > <spXML:param name = "mode" value = "batch" /> </spXML:block> 15 ANT’2012, Niagara Falls, Canada spChains
  • 16. Implementation  Java spChains library (Apache v2.0 license)  Core library http://elite.polito.it/spchains  Esper bindings  Basic spBlock library  Scales up to 200 k events/sec  Already in use  3 different data centers, running on embedded PCs  Monitoring environment, electrical power consumption, thermal flows (heating and cooling), polled by means of the Dog2.x multiprotocol gateway  Computed quantity are “pushed” to Web Service collectors  Over 3 months of uptime, no issues found 16 ANT’2012, Niagara Falls, Canada spChains
  • 17. Conclusions  Complex computations in the field and in real time  Efficient and easy to integrate  Lowered the barrier to adoption of Stream Processing  Future work http://elite.polito.it  User interface http://elite.polito.it/spchains  Large-scale installations fulvio.corno@polito.it dario.bonino@polito.it 17 ANT’2012, Niagara Falls, Canada spChains