SlideShare a Scribd company logo
Event-sourced system
through Reactive Streams
Workshop
Agenda
• 18:30 presentation introduction
• 19:00 exercise project reactor intro
• 19:30 short break
• 19:40 presentation event-sourcing
• 19:50 workshop
• 21:00 Closing & Networking
Reactive programming Belgium
R be
Reactive Programming Belgium
Your non-blocking resource in a reactive world
“We believe that RP is a good fit for
the challenges that
current applications/architectures entail”
Reactive Programming Belgium
Your non-blocking resource in a reactive world
• Research
• Share
• Blog
http://www.reactiveprogramming.be
• Meetups
https://www.meetup.com/Reactive-Programming-Belgium/
• Presentations
• ...
Reactive Programming Belgium
Your non-blocking resource in a reactive world
• Want to help?
• Writing articles (blog)
• Ideas/speakers/presenting…
• Prepare workshops
• Ad-hoc experiments
• ...
Reactive Programming Belgium
Your non-blocking resource in a reactive world
• Workshop :
‘Event-sourced system through Reactive Streams’
Reactive programming
Reactive programming
Applications today
• Applications today
• Increased magnitude of scale
• Big data (IoT, devices, …)
• Realtime
• Ex. Flight recorder
1 sec of flight = 1.5 TB of data
• Re-think the way we create applications
Reactive programming
Origin
• Origin @ Microsoft
• Erik Meijer
• Reactive programming framework (Reactive Extensions) for .NET
Reactive programming
Yet another programming model?
• Reactive
Something that responds to stimuli and actions
• Reactive Programming
• Rehashed programming model that emphasizes on scalability & response
• A way to build a scalable architecture that’s resilient and quick to react to
stimuli
• Ex. spreadsheet
Reactive programming
Data pipeline
• CRUD
• database -> function/process -> database
• Data pipeline
• data -> function -> data -> function -> data
• Data transformation instead of data manipulation
Reactive programming
Programming model – Reactive Streams
• Publisher (emit data)
• Subscriber (receive data)
• Subscription (~ session / context info)
• Processor
Flux.range(1, 10)
.filter(i -> isEven(i))
.map(i -> i * 2)
.subscribe(System.out::println);
Project reactor
Reactive programming
Programming model – Reactive Streams
• Publisher
onComplete()
onError()
next()
Reactive programming
Programming model – Reactive Streams
• Backpressure
Reactive programming
Programming model – Reactive Streams
• Java 9 Reactive Streams
• API (Publisher, Subscriber, Subscription, Processor)
= Reactive streams spec
• Frameworks/implementations
• RxJava (Netflix), project reactor, Akka-Streams, …
• RxJava 2
• Observable vs. Flowable >> both Publishers
• Project reactor
• Mono (0 - 1), flux (0 ..) >> both Publishers
• Reactive toolkit
• Vert.x
Reactive system
Reactive System
Reactive manifesto
• Elastic
• Message-driven
• Responsive
• Resilience
• Failure = first-class citizen
Reactive System
1 JVM
JVM
data -> function -> data -> function -> data
JVM
Reactive System
Distributed system
JVM
data -> data -> function -> data -> data-> function -> data
JVM
JVM JVM
JVM JVM
Reactive System
Distributed system
• Between jvm's
• http (spring webclient)
• gRPC, RSocket
• Messaging
• Between jvm & database
• non-sql vs sql
• Between jvm & UI
• RxJS
Project reactor
Project reactor
Flux & mono
• Flux = Publisher <0 .. N>
• Mono = Publisher <0 – 1>
Project reactor
Getting started
• Exercises
• Publisher / subscriber
• onComplete
• Error handling
• Backpressure
Project reactor
Getting started
• https://github.com/vanseverk/projectreactorintro
• IDE
• IntelliJ : mark ‘test’ folder as ‘test sources root’
• TODO 01 – 06
• Extra (backpressure)
• TODO 07 - 08
Event sourcing
Event Sourcing
Intro
• Persist events instead of domain objects
• Immutable event-log
• Replaying events can help development, debugging
• No need to lock DB tables
• Can be a perfect fit in event-driven architectures
• Can be designed to handle temporary partitioning
• Microservices handle (or replay) events and store what they require
• Eventual consistency
• Reactive Programming + Events -> Reactive Event Streaming
Event Sourcing
Intro
• Introducting: NATS
• https://nats.io/
• High performance messaging system for cloud native applications, IoT
messaging, and microservices architectures
• High performance, lightweight, many extensions
Event Sourcing
Intro
• Introducing: NATS Streaming
• Event Sourcing + Streaming including replay from time or sequence number
• Durable subscriptions for transient clients
• Persistent/guaranteed (at least once) message delivery
• Pub/Sub ; Request/Reply; Queueing to share work
Workshop
Reactive system: measurements
Architecture
Reactive system: measurements
Practical
• https://github.com/vanseverk/anomalydetection-nats
• 2 branches
• master = exercise (TODO)
• solution
• workshop.pdf
Workshop: Event-sourced system through Reactive Streams

