SlideShare ist ein Scribd-Unternehmen logo
1 von 21
Downloaden Sie, um offline zu lesen
Darach Ennis (darach.ennis@streambase.com)
               StreamBase Systems
        Erlang UG London - April 20th 2011




       Complex Event Erjang Processing:
DSL for Low Latency High Frequency Computing


           +                         +                       =
                 Copyright 2011 © StreamBase Systems, Inc.       1
High Level DSLs : Myth Vs Reality

Myth: High level domain
specific languages are
too slow for HFT.

Reality: High level domain
specific languages can deliver
better performance than
system programming languages
when tailored to a specific task.
                      Copyright 2011 © StreamBase Systems, Inc.   2
Complex Event Processing aka Event Processing

 Software organized by events (compare object oriented)
   • What’s an event? What’s an object?
   • And event is something can trigger processing, can include data.
   • Naturally but not usually represents a “real world” event or observation.
 Complex Event Processing Platforms
   • Software stack for event based systems, event driven architectures
   • Event Programming Language – SQL-based, Rules-based, or State-based
   • Commercial and open source: StreamBase, Progress, Microsoft, IBM,
     Oracle, SAP, Esper, Drools and many more
 Adopted in financial services and other markets
   • System monitoring, industrial process, logistics, defense/intelligence
 Other Event Processing Approaches:
   • Erlang, Actors, node.js, .NET Rx

                              Copyright 2011 © StreamBase Systems, Inc.          3
Why a DSL?

 High level
 Graphical
 Appropriate for purpose
 Understandable
 Flexible




                        Copyright 2011 © StreamBase Systems, Inc.   4
What does a CEP DSL or Language offer?

 Continuously Observe, Orient, Decide Act (OODA) on event
  streams
   •   Continuous Incremental Query
   •   Pattern matching within or across streams
   •   Branch – Split, Causal Split, Filter.
   •   Combine - Semi-Join, Union, Gather, Merge, Join, Pattern
   •   Windows – Process sets of streaming data
        • Sliding or Tumbling, Overlapping or Non-Overlapping, Gaps or No Gaps
        • Finite (1 second, 1000 tuples), Infinite
        • Emission Policies: On Close, Every odd message
        • Predicate based – Roll your own window type
   • State Management – In memory, CSV files, CSV sockets, RDBMS, Parallel
     DBMSs, column stores, KV stores…
   • Nice to have:
        • Declarative concurrency, Interface Polymorphism, Distribution, Extensible
                                  Copyright 2011 © StreamBase Systems, Inc.           5
Challenges for CEP

 Ultra Low Latency
   • Sub-millisecond is standard, sub-100-micro is desirable.
 Large Data Volumes
   • Hundreds of thousands of events, thousands of decisions, per thread.
   • Big Data. Hundreds+ of SMP nodes each …
 Demanding Operational Environment
   • 24x7, 365 – in critical environments (trading, surveillance, utilities)
 Sophisticated Data Processing (sometimes)
   • Options pricing, yield curves, risk metrics, smart grid capacity planning,
     fraud detection.
 How it’s done (QCON London 2011):
   • How LMAX did it? http://bit.ly/fUeS0P
   • How we did it? http://bit.ly/hM6NAP <- Our CTO Richard Tibbetts talk

                               Copyright 2011 © StreamBase Systems, Inc.          6
StreamBase Event Processing Platform
                                                  Studio Integrated Development Environment                             Visualization
       Developer Studio
       Graphical StreamSQL for developing,
       back testing and deploying applications.

                                 StreamBase
          StreamBase
                                 Component
          Frameworks
                                  Exchange
                                                                   Applications




Input Adapter(s)
Inject streaming (market data)      Adapters                                                        Adapters
and static (reference data)                            StreamBase Server
sources.




                                                     Event Processing Server                                   Output Adapter(s)
                                                     High performance optimized engine                         Send results to systems, users, user
                                                     can process events at market data                         screens and databases.
                                                     speeds.

                                                        Copyright 2011 © StreamBase Systems, Inc.                                                 7
How did we do it?
 Compilation and Static Analysis
   • Design the language for it
 Modular abstraction, interfaces
   • Quants and Developers Collaborate
 Bytecode generation and the Janino compiler
   • Optimized bytecodes, in-memory generation
 Garbage optimization
   • Pooling, data class, invasive collections
 Integrations, C++ and Java plugins
   • Efficient native interfaces
 Adapter API, FIX Messaging
   • Threading and API structure for ultra low latency
 Parallelism, Clustering, Lanes and Tiers
   • Scalability with latency in mind
 Named Data Formats, Schemas
   • Sharing data and semantics between apps
                               Copyright 2011 © StreamBase Systems, Inc.   8
