SlideShare a Scribd company logo
1 of 50
Download to read offline
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

More Related Content

What's hot

remote procedure calls
  remote procedure calls  remote procedure calls
remote procedure callsAshish Kumar
 
Kafka Overview
Kafka OverviewKafka Overview
Kafka Overviewiamtodor
 
Event Driven Architecture
Event Driven ArchitectureEvent Driven Architecture
Event Driven ArchitectureChris Patterson
 
Introduction To RabbitMQ
Introduction To RabbitMQIntroduction To RabbitMQ
Introduction To RabbitMQKnoldus Inc.
 
Event Sourcing & CQRS, Kafka, Rabbit MQ
Event Sourcing & CQRS, Kafka, Rabbit MQEvent Sourcing & CQRS, Kafka, Rabbit MQ
Event Sourcing & CQRS, Kafka, Rabbit MQAraf Karsh Hamid
 
Cryptography on cloud
Cryptography on cloudCryptography on cloud
Cryptography on cloudkrprashant94
 
CloudOpen 2012 OpenNebula talk
CloudOpen 2012 OpenNebula talkCloudOpen 2012 OpenNebula talk
CloudOpen 2012 OpenNebula talkOpenNebula Project
 
System models in distributed system
System models in distributed systemSystem models in distributed system
System models in distributed systemishapadhy
 
클라우드의 대세 쿠버네티스란 무엇인가?(윤성훈 클라우드 솔루션 아키텍트) - Webinar
클라우드의 대세 쿠버네티스란 무엇인가?(윤성훈 클라우드 솔루션 아키텍트) - Webinar클라우드의 대세 쿠버네티스란 무엇인가?(윤성훈 클라우드 솔루션 아키텍트) - Webinar
클라우드의 대세 쿠버네티스란 무엇인가?(윤성훈 클라우드 솔루션 아키텍트) - WebinarNAVER CLOUD PLATFORMㅣ네이버 클라우드 플랫폼
 
Function Mesh for Apache Pulsar, the Way for Simple Streaming Solutions
Function Mesh for Apache Pulsar, the Way for Simple Streaming SolutionsFunction Mesh for Apache Pulsar, the Way for Simple Streaming Solutions
Function Mesh for Apache Pulsar, the Way for Simple Streaming SolutionsStreamNative
 
An introduction to Microservices
An introduction to MicroservicesAn introduction to Microservices
An introduction to MicroservicesCisco DevNet
 
Apache kafka-a distributed streaming platform
Apache kafka-a distributed streaming platformApache kafka-a distributed streaming platform
Apache kafka-a distributed streaming platformconfluent
 

What's hot (20)

Distributed Mutual exclusion algorithms
Distributed Mutual exclusion algorithmsDistributed Mutual exclusion algorithms
Distributed Mutual exclusion algorithms
 
Message passing in Distributed Computing Systems
Message passing in Distributed Computing SystemsMessage passing in Distributed Computing Systems
Message passing in Distributed Computing Systems
 
Pub/Sub Messaging
Pub/Sub MessagingPub/Sub Messaging
Pub/Sub Messaging
 
High–Performance Computing
High–Performance ComputingHigh–Performance Computing
High–Performance Computing
 
remote procedure calls
  remote procedure calls  remote procedure calls
remote procedure calls
 
Kafka Overview
Kafka OverviewKafka Overview
Kafka Overview
 
Peer to Peer services and File systems
Peer to Peer services and File systemsPeer to Peer services and File systems
Peer to Peer services and File systems
 
Event Driven Architecture
Event Driven ArchitectureEvent Driven Architecture
Event Driven Architecture
 
Introduction To RabbitMQ
Introduction To RabbitMQIntroduction To RabbitMQ
Introduction To RabbitMQ
 
Amqp Basic
Amqp BasicAmqp Basic
Amqp Basic
 
CS6601 DISTRIBUTED SYSTEMS
CS6601 DISTRIBUTED SYSTEMSCS6601 DISTRIBUTED SYSTEMS
CS6601 DISTRIBUTED SYSTEMS
 
Event Sourcing & CQRS, Kafka, Rabbit MQ
Event Sourcing & CQRS, Kafka, Rabbit MQEvent Sourcing & CQRS, Kafka, Rabbit MQ
Event Sourcing & CQRS, Kafka, Rabbit MQ
 
Cryptography on cloud
Cryptography on cloudCryptography on cloud
Cryptography on cloud
 
CloudOpen 2012 OpenNebula talk
CloudOpen 2012 OpenNebula talkCloudOpen 2012 OpenNebula talk
CloudOpen 2012 OpenNebula talk
 
System models in distributed system
System models in distributed systemSystem models in distributed system
System models in distributed system
 
클라우드의 대세 쿠버네티스란 무엇인가?(윤성훈 클라우드 솔루션 아키텍트) - Webinar
클라우드의 대세 쿠버네티스란 무엇인가?(윤성훈 클라우드 솔루션 아키텍트) - Webinar클라우드의 대세 쿠버네티스란 무엇인가?(윤성훈 클라우드 솔루션 아키텍트) - Webinar
클라우드의 대세 쿠버네티스란 무엇인가?(윤성훈 클라우드 솔루션 아키텍트) - Webinar
 
Function Mesh for Apache Pulsar, the Way for Simple Streaming Solutions
Function Mesh for Apache Pulsar, the Way for Simple Streaming SolutionsFunction Mesh for Apache Pulsar, the Way for Simple Streaming Solutions
Function Mesh for Apache Pulsar, the Way for Simple Streaming Solutions
 
An introduction to Microservices
An introduction to MicroservicesAn introduction to Microservices
An introduction to Microservices
 
Apache kafka-a distributed streaming platform
Apache kafka-a distributed streaming platformApache kafka-a distributed streaming platform
Apache kafka-a distributed streaming platform
 
Transport layer security
Transport layer securityTransport layer security
Transport layer security
 

Similar to 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
 

Similar to 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
 

More from 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
 
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/SubscribeSumant 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
 

More from Sumant Tambe (20)

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++
 
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
 
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)
 

Recently uploaded

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
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
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 

Recently uploaded (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
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...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 

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