More Related Content

What's hot (20)

PDF
DataStax & O'Reilly Media: Large Scale Data Analytics with Spark and Cassandr...
DataStax Academy
 
PDF
Rounds analytics pipeline
Aviv Laufer
 
PDF
InfluxDB Live Product Training
InfluxData
 
PDF
How Sensor Data Can Help Manufacturers Gain Insight to Reduce Waste, Energy C...
InfluxData
 
PDF
OpenStack monitoring - Unidata S.p.A. Case Report
Davide Guerri
 
PDF
Intro stream processing.be meetup #1
Peter Vandenabeele
 
PPTX
Container Monitoring Best Practices Using AWS and InfluxData by Gunnar Aasen
InfluxData
 
PDF
[WSO2Con USA 2018] Deploying Applications in K8S and Docker
WSO2
 
PDF
Using OPC-UA to Extract IIoT Time Series Data from PLC and SCADA Systems
InfluxData
 
ODP
BigQuery at AppsFlyer - past, present and future
Nir Rubinstein
 
PDF
Making clouds: turning opennebula into a product
Carlo Daffara
 
PDF
Fall in Love with Graphs and Metrics using Grafana
torkelo
 
PPTX
Scalable Open-Source IoT Solutions on Microsoft Azure
Maxim Ivannikov
 
PDF
Migrating a legacy logging system: Etsy’s journey to Elastic Cloud
Elasticsearch
 
PDF
Ceilometer presentation ods havana final - published
eNovance
 
PDF
How KeyBank Used Elastic to Build an Enterprise Monitoring Solution
Elasticsearch
 
PDF
Automate your data flows with Apache NIFI
Adam Doyle
 
PPTX
Rounds tips & tricks
Aviv Laufer
 
PDF
OSMC 2021 | Advanced MySQL optimization and troubleshooting using PMM 2
NETWAYS
 
PPTX
InfluxDB Community Office Hours September 2020
InfluxData
 
DataStax & O'Reilly Media: Large Scale Data Analytics with Spark and Cassandr...
DataStax Academy
 
Rounds analytics pipeline
Aviv Laufer
 
InfluxDB Live Product Training
InfluxData
 
How Sensor Data Can Help Manufacturers Gain Insight to Reduce Waste, Energy C...
InfluxData
 
OpenStack monitoring - Unidata S.p.A. Case Report
Davide Guerri
 
Intro stream processing.be meetup #1
Peter Vandenabeele
 
Container Monitoring Best Practices Using AWS and InfluxData by Gunnar Aasen
InfluxData
 
[WSO2Con USA 2018] Deploying Applications in K8S and Docker
WSO2
 
Using OPC-UA to Extract IIoT Time Series Data from PLC and SCADA Systems
InfluxData
 
BigQuery at AppsFlyer - past, present and future
Nir Rubinstein
 
Making clouds: turning opennebula into a product
Carlo Daffara
 
Fall in Love with Graphs and Metrics using Grafana
torkelo
 
Scalable Open-Source IoT Solutions on Microsoft Azure
Maxim Ivannikov
 
Migrating a legacy logging system: Etsy’s journey to Elastic Cloud
Elasticsearch
 
Ceilometer presentation ods havana final - published
eNovance
 
How KeyBank Used Elastic to Build an Enterprise Monitoring Solution
Elasticsearch
 
Automate your data flows with Apache NIFI
Adam Doyle
 
Rounds tips & tricks
Aviv Laufer
 
OSMC 2021 | Advanced MySQL optimization and troubleshooting using PMM 2
NETWAYS
 
InfluxDB Community Office Hours September 2020
InfluxData
 

Similar to Workshop: Event-sourced system through Reactive Streams (20)