StreamBase StreamSQL EventFlow



                                              Rapid Deployment
                                                & Unit Testing
            Modularity &
            Polymorphism




                                              Interfaces &              Off The Shelf
            Off The Shelf                   Extension Points            Business Logic
            Connectivity



                            Copyright 2011 © StreamBase Systems, Inc.                    9
Agenda

 Windows in the Wild
 Embedding Erlang via Erjang
 Define Erlang Behaviours to define a cross-domain Contract
 Implement & Test Behaviours in plain ole’ Erlang                       In a good way, like
                                                                           ‘a pint of plain’
 Expose Behaviours to StreamBase                                                !!!

 Deploy & run Erlang extensions in StreamBase algorithms
 Shameless Plug, Acknowledgements, Q&A


            +                     +                                  =

                         Copyright 2011 © StreamBase Systems, Inc.                             10
Windows in the Wild - #1 Riak

 Riak Core: https://github.com/basho/riak_core
   • Mixes the ‘when’ window dimension (time) with the what ‘aggregation’




                            Copyright 2011 © StreamBase Systems, Inc.       11
Windows in the Wild - #2 tlack on BitBucket

 Thomas Lackner - tlack - EMA:
   • https://bitbucket.org/tlack/erlang-exponential-moving-average/overview
   • Mixes the ‘when’ window dimension (time) with the what ‘aggregation’
     and number of occurrences ‘how many’




                               Copyright 2011 © StreamBase Systems, Inc.      12
Embedding Erlang (Erjang)




                                                                 Prepend the dir defining our
                                                                 behaviors to the code path




                     Copyright 2011 © StreamBase Systems, Inc.                                  13
Define Behavioral Contracts




                      Copyright 2011 © StreamBase Systems, Inc.   14
Implement & Test in Erlang (or Erjang!)




                                                                  Duh!
                                                                  Typo!




                      Copyright 2011 © StreamBase Systems, Inc.     15
Expose to StreamBase [ Call by Behaviour/Mod] #1




                     Copyright 2011 © StreamBase Systems, Inc.   16
Expose To StreamBase [Call by Behaviour/Mod] #2




                     Copyright 2011 © StreamBase Systems, Inc.   17
Use, Deploy & Run

                                                                                      Wikipedia
                                                                                       : MACD




                                                                Example:

                                                                Continuous Streaming
                                                                Map/Reduce with 1-second
                                                                MACD compression.
                                                                Linearly SMP scalable.

                                                                Just add boxes to scale!

                    Copyright 2011 © StreamBase Systems, Inc.                               18
Shameless Plugs

 StreamBase
   • You could build one of these yourself, or use ours…
   • Download and test out the full product http:/www.streambase.com
   • Build something and submit to the StreamBase Component Exchange
     http://sbx.streambase.com
   • Contact us to buy or to an OEM partner, offices London, Boston, New York
   • We’re hiring
   • We’re training
       • http://www.streambase.com/developers-training-events.htm

 DEBS – Distributed Event Based Systems
   • Academic (ACM) Conference outside NYC in July
 EPTS – Event Processing Technology Society
   • http://ep-ts.org industry consortium

                          Questions?
                              Copyright 2011 © StreamBase Systems, Inc.         19
Acknowledgements

 Erlang, Erlang Solutions, Erlang UG London, & Forward
   •   http://www.erlang.org/
   •   http://www.erlang-solutions.com/
   •   http://www.erlang-solutions.com/etc/usergroup/london
   •   http://www.forward.co.uk/ - Thanks for the venue folk!
 Erjang – The Java based Erlang Virtual Machine
   • https://github.com/trifork/erjang/wiki/
 erlIDE
   • http://erlide.sourceforge.net/
 @tibbetts – I stole borrowed some of his                                slides!

      Source will be contributed to the StreamBase Component Exchange:
      http://sbx.streambase.com/
   … in due course!
                              Copyright 2011 © StreamBase Systems, Inc.             20
Download StreamBase and More Information
      http://www.streambase.com




        Questions?


       +                          +                       =
              Copyright 2011 © StreamBase Systems, Inc.       21

Weitere ähnliche Inhalte

Was ist angesagt?

