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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Paulo Lopes
December 14, 2016
Programming
65
0
Share
Reactive programming on the JVM fast and productive
Paulo Lopes
December 14, 2016
More Decks by Paulo Lopes
See All by Paulo Lopes
Crushing Latency with Vert.x
pmlopes
0
46
10 things I learned making the fastest js server runtime in the world
pmlopes
0
68
Going fullstack React(ive)
pmlopes
0
33
Microservices in Vert.x
pmlopes
0
180
Monoliths must die!
pmlopes
0
60
Haarlem goes Reactive with Vert.x
pmlopes
0
50
Reactive Distributes Applications with Vert.x
pmlopes
0
56
Other Decks in Programming
See All in Programming
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
180
AI時代の仕事技芸論 — ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ
kuranuki
1
610
プロパティの順序で型推論が壊れる!? TypeScript6.0の修正からContext-Sensitivityの仕組みを追う
bicstone
2
1.3k
Signal Forms: Beyond the Basics @ngBaguette 2026 in Paris
manfredsteyer
PRO
0
220
JavaDoc 再入門
nagise
0
280
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
1.8k
並列実装の現場、2ヶ月間実務でAIを使い倒したAIもPCも私も限界が近い
ming_ayami
0
110
Oxcを導入して開発体験が向上した話
yug1224
4
280
DynamoDBには集計系のクエリがないけどなんとかしたい
musan
1
130
開発体験を左右するライブラリの API 設計 - GraphQL スキーマ構築ライブラリから考える #tskaigi
izumin5210
2
1.6k
Webフレームワークの ベンチマークについて
yusukebe
0
120
Composerを使ったサプライチェーン攻撃の様子を眺めてみる #phpstudy
o0h
PRO
2
220
Featured
See All Featured
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
170
Product Roadmaps are Hard
iamctodd
PRO
55
12k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
RailsConf 2023
tenderlove
30
1.5k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2k
Chasing Engaging Ingredients in Design
codingconduct
0
210
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
310
The Limits of Empathy - UXLibs8
cassininazir
1
350
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
280
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
It's Worth the Effort
3n
188
29k
Evolving SEO for Evolving Search Engines
ryanjones
0
210
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