PDF
Springone2gx 2014 Reactive Streams and Reactor
Stéphane Maldini
 
PDF
Reactive systems
Naresh Chintalcheru
 
PDF
Spring 5 Webflux - Advances in Java 2018
Trayan Iliev
 
PDF
Microservices with Spring 5 Webflux - jProfessionals
Trayan Iliev
 
PPTX
Reactive solutions using java 9 and spring reactor
OrenEzer1
 
PDF
Reactive Applications in Java
Alexander Mrynskyi
 
PPT
Reactive programming with examples
Peter Lawrey
 
PDF
Embracing Reactive Streams with Java 9 and Spring 5
Wilder Rodrigues
 
PPTX
Reactive programming
SUDIP GHOSH
 
PDF
Openbar 12 - Leuven - From reactive programming to reactive architecture
Openbar
 
PDF
Reactive Programming in Java and Spring Framework 5
Richard Langlois P. Eng.
 
PDF
Reactive Java Robotics and IoT - IPT Presentation @ Voxxed Days 2016
Trayan Iliev
 
PDF
Let’s go reactive with JAVA
Tech Triveni
 
PPTX
Reactive Programming In Java Using: Project Reactor
Knoldus Inc.
 
PDF
IPT Reactive Java IoT Demo - BGOUG 2018
Trayan Iliev
 
PPTX
Mario Fusco - Reactive programming in Java - Codemotion Milan 2017
Codemotion
 
PDF
Making Machine Learning Easy with H2O and WebFlux
Trayan Iliev
 
PDF
Introduction to Reactive Streams and Reactor 2.5
Stéphane Maldini
 
PPTX
Building Reactive Fast Data & the Data Lake with Akka, Kafka, Spark
Todd Fritz
 
PPTX
Reactive programming intro
Ahmed Ehab AbdulAziz
 
Springone2gx 2014 Reactive Streams and Reactor
Stéphane Maldini
 
Reactive systems
Naresh Chintalcheru
 
Spring 5 Webflux - Advances in Java 2018
Trayan Iliev
 
Microservices with Spring 5 Webflux - jProfessionals
Trayan Iliev
 
Reactive solutions using java 9 and spring reactor
OrenEzer1
 
Reactive Applications in Java
Alexander Mrynskyi
 
Reactive programming with examples
Peter Lawrey
 
Embracing Reactive Streams with Java 9 and Spring 5
Wilder Rodrigues
 
Reactive programming
SUDIP GHOSH
 
Openbar 12 - Leuven - From reactive programming to reactive architecture
Openbar
 
Reactive Programming in Java and Spring Framework 5
Richard Langlois P. Eng.
 
Reactive Java Robotics and IoT - IPT Presentation @ Voxxed Days 2016
Trayan Iliev
 
Let’s go reactive with JAVA
Tech Triveni
 
Reactive Programming In Java Using: Project Reactor
Knoldus Inc.
 
IPT Reactive Java IoT Demo - BGOUG 2018
Trayan Iliev
 
Mario Fusco - Reactive programming in Java - Codemotion Milan 2017
Codemotion
 
Making Machine Learning Easy with H2O and WebFlux
Trayan Iliev
 
Introduction to Reactive Streams and Reactor 2.5
Stéphane Maldini
 
Building Reactive Fast Data & the Data Lake with Akka, Kafka, Spark
Todd Fritz
 
Reactive programming intro
Ahmed Ehab AbdulAziz
 
Ad

Recently uploaded (20)

PPTX
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
PPTX
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
PDF
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
PPTX
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
PDF
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
PDF
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
PPTX
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
PDF
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
PDF
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
PDF
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
PPTX
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
PDF
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
PDF
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
PDF
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
PPTX
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
PPTX
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
PPTX
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
PDF
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
Agentic Automation: Build & Deploy Your First UiPath Agent
klpathrudu
 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
vMix Pro 28.0.0.42 Download vMix Registration key Bundle
kulindacore
 
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
Ad

