SlideShare a Scribd company logo
Ryland Degnan CTO, Netifi Inc.
End-to-End Reactive Data Access Using
Reactive Programming
• “Reactive Streams is an initiative to provide a standard for asynchronous
stream processing with non-blocking back pressure. This encompasses
efforts aimed at runtime environments (JVM and JavaScript) as well as
network protocols”
• “The main goal of Reactive Streams is to govern the exchange of stream
data across an asynchronous boundary—think passing elements on to
another thread or thread-pool—while ensuring that the receiving side is
not forced to buffer arbitrary amounts of data.”
• Everything is a stream!
2
Why Non-Blocking?
• CPU consumption per request
• Event loop architecture reduces thread migrations under load, which
lowers CPU cycle consumption per request
• Latency under load
• Tomcat has higher latencies under load due to its thread pool
architecture, which involves thread pool locks (and lock contention)
and thread migrations
• Incredibly important when building microservices
3
Thread Migrations
• Netty achieved a 46%
higher request rate
• As load increases, Netty
begins to experience lower
thread migrations
• There is enough queued
work for event loop threads
to keep servicing requests
without switching
4
Request Maximum Latency
• The degradation in
maximum latency for
Tomcat is much more
severe
• Netty’s latency
breakdown happens with
much higher load
5
Roadblocks
• But there are still some barriers to using Reactive everywhere*
• Data Access
• MongoDB, Apache Cassandra, and Redis
• No relational database access
• Cross-process back pressure (networking)
6
7
R2DBC
• R2DBC engages relational databases with a reactive API, something not
possible with the blocking nature of JDBC and JPA.
• R2DBC is founded on Reactive Streams providing
an asynchronous, non-blocking API, all the way to the database
• Current implementations include:
• PostgreSQL
• H2
• Microsoft SQL Server
8
RSocket
• RSocket is a bi-directional, multiplexed, message-based, binary protocol
based on Reactive Streams back pressure
• It provides out of the box support for four interaction models commonly
seen in cross-application communication
• Request-Response
• Fire-and-Forget
• Request-Stream
• Channel
9
Message Driven Binary Protocol
• Requester-Responder interaction is broken down into frames that
encapsulate messages
• The framing is binary (not human readable like JSON or XML)
• Massive efficiencies for machine-to-machine communication
• Downsides only manifest rarely and can be mitigated with tooling
• Payload Agnostic
• Protobuf, JSON, Custom Binary
10
Multiplexed
• Connections that are only used for a single request are massively
inefficient (HTTP 1.0)
• Pipelining (ordering requests and responses sequentially) is a naive
attempt solving the issue, but results in head-of-line blocking (HTTP
1.1)
• Multiplexing solves the issue by annotating each message on the
connection with a stream id that partitions the connection into multiple
"logical streams"
11
Bi-Directional
• Many protocols (notably not TCP) have a distinction between the client
and server for the lifetime of a connection
• This division means that one side of the connection must initiate all
requests, and the other side must initiate all responses
• Even more flexible protocols like HTTP/2 do not fully drop the
distinction
• Servers cannot start an unrequested stream of data to the client
• Once a client initiates a connection to a server, both parties can be
requestors or responders to a logical stream
• Transport Agnostic
• TCP, Websockets, HTTP/2, Aeron (UDP)
12
Reactive Streams Back Pressure
• Network protocols generally send a single request, and receive an
arbitrarily large response in return
• There is nothing to stop the responder (or even the requestor) from
sending an arbitrarily large amount of data and overwhelming the
receiver
• In cases where TCP back pressure throttles the responder, queues fill
with large amounts of un-transferred data
• Reactive Streams (pull-push) back pressure ensures that data is only
materialized and transferred when receiver is ready to process it
13
HTTP
Reactive Streams Back Pressure
HTTP
Thundering herds
Cascading failure
Circuit breaking
Retry logic
Timeouts
Configuration
Reactive Streams Back Pressure
Demo time
https://github.com/netifi/rsocket-r2dbc-demo
Putting it All Together
R2DBC
Putting it All Together
R2DBC
Putting it All Together
R2DBC
Putting it All Together
R2DBC
Proteus: The RSocket Service Broker
R2DBC
R2DBC
SelfManaging
Proteus
Proteus
ControlCenter
Proteus: The RSocket Service Broker
SelfManaging
Proteus
Proteus
ControlCenter
RSocket
R2DBC
Proteus: The RSocket Service Broker
SelfManaging
Proteus
Proteus
ControlCenter
RSocket RSocket
R2DBC
Proteus: The RSocket Service Broker
SelfManaging
Proteus
Proteus
ControlCenter
RSocketRSocket
RSocket RSocket
R2DBC
Proteus: The RSocket Service Broker
SelfManaging
Proteus
Proteus
ControlCenter
RSocketRSocket
RSocket RSocket RSocket
R2DBC
Proteus: The RSocket Service Broker
SelfManaging
Proteus
Proteus
ControlCenter
RSocketRSocket
RSocket RSocket RSocket RSocket
R2DBC
Proteus: The RSocket Service Broker
Proteus Client
RSocket RPC
https://github.com/rsocket/rsocket-rpc-js
https://github.com/rsocket/rsocket-rpc-java
https://github.com/netifi-proteus/proteus-java
Spring Integration
https://github.com/netifi-proteus/proteus-spring
https://github.com/netifi-proteus/proteus-js
Coming soon: Kotlin, .NET, C++, GraphQL
Netifi Open Source
Proteus PCF Service available
soon®
Netifi Open Source
https://community.netifi.com/
Reactive Platform for Modern Applications
info@netifi.com www.netifi.com

