Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Reactive programming on the JVM fast and produc...
Search
Paulo Lopes
December 14, 2016
Programming
0
61
Reactive programming on the JVM fast and productive
Paulo Lopes
December 14, 2016
Tweet
Share
More Decks by Paulo Lopes
See All by Paulo Lopes
Crushing Latency with Vert.x
pmlopes
0
43
10 things I learned making the fastest js server runtime in the world
pmlopes
0
64
Going fullstack React(ive)
pmlopes
0
30
Microservices in Vert.x
pmlopes
0
180
Monoliths must die!
pmlopes
0
55
Haarlem goes Reactive with Vert.x
pmlopes
0
47
Reactive Distributes Applications with Vert.x
pmlopes
0
54
Other Decks in Programming
See All in Programming
Laravel Boost 超入門
fire_arlo
3
220
個人軟體時代
ethanhuang13
0
320
HTMLの品質ってなんだっけ? “HTMLクライテリア”の設計と実践
unachang113
4
2.9k
Processing Gem ベースの、2D レトロゲームエンジンの開発
tokujiros
2
130
[FEConf 2025] 모노레포 절망편, 14개 레포로 부활하기까지 걸린 1년
mmmaxkim
0
1.6k
Navigating Dependency Injection with Metro
zacsweers
3
960
アプリの "かわいい" を支えるアニメーションツールRiveについて
uetyo
0
270
2025 年のコーディングエージェントの現在地とエンジニアの仕事の変化について
azukiazusa1
24
12k
プロポーザル駆動学習 / Proposal-Driven Learning
mackey0225
2
1.3k
複雑なフォームに立ち向かう Next.js の技術選定
macchiitaka
2
130
モバイルアプリからWebへの横展開を加速した話_Claude_Code_実践術.pdf
kazuyasakamoto
0
330
Testing Trophyは叫ばない
toms74209200
0
880
Featured
See All Featured
Embracing the Ebb and Flow
colly
87
4.8k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
61k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
A better future with KSS
kneath
239
17k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
For a Future-Friendly Web
brad_frost
180
9.9k
Building Adaptive Systems
keathley
43
2.7k
Visualization
eitanlees
148
16k
How to Think Like a Performance Engineer
csswizardry
26
1.9k
What's in a price? How to price your products and services
michaelherold
246
12k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.4k
Transcript
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