Use Cases and Integration Scenarios with SAP Adaptive Computing Virtualization
Use Cases and Integration Scenarios with SAP Adaptive Computing VirtualizationUse Cases and Integration Scenarios with SAP Adaptive Computing Virtualization
Use Cases and Integration Scenarios with SAP Adaptive Computing VirtualizationGunther_01
 
First Operational Technology (OT) High Performance Messaging Patterns for Ent...
First Operational Technology (OT) High Performance Messaging Patterns for Ent...First Operational Technology (OT) High Performance Messaging Patterns for Ent...
First Operational Technology (OT) High Performance Messaging Patterns for Ent...Real-Time Innovations (RTI)
 
Liquidity Risk Management powered by SAP HANA
Liquidity Risk Management powered by SAP HANALiquidity Risk Management powered by SAP HANA
Liquidity Risk Management powered by SAP HANASAP Technology
 
Hadoop World 2011: How Hadoop Revolutionized Business Intelligence and Advanc...
Hadoop World 2011: How Hadoop Revolutionized Business Intelligence and Advanc...Hadoop World 2011: How Hadoop Revolutionized Business Intelligence and Advanc...
Hadoop World 2011: How Hadoop Revolutionized Business Intelligence and Advanc...Cloudera, Inc.
 
Introduction to Enterprise Cloud Economics
Introduction to Enterprise Cloud EconomicsIntroduction to Enterprise Cloud Economics
Introduction to Enterprise Cloud EconomicsEverest Group
 
Development Model for The Cloud
Development Model for The CloudDevelopment Model for The Cloud
Development Model for The Cloudumityalcinalp
 
Dc architecture for_cloud
Dc architecture for_cloudDc architecture for_cloud
Dc architecture for_cloudAlain Geenrits
 
Cloud computing bringing the dark side of enterprise apps into the light by...
Cloud computing   bringing the dark side of enterprise apps into the light by...Cloud computing   bringing the dark side of enterprise apps into the light by...
Cloud computing bringing the dark side of enterprise apps into the light by...Khazret Sapenov
 
Network Assurance and Testing During the Migration to VoIP
Network Assurance and Testing During the Migration to VoIPNetwork Assurance and Testing During the Migration to VoIP
Network Assurance and Testing During the Migration to VoIPVideoguy
 
Integrating Lucene into a Transactional XML Database
Integrating Lucene into a Transactional XML DatabaseIntegrating Lucene into a Transactional XML Database
Integrating Lucene into a Transactional XML Databaselucenerevolution
 
Hadoop for shanghai dev meetup
Hadoop for shanghai dev meetupHadoop for shanghai dev meetup
Hadoop for shanghai dev meetupRoby Chen
 
The Total Cost of (Non) Ownership In The Cloud
The Total Cost of (Non) Ownership In The Cloud The Total Cost of (Non) Ownership In The Cloud
The Total Cost of (Non) Ownership In The Cloud Amazon Web Services
 
Acme Packet Presentation Materials for VUC June 18th 2010
Acme Packet Presentation Materials for VUC June 18th 2010Acme Packet Presentation Materials for VUC June 18th 2010
Acme Packet Presentation Materials for VUC June 18th 2010Michael Graves
 
Microsoft Lync & Acme Packet Session Management Solutions
Microsoft Lync & Acme Packet Session Management SolutionsMicrosoft Lync & Acme Packet Session Management Solutions
Microsoft Lync & Acme Packet Session Management SolutionsMUCUGL
 

Was ist angesagt? (17)

Use Cases and Integration Scenarios with SAP Adaptive Computing Virtualization
Use Cases and Integration Scenarios with SAP Adaptive Computing VirtualizationUse Cases and Integration Scenarios with SAP Adaptive Computing Virtualization
Use Cases and Integration Scenarios with SAP Adaptive Computing Virtualization
 
First Operational Technology (OT) High Performance Messaging Patterns for Ent...
First Operational Technology (OT) High Performance Messaging Patterns for Ent...First Operational Technology (OT) High Performance Messaging Patterns for Ent...
First Operational Technology (OT) High Performance Messaging Patterns for Ent...
 
Liquidity Risk Management powered by SAP HANA
Liquidity Risk Management powered by SAP HANALiquidity Risk Management powered by SAP HANA
Liquidity Risk Management powered by SAP HANA
 
Ta3
Ta3Ta3
Ta3
 
Hadoop World 2011: How Hadoop Revolutionized Business Intelligence and Advanc...
Hadoop World 2011: How Hadoop Revolutionized Business Intelligence and Advanc...Hadoop World 2011: How Hadoop Revolutionized Business Intelligence and Advanc...
Hadoop World 2011: How Hadoop Revolutionized Business Intelligence and Advanc...
 
