SlideShare une entreprise Scribd logo
1  sur  50
Télécharger pour lire hors ligne
Your systems. Working as one.
Reactive Stream Processing in
Industrial IoT using DDS and Rx
Sumant Tambe, Ph.D.
Principal Research Engineer and Microsoft VC++ MVP
Real-Time Innovations, Inc.
@sutambe
Sept. 21, 2015
© Real-Time Innovations, Inc.
Outline
• Industrial IoT Systems
• Reactive Systems
• Data Distribution Service
• Stream Processing
• Reactive Extensions (Rx)
• Rx4DDS
• Stream Processing Demos
with Shapes
9/21/2015 © Real-Time Innovations, Inc. 2
9/21/2015 © Real-Time Innovations, Inc. 3
9/21/2015 © Real-Time Innovations, Inc. 4
Industrial IoT Systems
9/21/2015 © Real-Time Innovations, Inc. 5
Cannot stop processing the information.
Live within world-imposed timing.
Image source: Google Images
9/21/2015 © 2015 RTI • 6
Image Credit: Cisco
Responsive: Reacts to events
at the speed of environment
Resilient: fault-tolerant
Elastic/Scalable: Scales
easily up/down with load
and cpu cores.
Event-Driven: asynchronous,
loosely-coupled, modular,
pipelined
9/21/2015 © Real-Time Innovations, Inc. 7
Messaging Middleware
Reactive Manifesto: www.reactivemanifesto.org
Elastic Resilient
Responsive
Event-Driven
Reactive Manifesto
9/21/2015 © Real-Time Innovations, Inc. 8
Jonas Boner: One of the authors of the Reactive Manifesto
9/21/2015 © Real-Time Innovations, Inc. 9
Reactive Middleware
DDS: Data Connectivity Standard for the
Industrial IoT
© 2009 Real-Time Innovations, Inc.
Streaming
Data
Sensors Events
Real-Time
Applications
Enterprise
Applications
Actuators
9/21/2015 © 2015 RTI • 11
DDS Communication Model
FILTERFILTER
The DDS Standard Family
12
DDS v 1.4
RTPS v2.2
DDS-SECURITY
DDS-RPC*
DDS-XTYPES
Application
UDP TCP** DTLS** TLS**
DDS-C++ DDS-JAVA* DDS-IDL-C DDS-IDL-C#
SHARED-
MEMORY**IP
DDS-WEB
HTTP(s)
IDL4.0
© 2015 RTI
9/21/2015 © 2015 RTI 13
STANDARD
AWESOME
API
Choice
9/21/2015 © Real-Time Innovations, Inc. 14Image source: Amazon, Google
A**
Stream Processing
An architectural style that operates on a
continuous sequence of data.
9/21/2015 © Real-Time Innovations, Inc. 15Image credit: eecs.berkeley.edu
Unix command line (pipes and filter)
9/21/2015 © Real-Time Innovations, Inc. 16
Data Pipelines
o/p
Where Once CombineLatest Select Scan Merge Raw Data
i/p
Reactive Extensions (Rx)
• Invented at Microsoft (Erik Meijer and team)
• API for composing asynchronous and event-
based programs using observable streams
• Rx = Observables + Composition
+ Schedulers
• Observables: First-class streams
• Composition: Filter, select, aggregate
(reduce), compose and perform time-based
operations on multiple streams
• Schedulers: Concurrency. Thread-pools, etc.
• Uses Functional Programming (Monadic)
• Rx.NET, RxJava, RxJS, RxCpp, RxRuby,
RxPython, and many more…
9/21/2015 © Real-Time Innovations, Inc. 18
More info: https://speakerdeck.com/benjchristensen/reactive-programming-with-rx-at-qconsf-2014
Duality of Push and Pull Interfaces (C#)
Pull Push
IEnumerator<out T>
T Current { get; }
bool MoveNext()
IObserver<in T>
void OnNext(T value)
void OnCompleted()
void OnError(Exception ex)
IEnumerable<out T>
IEnumerator<T> GetEnumerator();
IObservable<out T>
IDisposable Subscribe(IObserver<T>)
9/21/2015 © Real-Time Innovations, Inc. 19
Duality (video):
http://channel9.msdn.com/Shows/Going+Deep/Expert-to-Expert-Brian-Beckman-and-Erik-Meijer-Inside-the-NET-Reactive-Framework-Rx
Sync/Async, One/Many
9/21/2015 © Real-Time Innovations, Inc. 20
Single Multiple
Sync T get_data() std::vector<T>::iterator
Async future<T> with
.then() .next()
(hpx, boost, C++17)
rxcpp::observable<T>
RxCpp Example (1/3)
rxcpp::observable<int> values =
rxcpp::observable<>::range(1, 5);
9/21/2015 © Real-Time Innovations, Inc. 21
auto subscription = values.subscribe(
[](int v){ printf("OnNext: %dn", v); },
[](){ printf("OnCompletedn"); });
RxCpp Example (2/3)
auto subscription =
rxcpp::observable<>::range(1, 5)
9/21/2015 © Real-Time Innovations, Inc. 22
.map([](int i) { return 10*i; })
.filter([](int v) { return (v % 15) != 0; })
.subscribe(
[](int v){ printf("OnNext: %dn", v); },
[](){ printf("OnCompletedn"); });
Map Marble Diagram
9/21/2015 Real-Time Innovations, Inc. 23
Credit: rxmarbles.com
RxCpp Example (3/3)
auto o1 =
rx::observable<>::interval(std::chrono::seconds(2));
auto o2 =
rx::observable<>::interval(std::chrono::seconds(3));
9/21/2015 © Real-Time Innovations, Inc. 24
auto values = o1.map([](int i) { return char('A' + i); })
.combine_latest(o2);
values
.take(10)
.subscribe(
[](std::tuple<char, int> v) {
printf("OnNext: %c, %dn",
std::get<0>(v), std::get<1>(v));
},
[]() { printf("OnCompletedn"); });
RxCpp Output
9/21/2015 © Real-Time Innovations, Inc. 25
Hot and Cold Observables
9/21/2015 Real-Time Innovations, Inc. 26
Hot Cold
Meaning Emits whether you are
ready or not and
regardless of subscribers
Emits when requested.
Starts from the beginning
with every subscription
Examples 1. Mouse movements
2. User input
3. Stock prices
4. DDS Topic
1. Reading a file
2. Database query
3. observable.interval
Semantics Receiver must keep up or
use sampling.
May lose data
Receiver can exert
backpressure
9/21/2015 © 2015 RTI • 27
Rx4DDS = DDS + Rx
9/21/2015 © 2015 RTI • 28
• Rx bindings for DDS data
– In C++11, C#, and JavaScript
• Anything that produces data
is an Observable
– Topics
– Discovery
– Statuses
More info: http://rticommunity.github.io/rticonnextdds-reactive/
DDS for Distribution, Rx for Processing
9/21/2015 Real-Time Innovations, Inc. 29
DataReader
Observable Observer
DataWriter
DataWriter
Processing
DataReader
DataReader
9/21/2015 © 2015 RTI • 30
DDS and Rx: A Great Match
DDS Rx
Design Methodology Data-Centric Reactive, Compositional
Architecture Distributed Publish-subscribe In-memory Observable-
Observer. Monadic
Anonymity/loose
coupling
Publisher does not know about
subscribers
Observable does not know
about observers
Data Streaming A Topic<T> is a stream of data
samples of type T
An Observable<T> is a stream of
object of type T
Stream lifecycle Instances (keys) have lifecycle
(NewAliveDisposed)
Observables have lifecycle
OnNext*[OnCompleted|OnError]
Data Publication Publisher may publish without any
subscriber
“Hot” Observables
Data Reception Subscriber may read the same data
over and over
“Cold” Observables
DDS and Rx: A Great Match
9/21/2015 © 2015 RTI • 31
DDS Concept Rx Concept/Type/Operator
Topic of type T An object that implements IObservable<T>, which internally creates a
DataReader<T>
Communication status,
Discovery event streams
IObservable<SampleLostStatus>
IObservable<SubscriptionBuiltinTopicData>
Topic of type T with key
type=Key
IObservable<IGroupedObservable<Key, T>>
Detect a new instance Notify Observers about a new IGroupedObservable<Key, T> with
key==instance. Invoke
IObserver<IGroupedObservable<Key, T>>.OnNext()
Dispose an instance Notify Observers through
IObserver<IGroupedObservable<Key,T>>.OnCompleted()
Take an instance update of
type T
Notify Observers about a new value of T using
Iobserver<T>.OnNext()
Read with history=N IObservable<T>.Replay(N) (Produces a new IObservable<T>)
DDS and Rx: A Great Match
9/21/2015 © 2015 RTI 32
DDS Concept Rx Concept/Type/Operation
Query Conditions Iobservable<T>.Where(…) OR
Iobservable<T>.GroupBy(…)
SELECT in CFT expression IObservable<T>.Select(...)
FROM in CFT expression DDSObservable.FromTopic(“Topic1”)
DDSObservable.FromKeyedTopic(“Topic2”)
WHERE in CFT expression IObservable<T>.Where(...)
ORDER BY in CFT expression IObservable<T>.OrderBy(...)
MultiTopic (INNER JOIN) IObservable<T>.Join(...)
.Where(...)
.Select(...)
Join between DDS and non-
DDS data
Join, CombineLatest, Zip
Decoupling Data Production from
Consumption
• Two ways to access DDS data
– WaitSet-based blocking and dispatch (like select)
– Listener-based (m/w calls you back)
• Each has pros/cons and different APIs and leads
to very different code structure
• Observables allows us to change data production
technique without changing data consuming code
• Data consuming code is written in the same
declarative chaining style
9/21/2015 Real-Time Innovations, Inc. 33
Stream Processing Demos with Shapes
9/21/2015 © Real-Time Innovations, Inc. 34
class ShapeType
{
string color; //@key
int shapesize;
int x;
int y;
}
• 3 DDS Topics
– “Square”
– “Triangle”
– “Circle”
Solar System Demo
9/21/2015 Real-Time Innovations, Inc. 35
Link: https://youtu.be/mHNyEPeOPHg (1 min)
rx4dds::TopicSubscription<ShapeType>
topic_sub(participant, "Square", waitset, worker);
9/21/2015 Real-Time Innovations, Inc. 36
rx::observable<ShapeType> square_track =
source >> rx4dds::complete_on_dispose()
>> rx4dds::error_on_no_alive_writers()
>> filter([](LoanedSample<ShapeType> s) {
return s.info().valid();
}) // skip invalid samples
rx::observable<LoanedSample<ShapeType>> source =
topic_sub.create_observable();
>> map([](LoanedSample<ShapeType> valid) {
return valid.data();
}); // map samples to data
9/21/2015 © Real-Time Innovations, Inc. 37
int circle_degree = 0;
square_track
.map([circle_degree](ShapeType & square) mutable
{
circle_degree = (circle_degree + 3) % 360;
return shape_location(square, circle_degree);
})
.tap([circle_writer](ShapeType & circle) mutable {
circle_writer.write(circle);
}); // tap replaced as publish_over_dds later
Map to Circle Track
rx::observable<ShapeType> circle_track =
9/21/2015 Real-Time Innovations, Inc. 38
int tri_degree = 0;
circle_track
.map([tri_degree](ShapeType & circle) mutable
{
tri_degree = (tri_degree + 9) % 360;
return shape_location(circle, tri_degree);
})
>> rx4dds::publish_over_dds(triangle_writer);
triangle_track.subscribe();
Map to Triangle Track
rx::observable<ShapeType> triangle_track =
Naming Transformations (C++14)
9/21/2015 Real-Time Innovations, Inc. 39
auto skip_invalid_samples()
{
return [](auto src_observable) {
};
}
return src_observable
.filter([](auto & sample) {
return sample.info().valid()
});
Naming Transformations (C++11)
9/21/2015 Real-Time Innovations, Inc. 40
struct MapSampleToDataOp
{
template <class Observable>
rx::observable<typename Observable::value_type::DataType>
operator ()(Observable src) const
{
typedef typename Observable::value_type LoanedSample;
return src.map([](LoanedSample & sample) {
return sample.data()
});
}
};
inline MapSampleToDataOp map_samples_to_data()
{
return MapSampleToDataOp();
}
9/21/2015 Real-Time Innovations, Inc. 41
27,572 cables
Source: Google Images
Data Pipelines Demo Next
o/p
Where Once CombineLatest Select Scan Merge Raw Data
i/p
Data Pipelines Demo
9/21/2015 Real-Time Innovations, Inc. 43
Link: https://youtu.be/2Pz91e7yR5I (3 min)
9/21/2015 Real-Time Innovations, Inc. 44
rx4dds::TopicSubscription<ShapeType>
topic_sub(participant, "Square", waitset, worker);
auto grouped_stream =
topic_sub.create_observable()
>> group_by_instance ([](ShapeType & shape) {
return shape.color();
});
decltype(grouped_stream) ===
rx::observable<
rx::grouped_observable<
string, LoanedSample<ShapeType>
>
>
9/21/2015 © Real-Time Innovations, Inc. 45
grouped_stream
.flat_map([circle_writer, triangle_writer]
(GroupedShapeObservable go) {
>> complete_on_dispose()
rx::observable<ShapeType> inner_transformed =
go >> to_unkeyed()
>> error_on_no_alive_writers()
>> skip_invalid_samples()
>> map_samples_to_data()
>> map_to_circle_track() // as shown before
>> publish_over_dds(
circle_writer, ShapeType(go.key())
>> map_to_triangle_track() // as shown before
>> publish_over_dds(
triangle_writer, ShapeType(go.key());
return inner_transformed;
}).subscribe();
Dynamic Correlator
9/21/2015 Real-Time Innovations, Inc. 46
Link: https://youtu.be/tZutExU6r0w (1 min)
9/21/2015 © Real-Time Innovations, Inc. 47
grouped_stream
.map([](GroupedShapeObservable go) {
>> rx4dds::complete_on_dispose()
return go >> rx4dds::to_unkeyed()
>> rx4dds::error_on_no_alive_writers()
>> rx4dds::skip_invalid_samples()
>> rx4dds::map_samples_to_data();
>> rxcpp::switch_on_next()
>> rxcpp::map([](const std::vector<ShapeType> & shapes) {
return calculate_average(shapes);
})
})
>> rx4dds::coalesce_alive()
>> map([](const vector<rxcpp::observable<ShapeType>> & srcs) {
return rx4dds::combine_latest(srcs);
})
>> rx4dds::publish_over_dds(triangle_writer, ShapeType(“ORANGE”));
My ¢2 on FP in C++11
• Noisy!!
– Lambda captures, mutable
• Lambdas don’t extend local object lifetimes when captured
– Consequence: shared_ptr galore!
• Death by auto
– auto-heavy code is not readable
– Compiler errors far away from the erroneous line
– Please don’t remove types if you have them already
– Types are the best documentation
• RxCpp
– Learning Rx.NET, RxJS first strongly recommended
– Frequently very, very long observable types
– Use as_dynamic() but beware of performance implications
9/21/2015 Real-Time Innovations, Inc. 48
Resources
• Rx
– LearnRx (RxJS) by JHusain from Netflix
– Intro To Rx (Rx.NET) by Lee Campbell
– rxmarbles.com (interactive marble diagrams)
– ReactiveX.io (API docs in multiple languages)
• Rx4DDS Stream Processing
– Github [bit.ly/cppcon-rx4dds]
– Research Paper [link]
• DDS
– Object Management Group [http://portals.omg.org/dds]
– RTI [www.rti.com]
9/21/2015 Real-Time Innovations, Inc. 49
Thank You!
9/21/2015 Real-Time Innovations, Inc. 50

Contenu connexe

Tendances

Linux Basics Knowlage sharing.pptx
Linux Basics Knowlage sharing.pptxLinux Basics Knowlage sharing.pptx
Linux Basics Knowlage sharing.pptxbemnitekalegn
 
NetBox as the Source of Truth for Cisco NSO Configurations
NetBox as the Source of Truth for Cisco NSO ConfigurationsNetBox as the Source of Truth for Cisco NSO Configurations
NetBox as the Source of Truth for Cisco NSO ConfigurationsHank Preston
 
Componentes de una red
Componentes de una redComponentes de una red
Componentes de una redAkammal
 
Introduction to DDS
Introduction to DDSIntroduction to DDS
Introduction to DDSRick Warren
 
Communication Patterns Using Data-Centric Publish/Subscribe
Communication Patterns Using Data-Centric Publish/SubscribeCommunication Patterns Using Data-Centric Publish/Subscribe
Communication Patterns Using Data-Centric Publish/SubscribeReal-Time Innovations (RTI)
 
Debug dpdk process bottleneck & painpoints
Debug dpdk process bottleneck & painpointsDebug dpdk process bottleneck & painpoints
Debug dpdk process bottleneck & painpointsVipin Varghese
 
ABR Algorithms Explained (from Streaming Media East 2016)
ABR Algorithms Explained (from Streaming Media East 2016) ABR Algorithms Explained (from Streaming Media East 2016)
ABR Algorithms Explained (from Streaming Media East 2016) Erica Beavers
 
Overview of Linux
Overview of LinuxOverview of Linux
Overview of LinuxThang Man
 
Capa de transporte - capa 4 osi
Capa de transporte - capa 4 osiCapa de transporte - capa 4 osi
Capa de transporte - capa 4 osiEl Taller del Bit
 
RTI Data-Distribution Service (DDS) Master Class - 2010
RTI Data-Distribution Service (DDS) Master Class - 2010RTI Data-Distribution Service (DDS) Master Class - 2010
RTI Data-Distribution Service (DDS) Master Class - 2010Gerardo Pardo-Castellote
 
Arp,rarp y tecnicas de multidifusion
Arp,rarp y tecnicas de multidifusionArp,rarp y tecnicas de multidifusion
Arp,rarp y tecnicas de multidifusionEduardo J Onofre
 
RTI Data-Distribution Service (DDS) Master Class 2011
RTI Data-Distribution Service (DDS) Master Class 2011RTI Data-Distribution Service (DDS) Master Class 2011
RTI Data-Distribution Service (DDS) Master Class 2011Gerardo Pardo-Castellote
 

Tendances (20)

Intel dpdk Tutorial
Intel dpdk TutorialIntel dpdk Tutorial
Intel dpdk Tutorial
 
Dpdk performance
Dpdk performanceDpdk performance
Dpdk performance
 
Servicios DHCP, DNS y TELNET
Servicios DHCP, DNS y TELNETServicios DHCP, DNS y TELNET
Servicios DHCP, DNS y TELNET
 
Linux Basics Knowlage sharing.pptx
Linux Basics Knowlage sharing.pptxLinux Basics Knowlage sharing.pptx
Linux Basics Knowlage sharing.pptx
 
Linux IO
Linux IOLinux IO
Linux IO
 
NetBox as the Source of Truth for Cisco NSO Configurations
NetBox as the Source of Truth for Cisco NSO ConfigurationsNetBox as the Source of Truth for Cisco NSO Configurations
NetBox as the Source of Truth for Cisco NSO Configurations
 
¿Por qué usar Python?
¿Por qué usar Python?¿Por qué usar Python?
¿Por qué usar Python?
 
Componentes de una red
Componentes de una redComponentes de una red
Componentes de una red
 
Introduction to DDS
Introduction to DDSIntroduction to DDS
Introduction to DDS
 
Communication Patterns Using Data-Centric Publish/Subscribe
Communication Patterns Using Data-Centric Publish/SubscribeCommunication Patterns Using Data-Centric Publish/Subscribe
Communication Patterns Using Data-Centric Publish/Subscribe
 
Protocolo de capa 7
Protocolo de capa 7Protocolo de capa 7
Protocolo de capa 7
 
Debug dpdk process bottleneck & painpoints
Debug dpdk process bottleneck & painpointsDebug dpdk process bottleneck & painpoints
Debug dpdk process bottleneck & painpoints
 
Introduction to RTI DDS
Introduction to RTI DDSIntroduction to RTI DDS
Introduction to RTI DDS
 
ABR Algorithms Explained (from Streaming Media East 2016)
ABR Algorithms Explained (from Streaming Media East 2016) ABR Algorithms Explained (from Streaming Media East 2016)
ABR Algorithms Explained (from Streaming Media East 2016)
 
Características físicas de los cables UTP
Características físicas de los cables UTPCaracterísticas físicas de los cables UTP
Características físicas de los cables UTP
 
Overview of Linux
Overview of LinuxOverview of Linux
Overview of Linux
 
Capa de transporte - capa 4 osi
Capa de transporte - capa 4 osiCapa de transporte - capa 4 osi
Capa de transporte - capa 4 osi
 
RTI Data-Distribution Service (DDS) Master Class - 2010
RTI Data-Distribution Service (DDS) Master Class - 2010RTI Data-Distribution Service (DDS) Master Class - 2010
RTI Data-Distribution Service (DDS) Master Class - 2010
 
Arp,rarp y tecnicas de multidifusion
Arp,rarp y tecnicas de multidifusionArp,rarp y tecnicas de multidifusion
Arp,rarp y tecnicas de multidifusion
 
RTI Data-Distribution Service (DDS) Master Class 2011
RTI Data-Distribution Service (DDS) Master Class 2011RTI Data-Distribution Service (DDS) Master Class 2011
RTI Data-Distribution Service (DDS) Master Class 2011
 

Similaire à Reactive Stream Processing in Industrial IoT using DDS and Rx

Reactive Stream Processing Using DDS and Rx
Reactive Stream Processing Using DDS and RxReactive Stream Processing Using DDS and Rx
Reactive Stream Processing Using DDS and RxSumant Tambe
 
Anaconda and PyData Solutions
Anaconda and PyData SolutionsAnaconda and PyData Solutions
Anaconda and PyData SolutionsTravis Oliphant
 
Detecting Hacks: Anomaly Detection on Networking Data
Detecting Hacks: Anomaly Detection on Networking DataDetecting Hacks: Anomaly Detection on Networking Data
Detecting Hacks: Anomaly Detection on Networking DataJames Sirota
 
Detecting Hacks: Anomaly Detection on Networking Data
Detecting Hacks: Anomaly Detection on Networking DataDetecting Hacks: Anomaly Detection on Networking Data
Detecting Hacks: Anomaly Detection on Networking DataDataWorks Summit
 
Enterprise Software Architecture styles
Enterprise Software Architecture stylesEnterprise Software Architecture styles
Enterprise Software Architecture stylesAraf Karsh Hamid
 
First in Class: Optimizing the Data Lake for Tighter Integration
First in Class: Optimizing the Data Lake for Tighter IntegrationFirst in Class: Optimizing the Data Lake for Tighter Integration
First in Class: Optimizing the Data Lake for Tighter IntegrationInside Analysis
 
Cytoscape CI Chapter 2
Cytoscape CI Chapter 2Cytoscape CI Chapter 2
Cytoscape CI Chapter 2bdemchak
 
Standing on the Shoulders of Open-Source Giants: The Serverless Realtime Lake...
Standing on the Shoulders of Open-Source Giants: The Serverless Realtime Lake...Standing on the Shoulders of Open-Source Giants: The Serverless Realtime Lake...
Standing on the Shoulders of Open-Source Giants: The Serverless Realtime Lake...HostedbyConfluent
 
Flash session -streaming--ses1243-lon
Flash session -streaming--ses1243-lonFlash session -streaming--ses1243-lon
Flash session -streaming--ses1243-lonJeffrey T. Pollock
 
WhatIsData-Blitz
WhatIsData-BlitzWhatIsData-Blitz
WhatIsData-Blitzpharvener
 
Continuum Analytics and Python
Continuum Analytics and PythonContinuum Analytics and Python
Continuum Analytics and PythonTravis Oliphant
 
BDW Chicago 2016 - Jim Scott, Director, Enterprise Strategy & Architecture - ...
BDW Chicago 2016 - Jim Scott, Director, Enterprise Strategy & Architecture - ...BDW Chicago 2016 - Jim Scott, Director, Enterprise Strategy & Architecture - ...
BDW Chicago 2016 - Jim Scott, Director, Enterprise Strategy & Architecture - ...Big Data Week
 
Monitoring as an entry point for collaboration
Monitoring as an entry point for collaborationMonitoring as an entry point for collaboration
Monitoring as an entry point for collaborationJulien Pivotto
 
Ultralight Data Movement for IoT with SDC Edge
Ultralight Data Movement for IoT with SDC EdgeUltralight Data Movement for IoT with SDC Edge
Ultralight Data Movement for IoT with SDC EdgeDataWorks Summit
 
Ronan Corkery, kdb+ developer at Kx Systems: “Kdb+: How Wall Street Tech can ...
Ronan Corkery, kdb+ developer at Kx Systems: “Kdb+: How Wall Street Tech can ...Ronan Corkery, kdb+ developer at Kx Systems: “Kdb+: How Wall Street Tech can ...
Ronan Corkery, kdb+ developer at Kx Systems: “Kdb+: How Wall Street Tech can ...Maya Lumbroso
 
Ronan Corkery, kdb+ developer at Kx Systems: “Kdb+: How Wall Street Tech can ...
Ronan Corkery, kdb+ developer at Kx Systems: “Kdb+: How Wall Street Tech can ...Ronan Corkery, kdb+ developer at Kx Systems: “Kdb+: How Wall Street Tech can ...
Ronan Corkery, kdb+ developer at Kx Systems: “Kdb+: How Wall Street Tech can ...Dataconomy Media
 
Monitoring and Scaling Redis at DataDog - Ilan Rabinovitch, DataDog
 Monitoring and Scaling Redis at DataDog - Ilan Rabinovitch, DataDog Monitoring and Scaling Redis at DataDog - Ilan Rabinovitch, DataDog
Monitoring and Scaling Redis at DataDog - Ilan Rabinovitch, DataDogRedis Labs
 
Horses for Courses: Database Roundtable
Horses for Courses: Database RoundtableHorses for Courses: Database Roundtable
Horses for Courses: Database RoundtableEric Kavanagh
 
Integration Patterns for Big Data Applications
Integration Patterns for Big Data ApplicationsIntegration Patterns for Big Data Applications
Integration Patterns for Big Data ApplicationsMichael Häusler
 

Similaire à Reactive Stream Processing in Industrial IoT using DDS and Rx (20)

Reactive Stream Processing Using DDS and Rx
Reactive Stream Processing Using DDS and RxReactive Stream Processing Using DDS and Rx
Reactive Stream Processing Using DDS and Rx
 
Anaconda and PyData Solutions
Anaconda and PyData SolutionsAnaconda and PyData Solutions
Anaconda and PyData Solutions
 
Detecting Hacks: Anomaly Detection on Networking Data
Detecting Hacks: Anomaly Detection on Networking DataDetecting Hacks: Anomaly Detection on Networking Data
Detecting Hacks: Anomaly Detection on Networking Data
 
Detecting Hacks: Anomaly Detection on Networking Data
Detecting Hacks: Anomaly Detection on Networking DataDetecting Hacks: Anomaly Detection on Networking Data
Detecting Hacks: Anomaly Detection on Networking Data
 
Enterprise Software Architecture styles
Enterprise Software Architecture stylesEnterprise Software Architecture styles
Enterprise Software Architecture styles
 
First in Class: Optimizing the Data Lake for Tighter Integration
First in Class: Optimizing the Data Lake for Tighter IntegrationFirst in Class: Optimizing the Data Lake for Tighter Integration
First in Class: Optimizing the Data Lake for Tighter Integration
 
Cytoscape CI Chapter 2
Cytoscape CI Chapter 2Cytoscape CI Chapter 2
Cytoscape CI Chapter 2
 
Standing on the Shoulders of Open-Source Giants: The Serverless Realtime Lake...
Standing on the Shoulders of Open-Source Giants: The Serverless Realtime Lake...Standing on the Shoulders of Open-Source Giants: The Serverless Realtime Lake...
Standing on the Shoulders of Open-Source Giants: The Serverless Realtime Lake...
 
Flash session -streaming--ses1243-lon
Flash session -streaming--ses1243-lonFlash session -streaming--ses1243-lon
Flash session -streaming--ses1243-lon
 
WhatIsData-Blitz
WhatIsData-BlitzWhatIsData-Blitz
WhatIsData-Blitz
 
Analytics&IoT
Analytics&IoTAnalytics&IoT
Analytics&IoT
 
Continuum Analytics and Python
Continuum Analytics and PythonContinuum Analytics and Python
Continuum Analytics and Python
 
BDW Chicago 2016 - Jim Scott, Director, Enterprise Strategy & Architecture - ...
BDW Chicago 2016 - Jim Scott, Director, Enterprise Strategy & Architecture - ...BDW Chicago 2016 - Jim Scott, Director, Enterprise Strategy & Architecture - ...
BDW Chicago 2016 - Jim Scott, Director, Enterprise Strategy & Architecture - ...
 
Monitoring as an entry point for collaboration
Monitoring as an entry point for collaborationMonitoring as an entry point for collaboration
Monitoring as an entry point for collaboration
 
Ultralight Data Movement for IoT with SDC Edge
Ultralight Data Movement for IoT with SDC EdgeUltralight Data Movement for IoT with SDC Edge
Ultralight Data Movement for IoT with SDC Edge
 
Ronan Corkery, kdb+ developer at Kx Systems: “Kdb+: How Wall Street Tech can ...
Ronan Corkery, kdb+ developer at Kx Systems: “Kdb+: How Wall Street Tech can ...Ronan Corkery, kdb+ developer at Kx Systems: “Kdb+: How Wall Street Tech can ...
Ronan Corkery, kdb+ developer at Kx Systems: “Kdb+: How Wall Street Tech can ...
 
Ronan Corkery, kdb+ developer at Kx Systems: “Kdb+: How Wall Street Tech can ...
Ronan Corkery, kdb+ developer at Kx Systems: “Kdb+: How Wall Street Tech can ...Ronan Corkery, kdb+ developer at Kx Systems: “Kdb+: How Wall Street Tech can ...
Ronan Corkery, kdb+ developer at Kx Systems: “Kdb+: How Wall Street Tech can ...
 
Monitoring and Scaling Redis at DataDog - Ilan Rabinovitch, DataDog
 Monitoring and Scaling Redis at DataDog - Ilan Rabinovitch, DataDog Monitoring and Scaling Redis at DataDog - Ilan Rabinovitch, DataDog
Monitoring and Scaling Redis at DataDog - Ilan Rabinovitch, DataDog
 
Horses for Courses: Database Roundtable
Horses for Courses: Database RoundtableHorses for Courses: Database Roundtable
Horses for Courses: Database Roundtable
 
Integration Patterns for Big Data Applications
Integration Patterns for Big Data ApplicationsIntegration Patterns for Big Data Applications
Integration Patterns for Big Data Applications
 

Plus de Sumant Tambe

Kafka tiered-storage-meetup-2022-final-presented
Kafka tiered-storage-meetup-2022-final-presentedKafka tiered-storage-meetup-2022-final-presented
Kafka tiered-storage-meetup-2022-final-presentedSumant Tambe
 
Systematic Generation Data and Types in C++
Systematic Generation Data and Types in C++Systematic Generation Data and Types in C++
Systematic Generation Data and Types in C++Sumant Tambe
 
Tuning kafka pipelines
Tuning kafka pipelinesTuning kafka pipelines
Tuning kafka pipelinesSumant Tambe
 
New Tools for a More Functional C++
New Tools for a More Functional C++New Tools for a More Functional C++
New Tools for a More Functional C++Sumant Tambe
 
C++ Generators and Property-based Testing
C++ Generators and Property-based TestingC++ Generators and Property-based Testing
C++ Generators and Property-based TestingSumant Tambe
 
RPC over DDS Beta 1
RPC over DDS Beta 1RPC over DDS Beta 1
RPC over DDS Beta 1Sumant Tambe
 
Remote Log Analytics Using DDS, ELK, and RxJS
Remote Log Analytics Using DDS, ELK, and RxJSRemote Log Analytics Using DDS, ELK, and RxJS
Remote Log Analytics Using DDS, ELK, and RxJSSumant Tambe
 
Property-based Testing and Generators (Lua)
Property-based Testing and Generators (Lua)Property-based Testing and Generators (Lua)
Property-based Testing and Generators (Lua)Sumant Tambe
 
Reactive Stream Processing for Data-centric Publish/Subscribe
Reactive Stream Processing for Data-centric Publish/SubscribeReactive Stream Processing for Data-centric Publish/Subscribe
Reactive Stream Processing for Data-centric Publish/SubscribeSumant Tambe
 
Fun with Lambdas: C++14 Style (part 2)
Fun with Lambdas: C++14 Style (part 2)Fun with Lambdas: C++14 Style (part 2)
Fun with Lambdas: C++14 Style (part 2)Sumant Tambe
 
Fun with Lambdas: C++14 Style (part 1)
Fun with Lambdas: C++14 Style (part 1)Fun with Lambdas: C++14 Style (part 1)
Fun with Lambdas: C++14 Style (part 1)Sumant Tambe
 
An Extensible Architecture for Avionics Sensor Health Assessment Using DDS
An Extensible Architecture for Avionics Sensor Health Assessment Using DDSAn Extensible Architecture for Avionics Sensor Health Assessment Using DDS
An Extensible Architecture for Avionics Sensor Health Assessment Using DDSSumant Tambe
 
Overloading in Overdrive: A Generic Data-Centric Messaging Library for DDS
Overloading in Overdrive: A Generic Data-Centric Messaging Library for DDSOverloading in Overdrive: A Generic Data-Centric Messaging Library for DDS
Overloading in Overdrive: A Generic Data-Centric Messaging Library for DDSSumant Tambe
 
Standardizing the Data Distribution Service (DDS) API for Modern C++
Standardizing the Data Distribution Service (DDS) API for Modern C++Standardizing the Data Distribution Service (DDS) API for Modern C++
Standardizing the Data Distribution Service (DDS) API for Modern C++Sumant Tambe
 
C++11 Idioms @ Silicon Valley Code Camp 2012
C++11 Idioms @ Silicon Valley Code Camp 2012 C++11 Idioms @ Silicon Valley Code Camp 2012
C++11 Idioms @ Silicon Valley Code Camp 2012 Sumant Tambe
 
Retargeting Embedded Software Stack for Many-Core Systems
Retargeting Embedded Software Stack for Many-Core SystemsRetargeting Embedded Software Stack for Many-Core Systems
Retargeting Embedded Software Stack for Many-Core SystemsSumant Tambe
 
Ph.D. Dissertation
Ph.D. DissertationPh.D. Dissertation
Ph.D. DissertationSumant Tambe
 
Native XML processing in C++ (BoostCon'11)
Native XML processing in C++ (BoostCon'11)Native XML processing in C++ (BoostCon'11)
Native XML processing in C++ (BoostCon'11)Sumant Tambe
 

Plus de Sumant Tambe (19)

Kafka tiered-storage-meetup-2022-final-presented
Kafka tiered-storage-meetup-2022-final-presentedKafka tiered-storage-meetup-2022-final-presented
Kafka tiered-storage-meetup-2022-final-presented
 
Systematic Generation Data and Types in C++
Systematic Generation Data and Types in C++Systematic Generation Data and Types in C++
Systematic Generation Data and Types in C++
 
Tuning kafka pipelines
Tuning kafka pipelinesTuning kafka pipelines
Tuning kafka pipelines
 
New Tools for a More Functional C++
New Tools for a More Functional C++New Tools for a More Functional C++
New Tools for a More Functional C++
 
C++ Coroutines
C++ CoroutinesC++ Coroutines
C++ Coroutines
 
C++ Generators and Property-based Testing
C++ Generators and Property-based TestingC++ Generators and Property-based Testing
C++ Generators and Property-based Testing
 
RPC over DDS Beta 1
RPC over DDS Beta 1RPC over DDS Beta 1
RPC over DDS Beta 1
 
Remote Log Analytics Using DDS, ELK, and RxJS
Remote Log Analytics Using DDS, ELK, and RxJSRemote Log Analytics Using DDS, ELK, and RxJS
Remote Log Analytics Using DDS, ELK, and RxJS
 
Property-based Testing and Generators (Lua)
Property-based Testing and Generators (Lua)Property-based Testing and Generators (Lua)
Property-based Testing and Generators (Lua)
 
Reactive Stream Processing for Data-centric Publish/Subscribe
Reactive Stream Processing for Data-centric Publish/SubscribeReactive Stream Processing for Data-centric Publish/Subscribe
Reactive Stream Processing for Data-centric Publish/Subscribe
 
Fun with Lambdas: C++14 Style (part 2)
Fun with Lambdas: C++14 Style (part 2)Fun with Lambdas: C++14 Style (part 2)
Fun with Lambdas: C++14 Style (part 2)
 
Fun with Lambdas: C++14 Style (part 1)
Fun with Lambdas: C++14 Style (part 1)Fun with Lambdas: C++14 Style (part 1)
Fun with Lambdas: C++14 Style (part 1)
 
An Extensible Architecture for Avionics Sensor Health Assessment Using DDS
An Extensible Architecture for Avionics Sensor Health Assessment Using DDSAn Extensible Architecture for Avionics Sensor Health Assessment Using DDS
An Extensible Architecture for Avionics Sensor Health Assessment Using DDS
 
Overloading in Overdrive: A Generic Data-Centric Messaging Library for DDS
Overloading in Overdrive: A Generic Data-Centric Messaging Library for DDSOverloading in Overdrive: A Generic Data-Centric Messaging Library for DDS
Overloading in Overdrive: A Generic Data-Centric Messaging Library for DDS
 
Standardizing the Data Distribution Service (DDS) API for Modern C++
Standardizing the Data Distribution Service (DDS) API for Modern C++Standardizing the Data Distribution Service (DDS) API for Modern C++
Standardizing the Data Distribution Service (DDS) API for Modern C++
 
C++11 Idioms @ Silicon Valley Code Camp 2012
C++11 Idioms @ Silicon Valley Code Camp 2012 C++11 Idioms @ Silicon Valley Code Camp 2012
C++11 Idioms @ Silicon Valley Code Camp 2012
 
Retargeting Embedded Software Stack for Many-Core Systems
Retargeting Embedded Software Stack for Many-Core SystemsRetargeting Embedded Software Stack for Many-Core Systems
Retargeting Embedded Software Stack for Many-Core Systems
 
Ph.D. Dissertation
Ph.D. DissertationPh.D. Dissertation
Ph.D. Dissertation
 
Native XML processing in C++ (BoostCon'11)
Native XML processing in C++ (BoostCon'11)Native XML processing in C++ (BoostCon'11)
Native XML processing in C++ (BoostCon'11)
 

Dernier

Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
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
 
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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
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
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 

Dernier (20)

Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
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
 
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?
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
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...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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)
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

Reactive Stream Processing in Industrial IoT using DDS and Rx

  • 1. Your systems. Working as one. Reactive Stream Processing in Industrial IoT using DDS and Rx Sumant Tambe, Ph.D. Principal Research Engineer and Microsoft VC++ MVP Real-Time Innovations, Inc. @sutambe Sept. 21, 2015 © Real-Time Innovations, Inc.
  • 2. Outline • Industrial IoT Systems • Reactive Systems • Data Distribution Service • Stream Processing • Reactive Extensions (Rx) • Rx4DDS • Stream Processing Demos with Shapes 9/21/2015 © Real-Time Innovations, Inc. 2
  • 3. 9/21/2015 © Real-Time Innovations, Inc. 3
  • 4. 9/21/2015 © Real-Time Innovations, Inc. 4
  • 5. Industrial IoT Systems 9/21/2015 © Real-Time Innovations, Inc. 5 Cannot stop processing the information. Live within world-imposed timing. Image source: Google Images
  • 6. 9/21/2015 © 2015 RTI • 6 Image Credit: Cisco
  • 7. Responsive: Reacts to events at the speed of environment Resilient: fault-tolerant Elastic/Scalable: Scales easily up/down with load and cpu cores. Event-Driven: asynchronous, loosely-coupled, modular, pipelined 9/21/2015 © Real-Time Innovations, Inc. 7 Messaging Middleware Reactive Manifesto: www.reactivemanifesto.org Elastic Resilient Responsive Event-Driven
  • 8. Reactive Manifesto 9/21/2015 © Real-Time Innovations, Inc. 8 Jonas Boner: One of the authors of the Reactive Manifesto
  • 9. 9/21/2015 © Real-Time Innovations, Inc. 9 Reactive Middleware
  • 10. DDS: Data Connectivity Standard for the Industrial IoT © 2009 Real-Time Innovations, Inc. Streaming Data Sensors Events Real-Time Applications Enterprise Applications Actuators
  • 11. 9/21/2015 © 2015 RTI • 11 DDS Communication Model FILTERFILTER
  • 12. The DDS Standard Family 12 DDS v 1.4 RTPS v2.2 DDS-SECURITY DDS-RPC* DDS-XTYPES Application UDP TCP** DTLS** TLS** DDS-C++ DDS-JAVA* DDS-IDL-C DDS-IDL-C# SHARED- MEMORY**IP DDS-WEB HTTP(s) IDL4.0 © 2015 RTI
  • 13. 9/21/2015 © 2015 RTI 13 STANDARD AWESOME API Choice
  • 14. 9/21/2015 © Real-Time Innovations, Inc. 14Image source: Amazon, Google A**
  • 15. Stream Processing An architectural style that operates on a continuous sequence of data. 9/21/2015 © Real-Time Innovations, Inc. 15Image credit: eecs.berkeley.edu
  • 16. Unix command line (pipes and filter) 9/21/2015 © Real-Time Innovations, Inc. 16
  • 17. Data Pipelines o/p Where Once CombineLatest Select Scan Merge Raw Data i/p
  • 18. Reactive Extensions (Rx) • Invented at Microsoft (Erik Meijer and team) • API for composing asynchronous and event- based programs using observable streams • Rx = Observables + Composition + Schedulers • Observables: First-class streams • Composition: Filter, select, aggregate (reduce), compose and perform time-based operations on multiple streams • Schedulers: Concurrency. Thread-pools, etc. • Uses Functional Programming (Monadic) • Rx.NET, RxJava, RxJS, RxCpp, RxRuby, RxPython, and many more… 9/21/2015 © Real-Time Innovations, Inc. 18 More info: https://speakerdeck.com/benjchristensen/reactive-programming-with-rx-at-qconsf-2014
  • 19. Duality of Push and Pull Interfaces (C#) Pull Push IEnumerator<out T> T Current { get; } bool MoveNext() IObserver<in T> void OnNext(T value) void OnCompleted() void OnError(Exception ex) IEnumerable<out T> IEnumerator<T> GetEnumerator(); IObservable<out T> IDisposable Subscribe(IObserver<T>) 9/21/2015 © Real-Time Innovations, Inc. 19 Duality (video): http://channel9.msdn.com/Shows/Going+Deep/Expert-to-Expert-Brian-Beckman-and-Erik-Meijer-Inside-the-NET-Reactive-Framework-Rx
  • 20. Sync/Async, One/Many 9/21/2015 © Real-Time Innovations, Inc. 20 Single Multiple Sync T get_data() std::vector<T>::iterator Async future<T> with .then() .next() (hpx, boost, C++17) rxcpp::observable<T>
  • 21. RxCpp Example (1/3) rxcpp::observable<int> values = rxcpp::observable<>::range(1, 5); 9/21/2015 © Real-Time Innovations, Inc. 21 auto subscription = values.subscribe( [](int v){ printf("OnNext: %dn", v); }, [](){ printf("OnCompletedn"); });
  • 22. RxCpp Example (2/3) auto subscription = rxcpp::observable<>::range(1, 5) 9/21/2015 © Real-Time Innovations, Inc. 22 .map([](int i) { return 10*i; }) .filter([](int v) { return (v % 15) != 0; }) .subscribe( [](int v){ printf("OnNext: %dn", v); }, [](){ printf("OnCompletedn"); });
  • 23. Map Marble Diagram 9/21/2015 Real-Time Innovations, Inc. 23 Credit: rxmarbles.com
  • 24. RxCpp Example (3/3) auto o1 = rx::observable<>::interval(std::chrono::seconds(2)); auto o2 = rx::observable<>::interval(std::chrono::seconds(3)); 9/21/2015 © Real-Time Innovations, Inc. 24 auto values = o1.map([](int i) { return char('A' + i); }) .combine_latest(o2); values .take(10) .subscribe( [](std::tuple<char, int> v) { printf("OnNext: %c, %dn", std::get<0>(v), std::get<1>(v)); }, []() { printf("OnCompletedn"); });
  • 25. RxCpp Output 9/21/2015 © Real-Time Innovations, Inc. 25
  • 26. Hot and Cold Observables 9/21/2015 Real-Time Innovations, Inc. 26 Hot Cold Meaning Emits whether you are ready or not and regardless of subscribers Emits when requested. Starts from the beginning with every subscription Examples 1. Mouse movements 2. User input 3. Stock prices 4. DDS Topic 1. Reading a file 2. Database query 3. observable.interval Semantics Receiver must keep up or use sampling. May lose data Receiver can exert backpressure
  • 27. 9/21/2015 © 2015 RTI • 27
  • 28. Rx4DDS = DDS + Rx 9/21/2015 © 2015 RTI • 28 • Rx bindings for DDS data – In C++11, C#, and JavaScript • Anything that produces data is an Observable – Topics – Discovery – Statuses More info: http://rticommunity.github.io/rticonnextdds-reactive/
  • 29. DDS for Distribution, Rx for Processing 9/21/2015 Real-Time Innovations, Inc. 29 DataReader Observable Observer DataWriter DataWriter Processing DataReader DataReader
  • 30. 9/21/2015 © 2015 RTI • 30 DDS and Rx: A Great Match DDS Rx Design Methodology Data-Centric Reactive, Compositional Architecture Distributed Publish-subscribe In-memory Observable- Observer. Monadic Anonymity/loose coupling Publisher does not know about subscribers Observable does not know about observers Data Streaming A Topic<T> is a stream of data samples of type T An Observable<T> is a stream of object of type T Stream lifecycle Instances (keys) have lifecycle (NewAliveDisposed) Observables have lifecycle OnNext*[OnCompleted|OnError] Data Publication Publisher may publish without any subscriber “Hot” Observables Data Reception Subscriber may read the same data over and over “Cold” Observables
  • 31. DDS and Rx: A Great Match 9/21/2015 © 2015 RTI • 31 DDS Concept Rx Concept/Type/Operator Topic of type T An object that implements IObservable<T>, which internally creates a DataReader<T> Communication status, Discovery event streams IObservable<SampleLostStatus> IObservable<SubscriptionBuiltinTopicData> Topic of type T with key type=Key IObservable<IGroupedObservable<Key, T>> Detect a new instance Notify Observers about a new IGroupedObservable<Key, T> with key==instance. Invoke IObserver<IGroupedObservable<Key, T>>.OnNext() Dispose an instance Notify Observers through IObserver<IGroupedObservable<Key,T>>.OnCompleted() Take an instance update of type T Notify Observers about a new value of T using Iobserver<T>.OnNext() Read with history=N IObservable<T>.Replay(N) (Produces a new IObservable<T>)
  • 32. DDS and Rx: A Great Match 9/21/2015 © 2015 RTI 32 DDS Concept Rx Concept/Type/Operation Query Conditions Iobservable<T>.Where(…) OR Iobservable<T>.GroupBy(…) SELECT in CFT expression IObservable<T>.Select(...) FROM in CFT expression DDSObservable.FromTopic(“Topic1”) DDSObservable.FromKeyedTopic(“Topic2”) WHERE in CFT expression IObservable<T>.Where(...) ORDER BY in CFT expression IObservable<T>.OrderBy(...) MultiTopic (INNER JOIN) IObservable<T>.Join(...) .Where(...) .Select(...) Join between DDS and non- DDS data Join, CombineLatest, Zip
  • 33. Decoupling Data Production from Consumption • Two ways to access DDS data – WaitSet-based blocking and dispatch (like select) – Listener-based (m/w calls you back) • Each has pros/cons and different APIs and leads to very different code structure • Observables allows us to change data production technique without changing data consuming code • Data consuming code is written in the same declarative chaining style 9/21/2015 Real-Time Innovations, Inc. 33
  • 34. Stream Processing Demos with Shapes 9/21/2015 © Real-Time Innovations, Inc. 34 class ShapeType { string color; //@key int shapesize; int x; int y; } • 3 DDS Topics – “Square” – “Triangle” – “Circle”
  • 35. Solar System Demo 9/21/2015 Real-Time Innovations, Inc. 35 Link: https://youtu.be/mHNyEPeOPHg (1 min)
  • 36. rx4dds::TopicSubscription<ShapeType> topic_sub(participant, "Square", waitset, worker); 9/21/2015 Real-Time Innovations, Inc. 36 rx::observable<ShapeType> square_track = source >> rx4dds::complete_on_dispose() >> rx4dds::error_on_no_alive_writers() >> filter([](LoanedSample<ShapeType> s) { return s.info().valid(); }) // skip invalid samples rx::observable<LoanedSample<ShapeType>> source = topic_sub.create_observable(); >> map([](LoanedSample<ShapeType> valid) { return valid.data(); }); // map samples to data
  • 37. 9/21/2015 © Real-Time Innovations, Inc. 37 int circle_degree = 0; square_track .map([circle_degree](ShapeType & square) mutable { circle_degree = (circle_degree + 3) % 360; return shape_location(square, circle_degree); }) .tap([circle_writer](ShapeType & circle) mutable { circle_writer.write(circle); }); // tap replaced as publish_over_dds later Map to Circle Track rx::observable<ShapeType> circle_track =
  • 38. 9/21/2015 Real-Time Innovations, Inc. 38 int tri_degree = 0; circle_track .map([tri_degree](ShapeType & circle) mutable { tri_degree = (tri_degree + 9) % 360; return shape_location(circle, tri_degree); }) >> rx4dds::publish_over_dds(triangle_writer); triangle_track.subscribe(); Map to Triangle Track rx::observable<ShapeType> triangle_track =
  • 39. Naming Transformations (C++14) 9/21/2015 Real-Time Innovations, Inc. 39 auto skip_invalid_samples() { return [](auto src_observable) { }; } return src_observable .filter([](auto & sample) { return sample.info().valid() });
  • 40. Naming Transformations (C++11) 9/21/2015 Real-Time Innovations, Inc. 40 struct MapSampleToDataOp { template <class Observable> rx::observable<typename Observable::value_type::DataType> operator ()(Observable src) const { typedef typename Observable::value_type LoanedSample; return src.map([](LoanedSample & sample) { return sample.data() }); } }; inline MapSampleToDataOp map_samples_to_data() { return MapSampleToDataOp(); }
  • 41. 9/21/2015 Real-Time Innovations, Inc. 41 27,572 cables Source: Google Images
  • 42. Data Pipelines Demo Next o/p Where Once CombineLatest Select Scan Merge Raw Data i/p
  • 43. Data Pipelines Demo 9/21/2015 Real-Time Innovations, Inc. 43 Link: https://youtu.be/2Pz91e7yR5I (3 min)
  • 44. 9/21/2015 Real-Time Innovations, Inc. 44 rx4dds::TopicSubscription<ShapeType> topic_sub(participant, "Square", waitset, worker); auto grouped_stream = topic_sub.create_observable() >> group_by_instance ([](ShapeType & shape) { return shape.color(); }); decltype(grouped_stream) === rx::observable< rx::grouped_observable< string, LoanedSample<ShapeType> > >
  • 45. 9/21/2015 © Real-Time Innovations, Inc. 45 grouped_stream .flat_map([circle_writer, triangle_writer] (GroupedShapeObservable go) { >> complete_on_dispose() rx::observable<ShapeType> inner_transformed = go >> to_unkeyed() >> error_on_no_alive_writers() >> skip_invalid_samples() >> map_samples_to_data() >> map_to_circle_track() // as shown before >> publish_over_dds( circle_writer, ShapeType(go.key()) >> map_to_triangle_track() // as shown before >> publish_over_dds( triangle_writer, ShapeType(go.key()); return inner_transformed; }).subscribe();
  • 46. Dynamic Correlator 9/21/2015 Real-Time Innovations, Inc. 46 Link: https://youtu.be/tZutExU6r0w (1 min)
  • 47. 9/21/2015 © Real-Time Innovations, Inc. 47 grouped_stream .map([](GroupedShapeObservable go) { >> rx4dds::complete_on_dispose() return go >> rx4dds::to_unkeyed() >> rx4dds::error_on_no_alive_writers() >> rx4dds::skip_invalid_samples() >> rx4dds::map_samples_to_data(); >> rxcpp::switch_on_next() >> rxcpp::map([](const std::vector<ShapeType> & shapes) { return calculate_average(shapes); }) }) >> rx4dds::coalesce_alive() >> map([](const vector<rxcpp::observable<ShapeType>> & srcs) { return rx4dds::combine_latest(srcs); }) >> rx4dds::publish_over_dds(triangle_writer, ShapeType(“ORANGE”));
  • 48. My ¢2 on FP in C++11 • Noisy!! – Lambda captures, mutable • Lambdas don’t extend local object lifetimes when captured – Consequence: shared_ptr galore! • Death by auto – auto-heavy code is not readable – Compiler errors far away from the erroneous line – Please don’t remove types if you have them already – Types are the best documentation • RxCpp – Learning Rx.NET, RxJS first strongly recommended – Frequently very, very long observable types – Use as_dynamic() but beware of performance implications 9/21/2015 Real-Time Innovations, Inc. 48
  • 49. Resources • Rx – LearnRx (RxJS) by JHusain from Netflix – Intro To Rx (Rx.NET) by Lee Campbell – rxmarbles.com (interactive marble diagrams) – ReactiveX.io (API docs in multiple languages) • Rx4DDS Stream Processing – Github [bit.ly/cppcon-rx4dds] – Research Paper [link] • DDS – Object Management Group [http://portals.omg.org/dds] – RTI [www.rti.com] 9/21/2015 Real-Time Innovations, Inc. 49
  • 50. Thank You! 9/21/2015 Real-Time Innovations, Inc. 50