SlideShare a Scribd company logo
@burrsutter
Going Reactive on Java
@burrsutter burr@redhat.com
Vertx.io
http://bit.ly/goingreactivejava
http://developers.redhat.com/devnationlive
@burrsutter
Episode 1 - Going Reactive with Java - Burr Sutter
Episode 2 - Kubernetes for Java Developers - Rafael Benevides
Episode 3 - Sidecars and a Microservices Mesh - Christian Posta
Episode 4 - Big Data in Action with Infinispan - Galder Zamarreno
Episode 5 - Reactive Landscape - Clement Escoffier
And more to come
1st and 3rd Thursdays at Noon Eastern
Upcoming DevNation Live Tech Talks
https://developers.redhat.com/devnationlive/
@burrsutter developers.redhat.com
https://developers.redhat.com
Download Free ebook
Developer Evolution :-)
Mythical
Beast
COBOL
JCL
WFL
70s
C/C++
4GLs
CASE
Netware
RDBMS
SQL
Unix
80s
HTTP/HTML
CGI
GET/POST
Cookies
Java
Servlet
EJB
Windows NT
Solaris/AIX
OOP
90s
MVC - Struts
DI - Spring
ORM - Hibernate
XML
WS-*
JSF
AJAX
Agile
Automated Testing
CI
SVN
Linux
00s
Angular/React/Polymer
Mobile
iOS/Android
Maven/Gradle
Git
Node.js
MongoDB/Redis
Hadoop/Spark
*-aaS/Cloud
Reactive
Functional
10s
@burrsutter
@burrsutter
Reactive
@burrsutter
@burrsutter
Reactive programming is programming with
asynchronous data streams.
https://gist.github.com/staltz/868e7e9bc2a7b8c1f754
@burrsutter
Reactive Manifesto
Reactive Systems (not Programming)
Elastic Resilient
Message Driven
Responsive
http://www.reactivemanifesto.org/
@burrsutter
Responsive Demo
https://github.com/redhat-helloworld-msa/goodbye
@burrsutter
Microservices
Digital Darwinism
The Developer’s Journey
Self-Service,
On-Demand,
Elastic
Infrastructure
Automation
Puppet, Chef,
Ansible,
Kubernetes
CI & CD
Deployment
Pipeline
Advanced
Deployment
Techniques
Microservices
(and flying
elephants!)
Re-Org to
DevOps
@burrsutter
@burrsutter
You Must Be This Tall
1. Self-Service, on-demand, elastic infrastructure as code
(how many days/weeks to provision a new VM?)
2. Dev vs Ops
(who is on the pager for production app outage?)
3. Automation
(phoenix vs snowflake?)
4. CI & CD
5. Deployment Pipeline
http://martinfowler.com/bliki/MicroservicePrerequisites.html
@burrsutter
Microservice Principles/Characteristics
1. Deployment Independence: updates to an individual microservice have no negative
impact to any other component of the system. Optimized for Replacement.
2. Organized around business capabilities
3. Products not Projects
4. API-Focused
5. Smart endpoints and dumb pipes
6. Decentralized Governance
7. Decentralized Data Management
8. Infrastructure Automation (infrastructure as code)
9. Design for failure
10. Evolutionary Design
@burrsutter
Microservice Concerns
MyService
Resilience
Discovery
Load
Balancing
Scaling /
Elasticity
Logging
Monitoring
Build,
Deployment
Pipeline
Tracing
Invocation
Messaging /
IPC
API Authentication
@burrsutter
Recorded Demo
Videos: https://www.youtube.com/watch?v=SPATMHP-
xw8&list=PLuWlr4oKSRUYjjwDOaZOX-54X4_OIUUeS
Demo Sources
bit.ly/msa-instructions
https://github.com/burrsutter/kube4docker
@burrsutter
Vertx.io—an Eclipse project
@burrsutter
Vert.x is a toolkit
for building reactive
applications on the JVM.
@burrsutter
HTTP 1&2 UDP Event Bus Shared Data TCP
Hazelcast
Ignite
Zookeeper
Cluster Mgmt
Stomp
Apache Camel
RabbitMQ
Integration
AMQP
Vert.x Core
Templating
Auth & OAuth
Router
Web
Service Discovery
Circuit Breaker
Microservices
Java
Groovy
JavaScript
Languages
Ruby
MySQL/Postgres
Mongo
JDBC
Data
Redis
Hawkular Dropwizard Shell
Metrics & Ops
TCP SockJS
Bridges
@burrsutter
Vert.x Verticle
Verticle1
Verticle2
Verticle3
Verticle4
Verticle5
JVM
Vert.x Instance
vertx.eventBus
A Verticle is the programmable unit – a component
A Verticle is always executed on the same thread
A single thread may execute several verticles – event loop
A Verticle Instance normally starts 1 thread/event-loop per core
@burrsutter
Vert.x EventBus
Verticle1
Verticle2
Verticle3
Verticle4
Verticle5
JVM
Vert.x Instance
Verticle1
Verticle2
Verticle6
Verticle7
JVM
Vert.x Instance
vertx.eventBus
@burrsutter
Event Providers
Handlers
Events
while(true) {
Get next event
Find interested handlers
Dispatch the event
}
Event Loop
@burrsutter
@burrsutter
@burrsutter
router.get("/api/whiskies").handler(this::getAll);
router.get("/api/whiskies/:id").handler(this::getOne);
router.post("/api/whiskies").handler(this::addOne);
router.delete("/api/whiskies/:id").handler(this::deleteOne);
router.put("/api/whiskies/:id").handler(this::updateOne);
// Serve static resources from the /assets directory
router.route("/assets/*").handler(StaticHandler.create("assets"));
vertx
.createHttpServer()
.requestHandler(router::accept)
.listen(8080, result -> {
if (result.succeeded()) {
future.complete();
} else {
// could be something else is running on our port
future.fail(result.cause());
}
});
Vert.x HTTP Router
@burrsutter
Super-Fast Getting Started: Step 1
mkdir stuff
cd stuff
mvn io.fabric8:vertx-maven-plugin:1.0.13:setup -
DvertxVersion=3.4.2 -Ddependencies=web
mvn compile vertx:run
@burrsutter
Super-Fast Getting Started: Step 2
package stuff;
import io.vertx.core.AbstractVerticle;
import io.vertx.ext.web.Router;
public class MainVerticle extends AbstractVerticle {
@Override
public void start() {
Router router = Router.router(vertx);
router.get("/").handler(request -> {
String hostname = System.getenv().getOrDefault("HOSTNAME", "unknown");
request.response().end("Hello " + new java.util.Date() + “ on “ + hostname);
});
vertx.createHttpServer()
.requestHandler(router::accept)
.listen(8080);
} // start
} // MainVerticle
@burrsutter
Super-Fast Getting Started: Step 3
localhost:8080 (mvn compile vertx:run will hot redeploy)
Or
mvn clean compile package
java -jar target/demo-1.0-SNAPSHOT.jar
Now, launch into Kubernetes/OpenShift
mvn io.fabric8:fabric8-maven-plugin:3.5.31:setup
oc login -u username -p userpassword https://openshift.acme.com:8443
oc new-project demo
mvn fabric8:deploy
@burrsutter
Demos
https://github.com/burrsutter/vertx3_introduction
https://github.com/redhat-reactive-msa
https://github.com/burrsutter/reactive_tutorial_jfokus17
@burrsutter
vertx-game-
server
vertx-
achievement-
server
Java EE on JBoss
with Drools+jBPM
Recording: https://youtu.be/ooA6FmTL4Dk?t=1739
@burrsutter
Balloon Repos
Email me at burr@redhat.com for setup
https://github.com/burrsutter/vertx-game-server
https://github.com/burrsutter/score-server
https://github.com/burrsutter/vertx-achievement-service
https://github.com/burrsutter/mobile-app
https://github.com/burrsutter/mobile-app-admin
https://github.com/burrsutter/leaderboard
https://github.com/burrsutter/scoreboard
@burrsutter
Going Reactive on Java
@burrsutter burr@redhat.com
Vertx.io
http://bit.ly/goingreactivejava
http://developers.redhat.com/devnationlive