Introduction to Enterprise Cloud Economics
Introduction to Enterprise Cloud EconomicsIntroduction to Enterprise Cloud Economics
Introduction to Enterprise Cloud Economics
 
Development Model for The Cloud
Development Model for The CloudDevelopment Model for The Cloud
Development Model for The Cloud
 
InterBase XE Datasheet
InterBase XE DatasheetInterBase XE Datasheet
InterBase XE Datasheet
 
Dc architecture for_cloud
Dc architecture for_cloudDc architecture for_cloud
Dc architecture for_cloud
 
Cloud computing bringing the dark side of enterprise apps into the light by...
Cloud computing   bringing the dark side of enterprise apps into the light by...Cloud computing   bringing the dark side of enterprise apps into the light by...
Cloud computing bringing the dark side of enterprise apps into the light by...
 
Network Assurance and Testing During the Migration to VoIP
Network Assurance and Testing During the Migration to VoIPNetwork Assurance and Testing During the Migration to VoIP
Network Assurance and Testing During the Migration to VoIP
 
CloverETL Training Sample
CloverETL Training SampleCloverETL Training Sample
CloverETL Training Sample
 
Integrating Lucene into a Transactional XML Database
Integrating Lucene into a Transactional XML DatabaseIntegrating Lucene into a Transactional XML Database
Integrating Lucene into a Transactional XML Database
 
Hadoop for shanghai dev meetup
Hadoop for shanghai dev meetupHadoop for shanghai dev meetup
Hadoop for shanghai dev meetup
 
The Total Cost of (Non) Ownership In The Cloud
The Total Cost of (Non) Ownership In The Cloud The Total Cost of (Non) Ownership In The Cloud
The Total Cost of (Non) Ownership In The Cloud
 
Acme Packet Presentation Materials for VUC June 18th 2010
Acme Packet Presentation Materials for VUC June 18th 2010Acme Packet Presentation Materials for VUC June 18th 2010
Acme Packet Presentation Materials for VUC June 18th 2010
 
Microsoft Lync & Acme Packet Session Management Solutions
Microsoft Lync & Acme Packet Session Management SolutionsMicrosoft Lync & Acme Packet Session Management Solutions
Microsoft Lync & Acme Packet Session Management Solutions
 

Ähnlich wie StreamBase - Embedded Erjang - Erlang User Group London - 20th April 2011

Complex Er[jl]ang Processing with StreamBase
Complex Er[jl]ang Processing with StreamBaseComplex Er[jl]ang Processing with StreamBase
Complex Er[jl]ang Processing with StreamBasedarach
 
InfoSphere Streams Technical Overview - Use Cases Big Data - Jerome CHAILLOUX
InfoSphere Streams Technical Overview - Use Cases Big Data - Jerome CHAILLOUXInfoSphere Streams Technical Overview - Use Cases Big Data - Jerome CHAILLOUX
InfoSphere Streams Technical Overview - Use Cases Big Data - Jerome CHAILLOUXIBMInfoSphereUGFR
 
SnapLogic corporate presentation
SnapLogic corporate presentationSnapLogic corporate presentation
SnapLogic corporate presentationpbridges
 
Hadoop in the Enterprise - Dr. Amr Awadallah @ Microstrategy World 2011
Hadoop in the Enterprise - Dr. Amr Awadallah @ Microstrategy World 2011Hadoop in the Enterprise - Dr. Amr Awadallah @ Microstrategy World 2011
Hadoop in the Enterprise - Dr. Amr Awadallah @ Microstrategy World 2011Cloudera, Inc.
 
Cloud Computing - Making IT Simple
 Cloud Computing - Making IT Simple Cloud Computing - Making IT Simple
Cloud Computing - Making IT SimpleBob Rhubart
 
Sybase Complex Event Processing
Sybase Complex Event ProcessingSybase Complex Event Processing
Sybase Complex Event ProcessingSybase Türkiye
 
Cloud Computing: Making IT Simple
Cloud Computing: Making IT SimpleCloud Computing: Making IT Simple
Cloud Computing: Making IT SimpleBob Rhubart
 
Jimwebber soa
Jimwebber soaJimwebber soa
Jimwebber soad0nn9n
 
Solving Cybersecurity at Scale
Solving Cybersecurity at ScaleSolving Cybersecurity at Scale
Solving Cybersecurity at ScaleDataWorks Summit
 
