Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Reactive programming on the JVM fast and produc...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Paulo Lopes
December 14, 2016
Programming
75
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Reactive programming on the JVM fast and productive
Paulo Lopes
December 14, 2016
Transcript
47 slides
REACTIVE PROGRAMMING ON THE JVM FAST AND PRODUCTIVE / Paulo
Lopes @jetdrone
REACTIVE WHAT'S THAT? Responsive Resilient Message Driven Elastic
None
TOOLKIT <dependency> <groupid>io.vertx</groupid> <artifactid>core</artifactid> <version>3.3.3</version> </dependency>
UNOPINIONATED import io.vertx.core.AbstractVerticle; public class Server extends AbstractVerticle { public
void start() { vertx.createHttpServer().requestHandler(req -> { req.response() .putHeader("content-type", "text/plain") .end("Hello from Vert.x!"); }).listen(8080); } }
REACTIVE conn.query("SELECT * from EMP", res -> { if (res.succeeded())
{ // Get the result set ResultSet resultSet = res.result(); } else { // Failed! } });
POLYGLOT $vertx.create_http_server().request_handler() { |req| req.response() .put_header("content-type", "text/plain") .end("Hello from Vert.x!")
}.listen(8080)
DISTRIBUTED EventBus eb = vertx.eventBus(); eb.consumer("news.uk.sport", message -> { println("I
have received a message: " + message.body()); });
ENTERPRISE SCALE ISN'T WEB SCALE!
None
HOW DOES VERT.X SCALE?
None
None
None
None
None
None
None
None
EVOLUTIONARY MIGRATION
None
None
None
TO THE POINT DISCOVERY
UNLIMITED HORIZONTAL SCALING
None
UNLIMITED HORIZONTAL SCALING
None
LIGHTWEIGHT
TIME FOR ACTION
C10K SERVER app .route("/eventbus/*") .handler(SockJSHandler.create(vertx).bridge(options)); vertx .createHttpServer() .requestHandler(app::accept) .listen(8080, res
-> { // publish a new message every 10 sec vertx.setPeriodic(10000L, t -> { vertx.eventBus().publish("time", new JsonObject() .put("unixtime", System.currentTimeMillis())); }); System.out.println("Server ready!"); });
C10K CLIENT for (int i = 0; i < sockets.length;
i++) { vertx .createHttpClient() .websocket(8080, "localhost", "/eventbus/websocket", ws -> { ws.frameHandler(frame -> println(frame.binaryData())); // subscribe to the "time" address ws.writeFrame(WebSocketFrame.textFrame(SUBSCRIBE, true)); }); }
None
REALTIME APPLICATIONS https://github.com/pmlopes/vert-x3-experiments/tree/realtime-canvas
LOW LATENCY HTTP2 https://github.com/vert-x3/vertx-examples/tree/master/web- examples/src/main/java/io/vertx/example/web/http2
BUT WE WANT REAL WORLD APPS! frontend backend devops
None
None
None
None
FINAL PRODUCT
None
NOT CONVINCED YET?
VERT.X 3 FOR YOUR NEXT CURRENT PROJECT!
None
None
THANK YOU! Vert.x is fun! http://vertx.io http://jetdrone.xyz/vertx-starter
More Decks by Paulo Lopes
See All by Paulo Lopes
Crushing Latency with Vert.x
pmlopes
0
53
10 things I learned making the fastest js server runtime in the world
pmlopes
0
90
Going fullstack React(ive)
pmlopes
0
42
Microservices in Vert.x
pmlopes
0
180
Monoliths must die!
pmlopes
0
69
Haarlem goes Reactive with Vert.x
pmlopes
0
60
Reactive Distributes Applications with Vert.x
pmlopes
0
64
Other Decks in Programming
See All in Programming
Apache Airflow Introduction
leew
1
100
Stage 3でも仕様は変わる。アプリケーション開発者のためのTC39プロセスの読み方
bicstone
1
1.1k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
450
Engineering Biometric UX Across Android Versions | DroidKnights 2026
ryunen344
1
220
Going Full Circle with Virtual Graphs and Relational Databases
michaelsimons
1
120
はじめてのKubernetesコントリビューション
nasa9084
0
330
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
210
Datadog を OTel にするメリットを考察する — Datadog との併用を実アプリで確かめる / Examining the Benefits of Moving Datadog to OTel — Testing OTel Alongside Datadog in a Real App
seike460
PRO
1
110
Lean で手続き的プログラム の証明が書けるようになった
inoueasei
11
5.7k
マルチプロダクトSaaSの アプリ一覧を速くする——複数プロダクトにまたがる「権限行脚」を減らすまで #techramen26conf
mktakuya
1
260
R言語プログラミング
profjoesuzuki
0
140
TS 7.0 で baseUrl が使えなくなった今、パスエイリアスをどうするか
bicstone
2
860
Featured
See All Featured
AI: The stuff that nobody shows you
jnunemaker
PRO
12
1.3k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Are puppies a ranking factor?
jonoalderson
2
4.2k
How to Ace a Technical Interview
jacobian
280
24k
Site-Speed That Sticks
csswizardry
13
1.6k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
680
So, you think you're a good person
axbom
PRO
2
2.3k
Docker and Python
trallard
47
4.3k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
500
The untapped power of vector embeddings
frankvandijk
2
2k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
1k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
70
69k