Workshop: Event-sourced system through Reactive Streams

  • 2. Agenda • 18:30 presentation introduction • 19:00 exercise project reactor intro • 19:30 short break • 19:40 presentation event-sourcing • 19:50 workshop • 21:00 Closing & Networking
  • 4. Reactive Programming Belgium Your non-blocking resource in a reactive world “We believe that RP is a good fit for the challenges that current applications/architectures entail”
  • 5. Reactive Programming Belgium Your non-blocking resource in a reactive world • Research • Share • Blog http://www.reactiveprogramming.be • Meetups https://www.meetup.com/Reactive-Programming-Belgium/ • Presentations • ...
  • 6. Reactive Programming Belgium Your non-blocking resource in a reactive world • Want to help? • Writing articles (blog) • Ideas/speakers/presenting… • Prepare workshops • Ad-hoc experiments • ...
  • 7. Reactive Programming Belgium Your non-blocking resource in a reactive world • Workshop : ‘Event-sourced system through Reactive Streams’
  • 9. Reactive programming Applications today • Applications today • Increased magnitude of scale • Big data (IoT, devices, …) • Realtime • Ex. Flight recorder 1 sec of flight = 1.5 TB of data • Re-think the way we create applications
  • 10. Reactive programming Origin • Origin @ Microsoft • Erik Meijer • Reactive programming framework (Reactive Extensions) for .NET
  • 11. Reactive programming Yet another programming model? • Reactive Something that responds to stimuli and actions • Reactive Programming • Rehashed programming model that emphasizes on scalability & response • A way to build a scalable architecture that’s resilient and quick to react to stimuli • Ex. spreadsheet
  • 12. Reactive programming Data pipeline • CRUD • database -> function/process -> database • Data pipeline • data -> function -> data -> function -> data • Data transformation instead of data manipulation
  • 13. Reactive programming Programming model – Reactive Streams • Publisher (emit data) • Subscriber (receive data) • Subscription (~ session / context info) • Processor Flux.range(1, 10) .filter(i -> isEven(i)) .map(i -> i * 2) .subscribe(System.out::println); Project reactor
  • 14. Reactive programming Programming model – Reactive Streams • Publisher onComplete() onError() next()
  • 15. Reactive programming Programming model – Reactive Streams • Backpressure
  • 16. Reactive programming Programming model – Reactive Streams • Java 9 Reactive Streams • API (Publisher, Subscriber, Subscription, Processor) = Reactive streams spec • Frameworks/implementations • RxJava (Netflix), project reactor, Akka-Streams, … • RxJava 2 • Observable vs. Flowable >> both Publishers • Project reactor • Mono (0 - 1), flux (0 ..) >> both Publishers • Reactive toolkit • Vert.x
  • 18. Reactive System Reactive manifesto • Elastic • Message-driven • Responsive • Resilience • Failure = first-class citizen
  • 19. Reactive System 1 JVM JVM data -> function -> data -> function -> data JVM
  • 20. Reactive System Distributed system JVM data -> data -> function -> data -> data-> function -> data JVM JVM JVM JVM JVM
  • 21. Reactive System Distributed system • Between jvm's • http (spring webclient) • gRPC, RSocket • Messaging • Between jvm & database • non-sql vs sql • Between jvm & UI • RxJS
  • 23. Project reactor Flux & mono • Flux = Publisher <0 .. N> • Mono = Publisher <0 – 1>
  • 24. Project reactor Getting started • Exercises • Publisher / subscriber • onComplete • Error handling • Backpressure
  • 25. Project reactor Getting started • https://github.com/vanseverk/projectreactorintro • IDE • IntelliJ : mark ‘test’ folder as ‘test sources root’ • TODO 01 – 06 • Extra (backpressure) • TODO 07 - 08
  • 27. Event Sourcing Intro • Persist events instead of domain objects • Immutable event-log • Replaying events can help development, debugging • No need to lock DB tables • Can be a perfect fit in event-driven architectures • Can be designed to handle temporary partitioning • Microservices handle (or replay) events and store what they require • Eventual consistency • Reactive Programming + Events -> Reactive Event Streaming
  • 28. Event Sourcing Intro • Introducting: NATS • https://nats.io/ • High performance messaging system for cloud native applications, IoT messaging, and microservices architectures • High performance, lightweight, many extensions
  • 29. Event Sourcing Intro • Introducing: NATS Streaming • Event Sourcing + Streaming including replay from time or sequence number • Durable subscriptions for transient clients • Persistent/guaranteed (at least once) message delivery • Pub/Sub ; Request/Reply; Queueing to share work
  • 32. Reactive system: measurements Practical • https://github.com/vanseverk/anomalydetection-nats • 2 branches • master = exercise (TODO) • solution • workshop.pdf