Data Con LA 2018 - Streaming and IoT by Pat Alwell
Data Con LA 2018 - Streaming and IoT by Pat AlwellData Con LA 2018 - Streaming and IoT by Pat Alwell
Data Con LA 2018 - Streaming and IoT by Pat AlwellData Con LA
 
Introducing SQL Server Data Services
Introducing SQL Server Data ServicesIntroducing SQL Server Data Services
Introducing SQL Server Data Servicesgoodfriday
 
Introducing SQL Server Data Services
Introducing SQL Server Data ServicesIntroducing SQL Server Data Services
Introducing SQL Server Data Servicesgoodfriday
 
Big Data launch Singapore Patrick Buddenbaum
Big Data launch Singapore Patrick BuddenbaumBig Data launch Singapore Patrick Buddenbaum
Big Data launch Singapore Patrick BuddenbaumIntelAPAC
 
21st Century Service Oriented Architecture
21st Century Service Oriented Architecture21st Century Service Oriented Architecture
21st Century Service Oriented ArchitectureBob Rhubart
 
Data Segmenting in Anzo
Data Segmenting in AnzoData Segmenting in Anzo
Data Segmenting in AnzoLeeFeigenbaum
 
21st Century SOA
21st Century SOA21st Century SOA
21st Century SOABob Rhubart
 
The sFlow Standard: Scalable, Unified Monitoring of Networks, Systems and App...
The sFlow Standard: Scalable, Unified Monitoring of Networks, Systems and App...The sFlow Standard: Scalable, Unified Monitoring of Networks, Systems and App...
The sFlow Standard: Scalable, Unified Monitoring of Networks, Systems and App...netvis
 
2012 06-15-jazoon12-sub138-eranea-large-apps-migration
2012 06-15-jazoon12-sub138-eranea-large-apps-migration2012 06-15-jazoon12-sub138-eranea-large-apps-migration
2012 06-15-jazoon12-sub138-eranea-large-apps-migrationDidier Durand
 
Engineering Interoperable and Reliable Systems
Engineering Interoperable and Reliable SystemsEngineering Interoperable and Reliable Systems
Engineering Interoperable and Reliable SystemsRick Warren
 

Ähnlich wie StreamBase - Embedded Erjang - Erlang User Group London - 20th April 2011 (20)

Complex Er[jl]ang Processing with StreamBase
Complex Er[jl]ang Processing with StreamBaseComplex Er[jl]ang Processing with StreamBase
Complex Er[jl]ang Processing with StreamBase
 
InfoSphere Streams Technical Overview - Use Cases Big Data - Jerome CHAILLOUX
InfoSphere Streams Technical Overview - Use Cases Big Data - Jerome CHAILLOUXInfoSphere Streams Technical Overview - Use Cases Big Data - Jerome CHAILLOUX
InfoSphere Streams Technical Overview - Use Cases Big Data - Jerome CHAILLOUX
 
SnapLogic corporate presentation
SnapLogic corporate presentationSnapLogic corporate presentation
SnapLogic corporate presentation
 
Hadoop in the Enterprise - Dr. Amr Awadallah @ Microstrategy World 2011
Hadoop in the Enterprise - Dr. Amr Awadallah @ Microstrategy World 2011Hadoop in the Enterprise - Dr. Amr Awadallah @ Microstrategy World 2011
Hadoop in the Enterprise - Dr. Amr Awadallah @ Microstrategy World 2011
 
Cloud Computing - Making IT Simple
 Cloud Computing - Making IT Simple Cloud Computing - Making IT Simple
Cloud Computing - Making IT Simple
 
Sybase Complex Event Processing
Sybase Complex Event ProcessingSybase Complex Event Processing
Sybase Complex Event Processing
 
Cloud Computing: Making IT Simple
Cloud Computing: Making IT SimpleCloud Computing: Making IT Simple
Cloud Computing: Making IT Simple
 
Jimwebber soa
Jimwebber soaJimwebber soa
Jimwebber soa
 
Solving Cybersecurity at Scale
Solving Cybersecurity at ScaleSolving Cybersecurity at Scale
Solving Cybersecurity at Scale
 
Os Pittaro
Os PittaroOs Pittaro
Os Pittaro
 
Data Con LA 2018 - Streaming and IoT by Pat Alwell
Data Con LA 2018 - Streaming and IoT by Pat AlwellData Con LA 2018 - Streaming and IoT by Pat Alwell
Data Con LA 2018 - Streaming and IoT by Pat Alwell
 