More Related Content

PPTX
Kubernetes Introduction
PDF
Continuous Deployment with Jenkins on Kubernetes
PDF
Kubernetes - Starting with 1.2
PDF
KubeCon EU 2016: "rktnetes": what's new with container runtimes and Kubernetes
PDF
Kubernetes 101 and Fun
PPTX
Monitoring, Logging and Tracing on Kubernetes
PDF
Kubernetes automation in production
PDF
KubeCon EU 2016: Kubernetes and the Potential for Higher Level Interfaces
Kubernetes Introduction
Continuous Deployment with Jenkins on Kubernetes
Kubernetes - Starting with 1.2
KubeCon EU 2016: "rktnetes": what's new with container runtimes and Kubernetes
Kubernetes 101 and Fun
Monitoring, Logging and Tracing on Kubernetes
Kubernetes automation in production
KubeCon EU 2016: Kubernetes and the Potential for Higher Level Interfaces

What's hot (20)

PDF
Spring Boot to Quarkus: A real app migration experience | DevNation Tech Talk
PPTX
Kubernetes Networking 101
PDF
Pluggable Infrastructure with CI/CD and Docker
PDF
Microservices at scale with docker and kubernetes - AMS JUG 2017
PDF
Container Days Boston - Kubernetes in production
PDF
kubernetes - minikube - getting started
PDF
The top 5 Kubernetes metrics to monitor
PPTX
Orchestration tool roundup kubernetes vs. docker vs. heat vs. terra form vs...
PPTX
Pod Sandbox workflow creation from Dockershim
PDF
Docker for Java Developers - Fabiane Nardon and Arun gupta
PPTX
Scaling Docker Containers using Kubernetes and Azure Container Service
PPTX
Containerizing a REST API and Deploying to Kubernetes
PDF
Deep dive in container service discovery
PDF
Scaling docker with kubernetes
PDF
Kubernetes and the hybrid cloud with Skupper | DevNation tech talk
PDF
Configuration Management and Transforming Legacy Applications in the Enterpri...
PDF
Kubernetes intro public - kubernetes meetup 4-21-2015
PDF
Kubernetes and CoreOS @ Athens Docker meetup
PDF
Kubernetes Architecture - beyond a black box - Part 2
PDF
Zero downtime-java-deployments-with-docker-and-kubernetes
Spring Boot to Quarkus: A real app migration experience | DevNation Tech Talk
Kubernetes Networking 101
Pluggable Infrastructure with CI/CD and Docker
Microservices at scale with docker and kubernetes - AMS JUG 2017
Container Days Boston - Kubernetes in production
kubernetes - minikube - getting started
The top 5 Kubernetes metrics to monitor
Orchestration tool roundup kubernetes vs. docker vs. heat vs. terra form vs...
Pod Sandbox workflow creation from Dockershim
Docker for Java Developers - Fabiane Nardon and Arun gupta
Scaling Docker Containers using Kubernetes and Azure Container Service
Containerizing a REST API and Deploying to Kubernetes
Deep dive in container service discovery
Scaling docker with kubernetes
Kubernetes and the hybrid cloud with Skupper | DevNation tech talk
Configuration Management and Transforming Legacy Applications in the Enterpri...
Kubernetes intro public - kubernetes meetup 4-21-2015
Kubernetes and CoreOS @ Athens Docker meetup
Kubernetes Architecture - beyond a black box - Part 2
Zero downtime-java-deployments-with-docker-and-kubernetes
Ad