More Related Content

PDF
Welcome to the Reactive Revolution:RSocket and Spring Cloud Gateway - Spencer...
PDF
Multi-service reactive streams using Spring, Reactor, RSocket
PDF
Reactive Web 101: WebFlux, WebClient, and Reactor Netty
PDF
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
PPTX
Network Intent Composition in OpenDaylight
PPTX
Modern Distributed Messaging and RPC
PPTX
Coap based application for android phones-end
PPTX
CoAP Talk
Welcome to the Reactive Revolution:RSocket and Spring Cloud Gateway - Spencer...
Multi-service reactive streams using Spring, Reactor, RSocket
Reactive Web 101: WebFlux, WebClient, and Reactor Netty
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
Network Intent Composition in OpenDaylight
Modern Distributed Messaging and RPC
Coap based application for android phones-end
CoAP Talk

What's hot (20)

PDF
Streams API (Web Engines Hackfest 2015)
PDF
Introduction to gRPC: A general RPC framework that puts mobile and HTTP/2 fir...
PPTX
OpenDaylight and YANG
PDF
The value of reactive
PDF
How Splunk Is Using Pulsar IO
PDF
Netty Cookbook - Chapter 1
PDF
Netty @Apple: Large Scale Deployment/Connectivity
PPTX
Евгений Хыст "Application performance database related problems"
PDF
Java one2013
PDF
Enabling Googley microservices with HTTP/2 and gRPC.
PDF
Grokking TechTalk #24: Kafka's principles and protocols
PDF
Designing for Distributed Systems with Reactor and Reactive Streams
PDF
Power-up services with gRPC
PDF
CoAP in Reactive Blocks
PDF
Jakarta EE 8 on JDK17
PPTX
Confluent Platform Security Components
PPTX
Notes on Netty baics
PDF
gRPC Overview
PDF
Snabb Switch: Riding the HPC wave to simpler, better network appliances (FOSD...
PPTX
Breaking down a monolith
Streams API (Web Engines Hackfest 2015)
Introduction to gRPC: A general RPC framework that puts mobile and HTTP/2 fir...
OpenDaylight and YANG
The value of reactive
How Splunk Is Using Pulsar IO
Netty Cookbook - Chapter 1
Netty @Apple: Large Scale Deployment/Connectivity
Евгений Хыст "Application performance database related problems"
Java one2013
Enabling Googley microservices with HTTP/2 and gRPC.
Grokking TechTalk #24: Kafka's principles and protocols
Designing for Distributed Systems with Reactor and Reactive Streams
Power-up services with gRPC
CoAP in Reactive Blocks
Jakarta EE 8 on JDK17
Confluent Platform Security Components
Notes on Netty baics
gRPC Overview
Snabb Switch: Riding the HPC wave to simpler, better network appliances (FOSD...
Breaking down a monolith
Ad

Similar to End-to-End Reactive Data Access Using R2DBC with RSocket and Proteus (20)

PPTX
adap-stability-202310.pptx
PPT
Performance and Scalability Tuning
PDF
Webinar Slides: Tungsten Connector / Proxy – The Secret Sauce Behind Zero-Dow...
PDF
Distributed Reactive Services with Reactor & Spring - Stéphane Maldini
PPTX
Lecture notes - Data Centers________.pptx
PDF
Linac Coherent Light Source (LCLS) Data Transfer Requirements
PPTX
What's New in NGINX Plus R7?
PPTX
Link_NwkingforDevOps
PPTX
Reactive programming
PDF
Reactive Streams 1.0.0 and Why You Should Care (webinar)
PDF
FreeSWITCH as a Microservice
PDF
Real time web apps
PDF
Network
PDF
Springone2gx 2014 Reactive Streams and Reactor
PPTX
HTML5, HTTP2, and You 1.1
PPTX
Technical Architectures
PPTX
ECS19 - Ingo Gegenwarth - Running Exchange in large environment
PPTX
Next generation web protocols
PPTX
Play With Streams
PPTX
Cloud computing
adap-stability-202310.pptx
Performance and Scalability Tuning
Webinar Slides: Tungsten Connector / Proxy – The Secret Sauce Behind Zero-Dow...
Distributed Reactive Services with Reactor & Spring - Stéphane Maldini
Lecture notes - Data Centers________.pptx
Linac Coherent Light Source (LCLS) Data Transfer Requirements
What's New in NGINX Plus R7?
Link_NwkingforDevOps
Reactive programming
Reactive Streams 1.0.0 and Why You Should Care (webinar)
FreeSWITCH as a Microservice
Real time web apps
Network
Springone2gx 2014 Reactive Streams and Reactor
HTML5, HTTP2, and You 1.1
Technical Architectures
ECS19 - Ingo Gegenwarth - Running Exchange in large environment
Next generation web protocols
Play With Streams
Cloud computing
Ad

More from VMware Tanzu (20)

PDF
Spring into AI presented by Dan Vega 5/14
PDF
What AI Means For Your Product Strategy And What To Do About It
PDF
Make the Right Thing the Obvious Thing at Cardinal Health 2023
PPTX
Enhancing DevEx and Simplifying Operations at Scale
PDF
Spring Update | July 2023
PPTX
Platforms, Platform Engineering, & Platform as a Product
PPTX
Building Cloud Ready Apps
PDF
Spring Boot 3 And Beyond
PDF
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
PDF
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
PDF
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
PPTX
tanzu_developer_connect.pptx
PDF
Tanzu Virtual Developer Connect Workshop - French
PDF
Tanzu Developer Connect Workshop - English
PDF
Virtual Developer Connect Workshop - English
PDF
Tanzu Developer Connect - French
PDF
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
PDF
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
PDF
SpringOne Tour: The Influential Software Engineer
PDF
SpringOne Tour: Domain-Driven Design: Theory vs Practice
Spring into AI presented by Dan Vega 5/14
What AI Means For Your Product Strategy And What To Do About It
Make the Right Thing the Obvious Thing at Cardinal Health 2023
Enhancing DevEx and Simplifying Operations at Scale
Spring Update | July 2023
Platforms, Platform Engineering, & Platform as a Product
Building Cloud Ready Apps
Spring Boot 3 And Beyond
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
tanzu_developer_connect.pptx
Tanzu Virtual Developer Connect Workshop - French
Tanzu Developer Connect Workshop - English
Virtual Developer Connect Workshop - English
Tanzu Developer Connect - French
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: The Influential Software Engineer
SpringOne Tour: Domain-Driven Design: Theory vs Practice

Recently uploaded (20)

PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Big Data Technologies - Introduction.pptx
PDF
Electronic commerce courselecture one. Pdf
PDF
Empathic Computing: Creating Shared Understanding
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Encapsulation theory and applications.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
KodekX | Application Modernization Development
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Network Security Unit 5.pdf for BCA BBA.
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
The Rise and Fall of 3GPP – Time for a Sabbatical?
Chapter 3 Spatial Domain Image Processing.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Digital-Transformation-Roadmap-for-Companies.pptx
Big Data Technologies - Introduction.pptx
Electronic commerce courselecture one. Pdf
Empathic Computing: Creating Shared Understanding
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Encapsulation theory and applications.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Machine learning based COVID-19 study performance prediction
KodekX | Application Modernization Development
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Unlocking AI with Model Context Protocol (MCP)
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy

End-to-End Reactive Data Access Using R2DBC with RSocket and Proteus