Introducing SQL Server Data Services
Introducing SQL Server Data ServicesIntroducing SQL Server Data Services
Introducing SQL Server Data Services
 
Introducing SQL Server Data Services
Introducing SQL Server Data ServicesIntroducing SQL Server Data Services
Introducing SQL Server Data Services
 
Big Data launch Singapore Patrick Buddenbaum
Big Data launch Singapore Patrick BuddenbaumBig Data launch Singapore Patrick Buddenbaum
Big Data launch Singapore Patrick Buddenbaum
 
21st Century Service Oriented Architecture
21st Century Service Oriented Architecture21st Century Service Oriented Architecture
21st Century Service Oriented Architecture
 
Data Segmenting in Anzo
Data Segmenting in AnzoData Segmenting in Anzo
Data Segmenting in Anzo
 
21st Century SOA
21st Century SOA21st Century SOA
21st Century SOA
 
The sFlow Standard: Scalable, Unified Monitoring of Networks, Systems and App...
The sFlow Standard: Scalable, Unified Monitoring of Networks, Systems and App...The sFlow Standard: Scalable, Unified Monitoring of Networks, Systems and App...
The sFlow Standard: Scalable, Unified Monitoring of Networks, Systems and App...
 
2012 06-15-jazoon12-sub138-eranea-large-apps-migration
2012 06-15-jazoon12-sub138-eranea-large-apps-migration2012 06-15-jazoon12-sub138-eranea-large-apps-migration
2012 06-15-jazoon12-sub138-eranea-large-apps-migration
 
Engineering Interoperable and Reliable Systems
Engineering Interoperable and Reliable SystemsEngineering Interoperable and Reliable Systems
Engineering Interoperable and Reliable Systems
 

Mehr von darach

Thing. An unexpected journey. Devoxx UK 2014
Thing. An unexpected journey. Devoxx UK 2014Thing. An unexpected journey. Devoxx UK 2014
Thing. An unexpected journey. Devoxx UK 2014darach
 
FunctionalJS - May 2014 - Streams
FunctionalJS - May 2014 - StreamsFunctionalJS - May 2014 - Streams
FunctionalJS - May 2014 - Streamsdarach
 
Deconstructing Lambda
Deconstructing LambdaDeconstructing Lambda
Deconstructing Lambdadarach
 
Streams and Things
Streams and ThingsStreams and Things
Streams and Thingsdarach
 
Big Data, Mob Scale.
Big Data, Mob Scale.Big Data, Mob Scale.
Big Data, Mob Scale.darach
 
Meta Programming with Streams and Pipes
Meta Programming with Streams and PipesMeta Programming with Streams and Pipes
Meta Programming with Streams and Pipesdarach
 
Erlang/Sapiens
Erlang/SapiensErlang/Sapiens
Erlang/Sapiensdarach
 
QCON London 2013
QCON London 2013QCON London 2013
QCON London 2013darach
 
EFL Munich - February 2013 - "Conversational Big Data with Erlang"
EFL Munich - February 2013 - "Conversational Big Data with Erlang"EFL Munich - February 2013 - "Conversational Big Data with Erlang"
EFL Munich - February 2013 - "Conversational Big Data with Erlang"darach
 
Streamy, Pipy, Analyticy
Streamy, Pipy, AnalyticyStreamy, Pipy, Analyticy
Streamy, Pipy, Analyticydarach
 
Tech mesh london 2012
Tech mesh london 2012Tech mesh london 2012
Tech mesh london 2012darach
 
Data distribution in the cloud with Node.js
Data distribution in the cloud with Node.jsData distribution in the cloud with Node.js
Data distribution in the cloud with Node.jsdarach
 

Mehr von darach (12)

Thing. An unexpected journey. Devoxx UK 2014
Thing. An unexpected journey. Devoxx UK 2014Thing. An unexpected journey. Devoxx UK 2014
Thing. An unexpected journey. Devoxx UK 2014
 
FunctionalJS - May 2014 - Streams
FunctionalJS - May 2014 - StreamsFunctionalJS - May 2014 - Streams
FunctionalJS - May 2014 - Streams
 
Deconstructing Lambda
Deconstructing LambdaDeconstructing Lambda
Deconstructing Lambda
 
Streams and Things
Streams and ThingsStreams and Things
Streams and Things
 
Big Data, Mob Scale.
Big Data, Mob Scale.Big Data, Mob Scale.
Big Data, Mob Scale.
 