Similar to Going Reactive with Java (20)

PDF
TDC2017 | São Paulo - Trilha Java EE How we figured out we had a SRE team at ...
PDF
Building Reactive Microservices with Vert.x
PPTX
Reactive applications and microservices with Vert.x tool-kit
PDF
Vertx In Action Asynchronous And Reactive Java Julien Ponge
PPTX
Reactive for the Impatient - Mary Grygleski
PDF
Modern app programming with RxJava and Eclipse Vert.x
PDF
Reactive microservices with eclipse vert.x
PPTX
Vert.x for Microservices Architecture
PDF
Building Reactive Microservices In Java 1st Edition Clement Escoffier
PPT
Reactive java programming for the impatient
PDF
Mutiny + quarkus
PDF
Reactive Polyglot Microservices with OpenShift and Vert.x
PPTX
The Reactive Landscape
PDF
Not Only Streams for Akademia JLabs
PPTX
Reactive programming - Dirk Janssen (presentation 13th SPIN Meetup)
PPTX
Vert.x Event Driven Non Blocking Reactive Toolkit
PPTX
Building Reactive Fast Data & the Data Lake with Akka, Kafka, Spark
PPTX
Event driven systems
PPTX
Vert.x - Reactive & Distributed [Devoxx version]
PPTX
App Mod 04: Reactive microservices with eclipse vert.x
TDC2017 | São Paulo - Trilha Java EE How we figured out we had a SRE team at ...
Building Reactive Microservices with Vert.x
Reactive applications and microservices with Vert.x tool-kit
Vertx In Action Asynchronous And Reactive Java Julien Ponge
Reactive for the Impatient - Mary Grygleski
Modern app programming with RxJava and Eclipse Vert.x
Reactive microservices with eclipse vert.x
Vert.x for Microservices Architecture
Building Reactive Microservices In Java 1st Edition Clement Escoffier
Reactive java programming for the impatient
Mutiny + quarkus
Reactive Polyglot Microservices with OpenShift and Vert.x
The Reactive Landscape
Not Only Streams for Akademia JLabs
Reactive programming - Dirk Janssen (presentation 13th SPIN Meetup)
Vert.x Event Driven Non Blocking Reactive Toolkit
Building Reactive Fast Data & the Data Lake with Akka, Kafka, Spark
Event driven systems
Vert.x - Reactive & Distributed [Devoxx version]
App Mod 04: Reactive microservices with eclipse vert.x
Ad

More from Red Hat Developers (20)

PDF
DevNation Tech Talk: Getting GitOps
PDF
Exploring the power of OpenTelemetry on Kubernetes
PDF
GitHub Makeover | DevNation Tech Talk
PDF
Quinoa: A modern Quarkus UI with no hassles | DevNation tech Talk
PDF
Extra micrometer practices with Quarkus | DevNation Tech Talk
PDF
Event-driven autoscaling through KEDA and Knative Integration | DevNation Tec...
PDF
Integrating Loom in Quarkus | DevNation Tech Talk
PDF
Quarkus Renarde 🦊♥: an old-school Web framework with today's touch | DevNatio...
PDF
Containers without docker | DevNation Tech Talk
PDF
Distributed deployment of microservices across multiple OpenShift clusters | ...
PDF
DevNation Workshop: Object detection with Red Hat OpenShift Data Science [Mar...
PDF
Dear security, compliance, and auditing: We’re sorry. Love, DevOps | DevNatio...
PDF
11 CLI tools every developer should know | DevNation Tech Talk
PDF
A Microservices approach with Cassandra and Quarkus | DevNation Tech Talk
PDF
GitHub Actions and OpenShift: ​​Supercharging your software development loops...
PDF
To the moon and beyond with Java 17 APIs! | DevNation Tech Talk
PDF
Profile your Java apps in production on Red Hat OpenShift with Cryostat | Dev...
PDF
Kafka at the Edge: an IoT scenario with OpenShift Streams for Apache Kafka | ...
PDF
Kubernetes configuration and security policies with KubeLinter | DevNation Te...
PDF
Level-up your gaming telemetry using Kafka Streams | DevNation Tech Talk
DevNation Tech Talk: Getting GitOps
Exploring the power of OpenTelemetry on Kubernetes
GitHub Makeover | DevNation Tech Talk
Quinoa: A modern Quarkus UI with no hassles | DevNation tech Talk
Extra micrometer practices with Quarkus | DevNation Tech Talk
Event-driven autoscaling through KEDA and Knative Integration | DevNation Tec...
Integrating Loom in Quarkus | DevNation Tech Talk
Quarkus Renarde 🦊♥: an old-school Web framework with today's touch | DevNatio...
Containers without docker | DevNation Tech Talk
Distributed deployment of microservices across multiple OpenShift clusters | ...
DevNation Workshop: Object detection with Red Hat OpenShift Data Science [Mar...
Dear security, compliance, and auditing: We’re sorry. Love, DevOps | DevNatio...
11 CLI tools every developer should know | DevNation Tech Talk
A Microservices approach with Cassandra and Quarkus | DevNation Tech Talk
GitHub Actions and OpenShift: ​​Supercharging your software development loops...
To the moon and beyond with Java 17 APIs! | DevNation Tech Talk
Profile your Java apps in production on Red Hat OpenShift with Cryostat | Dev...
Kafka at the Edge: an IoT scenario with OpenShift Streams for Apache Kafka | ...
Kubernetes configuration and security policies with KubeLinter | DevNation Te...
Level-up your gaming telemetry using Kafka Streams | DevNation Tech Talk

Recently uploaded (20)

PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
System and Network Administraation Chapter 3
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
PTS Company Brochure 2025 (1).pdf.......
PPTX
Computer Software and OS of computer science of grade 11.pptx
PDF
top salesforce developer skills in 2025.pdf
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
ai tools demonstartion for schools and inter college
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
System and Network Administration Chapter 2
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PPTX
Operating system designcfffgfgggggggvggggggggg
Wondershare Filmora 15 Crack With Activation Key [2025
System and Network Administraation Chapter 3
Which alternative to Crystal Reports is best for small or large businesses.pdf
PTS Company Brochure 2025 (1).pdf.......
Computer Software and OS of computer science of grade 11.pptx
top salesforce developer skills in 2025.pdf
How to Migrate SBCGlobal Email to Yahoo Easily
ai tools demonstartion for schools and inter college
CHAPTER 2 - PM Management and IT Context
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Reimagine Home Health with the Power of Agentic AI​
System and Network Administration Chapter 2
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
How to Choose the Right IT Partner for Your Business in Malaysia
Softaken Excel to vCard Converter Software.pdf
wealthsignaloriginal-com-DS-text-... (1).pdf
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Operating system designcfffgfgggggggvggggggggg

Going Reactive with Java

Editor's Notes

  • #9: responsive - they respond in an acceptable time elastic - they scale up and down resilient - they are designed to handle failures gracefully async - they interact using async messages
  • #12: DevOps is not a title - it is a movement - it is a philosophy Most importantly this is an evolution…you experiment/measure/learn/adopt/repeat