Meta Programming with Streams and Pipes
Meta Programming with Streams and PipesMeta Programming with Streams and Pipes
Meta Programming with Streams and Pipes
 
Erlang/Sapiens
Erlang/SapiensErlang/Sapiens
Erlang/Sapiens
 
QCON London 2013
QCON London 2013QCON London 2013
QCON London 2013
 
EFL Munich - February 2013 - "Conversational Big Data with Erlang"
EFL Munich - February 2013 - "Conversational Big Data with Erlang"EFL Munich - February 2013 - "Conversational Big Data with Erlang"
EFL Munich - February 2013 - "Conversational Big Data with Erlang"
 
Streamy, Pipy, Analyticy
Streamy, Pipy, AnalyticyStreamy, Pipy, Analyticy
Streamy, Pipy, Analyticy
 
Tech mesh london 2012
Tech mesh london 2012Tech mesh london 2012
Tech mesh london 2012
 
Data distribution in the cloud with Node.js
Data distribution in the cloud with Node.jsData distribution in the cloud with Node.js
Data distribution in the cloud with Node.js
 

Kürzlich hochgeladen

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 

Kürzlich hochgeladen (20)

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 

StreamBase - Embedded Erjang - Erlang User Group London - 20th April 2011

  • 1. Darach Ennis (darach.ennis@streambase.com) StreamBase Systems Erlang UG London - April 20th 2011 Complex Event Erjang Processing: DSL for Low Latency High Frequency Computing + + = Copyright 2011 © StreamBase Systems, Inc. 1
  • 2. High Level DSLs : Myth Vs Reality Myth: High level domain specific languages are too slow for HFT. Reality: High level domain specific languages can deliver better performance than system programming languages when tailored to a specific task. Copyright 2011 © StreamBase Systems, Inc. 2
  • 3. Complex Event Processing aka Event Processing  Software organized by events (compare object oriented) • What’s an event? What’s an object? • And event is something can trigger processing, can include data. • Naturally but not usually represents a “real world” event or observation.  Complex Event Processing Platforms • Software stack for event based systems, event driven architectures • Event Programming Language – SQL-based, Rules-based, or State-based • Commercial and open source: StreamBase, Progress, Microsoft, IBM, Oracle, SAP, Esper, Drools and many more  Adopted in financial services and other markets • System monitoring, industrial process, logistics, defense/intelligence  Other Event Processing Approaches: • Erlang, Actors, node.js, .NET Rx Copyright 2011 © StreamBase Systems, Inc. 3
  • 4. Why a DSL?  High level  Graphical  Appropriate for purpose  Understandable  Flexible Copyright 2011 © StreamBase Systems, Inc. 4
  • 5. What does a CEP DSL or Language offer?  Continuously Observe, Orient, Decide Act (OODA) on event streams • Continuous Incremental Query • Pattern matching within or across streams • Branch – Split, Causal Split, Filter. • Combine - Semi-Join, Union, Gather, Merge, Join, Pattern • Windows – Process sets of streaming data • Sliding or Tumbling, Overlapping or Non-Overlapping, Gaps or No Gaps • Finite (1 second, 1000 tuples), Infinite • Emission Policies: On Close, Every odd message • Predicate based – Roll your own window type • State Management – In memory, CSV files, CSV sockets, RDBMS, Parallel DBMSs, column stores, KV stores… • Nice to have: • Declarative concurrency, Interface Polymorphism, Distribution, Extensible Copyright 2011 © StreamBase Systems, Inc. 5
  • 6. Challenges for CEP  Ultra Low Latency • Sub-millisecond is standard, sub-100-micro is desirable.  Large Data Volumes • Hundreds of thousands of events, thousands of decisions, per thread. • Big Data. Hundreds+ of SMP nodes each …  Demanding Operational Environment • 24x7, 365 – in critical environments (trading, surveillance, utilities)  Sophisticated Data Processing (sometimes) • Options pricing, yield curves, risk metrics, smart grid capacity planning, fraud detection.  How it’s done (QCON London 2011): • How LMAX did it? http://bit.ly/fUeS0P • How we did it? http://bit.ly/hM6NAP <- Our CTO Richard Tibbetts talk Copyright 2011 © StreamBase Systems, Inc. 6
  • 7. StreamBase Event Processing Platform Studio Integrated Development Environment Visualization Developer Studio Graphical StreamSQL for developing, back testing and deploying applications. StreamBase StreamBase Component Frameworks Exchange Applications Input Adapter(s) Inject streaming (market data) Adapters Adapters and static (reference data) StreamBase Server sources. Event Processing Server Output Adapter(s) High performance optimized engine Send results to systems, users, user can process events at market data screens and databases. speeds. Copyright 2011 © StreamBase Systems, Inc. 7
  • 8. How did we do it?  Compilation and Static Analysis • Design the language for it  Modular abstraction, interfaces • Quants and Developers Collaborate  Bytecode generation and the Janino compiler • Optimized bytecodes, in-memory generation  Garbage optimization • Pooling, data class, invasive collections  Integrations, C++ and Java plugins • Efficient native interfaces  Adapter API, FIX Messaging • Threading and API structure for ultra low latency  Parallelism, Clustering, Lanes and Tiers • Scalability with latency in mind  Named Data Formats, Schemas • Sharing data and semantics between apps Copyright 2011 © StreamBase Systems, Inc. 8
  • 9. StreamBase StreamSQL EventFlow Rapid Deployment & Unit Testing Modularity & Polymorphism Interfaces & Off The Shelf Off The Shelf Extension Points Business Logic Connectivity Copyright 2011 © StreamBase Systems, Inc. 9
  • 10. Agenda  Windows in the Wild  Embedding Erlang via Erjang  Define Erlang Behaviours to define a cross-domain Contract  Implement & Test Behaviours in plain ole’ Erlang In a good way, like ‘a pint of plain’  Expose Behaviours to StreamBase !!!  Deploy & run Erlang extensions in StreamBase algorithms  Shameless Plug, Acknowledgements, Q&A + + = Copyright 2011 © StreamBase Systems, Inc. 10
  • 11. Windows in the Wild - #1 Riak  Riak Core: https://github.com/basho/riak_core • Mixes the ‘when’ window dimension (time) with the what ‘aggregation’ Copyright 2011 © StreamBase Systems, Inc. 11
  • 12. Windows in the Wild - #2 tlack on BitBucket  Thomas Lackner - tlack - EMA: • https://bitbucket.org/tlack/erlang-exponential-moving-average/overview • Mixes the ‘when’ window dimension (time) with the what ‘aggregation’ and number of occurrences ‘how many’ Copyright 2011 © StreamBase Systems, Inc. 12
  • 13. Embedding Erlang (Erjang) Prepend the dir defining our behaviors to the code path Copyright 2011 © StreamBase Systems, Inc. 13
  • 14. Define Behavioral Contracts Copyright 2011 © StreamBase Systems, Inc. 14
  • 15. Implement & Test in Erlang (or Erjang!) Duh! Typo! Copyright 2011 © StreamBase Systems, Inc. 15
  • 16. Expose to StreamBase [ Call by Behaviour/Mod] #1 Copyright 2011 © StreamBase Systems, Inc. 16
  • 17. Expose To StreamBase [Call by Behaviour/Mod] #2 Copyright 2011 © StreamBase Systems, Inc. 17
  • 18. Use, Deploy & Run Wikipedia : MACD Example: Continuous Streaming Map/Reduce with 1-second MACD compression. Linearly SMP scalable. Just add boxes to scale! Copyright 2011 © StreamBase Systems, Inc. 18
  • 19. Shameless Plugs  StreamBase • You could build one of these yourself, or use ours… • Download and test out the full product http:/www.streambase.com • Build something and submit to the StreamBase Component Exchange http://sbx.streambase.com • Contact us to buy or to an OEM partner, offices London, Boston, New York • We’re hiring • We’re training • http://www.streambase.com/developers-training-events.htm  DEBS – Distributed Event Based Systems • Academic (ACM) Conference outside NYC in July  EPTS – Event Processing Technology Society • http://ep-ts.org industry consortium Questions? Copyright 2011 © StreamBase Systems, Inc. 19
  • 20. Acknowledgements  Erlang, Erlang Solutions, Erlang UG London, & Forward • http://www.erlang.org/ • http://www.erlang-solutions.com/ • http://www.erlang-solutions.com/etc/usergroup/london • http://www.forward.co.uk/ - Thanks for the venue folk!  Erjang – The Java based Erlang Virtual Machine • https://github.com/trifork/erjang/wiki/  erlIDE • http://erlide.sourceforge.net/  @tibbetts – I stole borrowed some of his slides! Source will be contributed to the StreamBase Component Exchange: http://sbx.streambase.com/ … in due course! Copyright 2011 © StreamBase Systems, Inc. 20
  • 21. Download StreamBase and More Information http://www.streambase.com Questions? + + = Copyright 2011 © StreamBase Systems, Inc. 21