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
Vert.x Montreal JUG 2018
Search
Julien Ponge
October 25, 2018
Programming
550
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Vert.x Montreal JUG 2018
Julien Ponge
October 25, 2018
More Decks by Julien Ponge
See All by Julien Ponge
Quarkus Insights 2023-03-06
jponge
0
130
Reactive Streams. 4 Interfaces. Et après ?
jponge
0
64
Scalability and resilience in practice: current trends and opportunities
jponge
0
310
Eclipse Vert.x at BruJUG 2019
jponge
0
210
Du réactif au service du pneu connecté
jponge
0
400
Bringing Reactive to Enterprise Java Developers
jponge
0
350
Golo LyonJUG 2019
jponge
0
300
Bringing Reactive to Enterprise Application Developer // Reactive Summit 2018
jponge
0
300
Démystifier le réactif et l'orchestration de services avec Vert.x, Kubernetes et Kotlin
jponge
0
290
Other Decks in Programming
See All in Programming
ユニットテストの先へ:テスト技法で要求・仕様を整理するJava開発実践 / Beyond_Unit_Testing_Practical_Java_Development_Techniques_for_Organizing_Requirements_and_Specifications
shimashima35
0
390
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
260
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
230
「AIで開発し、AIを届ける」をEvalでつなぐ 〜AIネイティブに始めるプロダクト開発の実践〜 / Connecting "Develop with AI, deliver AI" with Eval
rkaga
4
4.9k
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.3k
TypeScript+Orvalで実現する型安全かつ堅牢でスケーラブルなマルチチャネル通知基盤 / TSKaigi Night talks ~after conference~
d0riven
0
330
The Arts and Crafts of Work in the AI Era — Toward Mastery in Software Development
kuranuki
1
750
TAKTでAI駆動開発の品質を設計する
j5ik2o
6
1.2k
技術記事、AIに書かせるか、自分で書くか? 〜それでも私が自分の手で書く理由〜 / #QiitaConference
jnchito
2
1.4k
気圧・高度・GPSを記録&可視化するアプリ「Koudo」を作った話
hjmkth
1
110
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
570
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
2k
Featured
See All Featured
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.6k
Paper Plane
katiecoart
PRO
1
51k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4k
RailsConf 2023
tenderlove
30
1.5k
Git: the NoSQL Database
bkeepers
PRO
432
67k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
390
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.3k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
62
44k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
370
The Cost Of JavaScript in 2023
addyosmani
55
10k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.4k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Transcript
Julien Ponge Thomas Segismont @jponge @tsegismont
Shameless plug
Reactive? (because resources are scarce)
None
Application
Reactive systems Reactive streams Reactive programming Reactive “Responding to stimuli”
Manifesto, Actor, Messages Resilience, Elasticity, Scalability, Asynchronous, non-blocking Data flow Back-pressure Non-blocking Data flow Events, Observable Spreadsheets Akka, Vert.x Akka Streams, RxJava, Reactor, Vert.x Reactor, Reactive Spring, RxJava, Vert.x
while (isRunning) { String line = bufferedReader.readLine(); switch (line.substring(0, 4))
{ case "ECHO": bufferedWriter.write(line); break // ... // other cases ( ...) // ... default: bufferedWriter.write("UNKW Unknown command"); } }
x 1000 = !
Virtual machines, Containers, etc
None
Vert.x? (async all the things!)
Eclipse Vert.x Open source project started in 2012 Eclipse /
Apache licensing A toolkit for building reactive applications for the JVM 7K ⋆ on # Built on top of $ https://vertx.io % @vertx_project
& ' & Http server verticle Database client verticle
Event Bus ) ' “Details for user 1234?” “{data}” 4 instances 1 instance
Events Thread Event Loop & & & & &
(demo) Hello Vert.x
None
foo.a(1, res1 -> { if (res1.succeeded()) { bar.b("abc", 1, res2
-> { if (res.succeeded()) { baz.c(res3 -> { dosomething(res1, res2, res3, res4 -> { // (...) }); }); } }); } }); “Callback hell”
Callbacks RxJava 1 + 2 Quasar (vertx-sync) Kotlin coroutines (core)
(codegen)
Boiler Vroom (in the mix)
(demo)
* ) WebMidi JSON / Event Bus
const eventBus = new EventBus("/eventbus") traktorIn.addListener("controlchange", 5, (event) => {
eventBus.publish("boilervroom.vu-meter", { type: "volume-level", value: event.value }) }) eventBus.publish("boilervroom.fromtraktor", { type: "filter", number: 1, value: (event.value !== 0) }) Event Bus
+ , - . IceCast VLC * Chrome / DJ
Booth app Clients / NuProcess MIDI Event Bus Event Bus
SockJSHandler sockJSHandler = SockJSHandler.create(vertx); PermittedOptions permittedOptions = new PermittedOptions() .setAddressRegex(“boilervroom\\
..+”); BridgeOptions bridgeOptions = new BridgeOptions() .addInboundPermitted(permittedOptions) .addOutboundPermitted(permittedOptions); sockJSHandler.bridge(bridgeOptions); router.route("/eventbus /*").handler(sockJSHandler);
+ , - . IceCast VLC Clients / OGG/Vorbis OGG/Vorbis
MP3 MP3 HTTP 1.0 HTTP 1.1 HTTP Client Event bus → Chunked HTTP
router.get("/audiostream").handler(context -> { HttpServerResponse response = context.response(); response.setStatusCode(200); response.setChunked(true); response.putHeader("Content-Type",
"audio/mpeg"); MessageConsumer<Buffer> consumer = eventBus.consumer("boilervroom.audiostream"); consumer.bodyStream().handler(buffer -> { if (!response.writeQueueFull()) { response.write(buffer); } }); response.endHandler(v -> { consumer.unregister(); }); response.exceptionHandler(t -> { consumer.unregister(); }); });
Outro
Unified end-to-end reactive model + ecosystem (not just APIs…) For
all kinds of distributed applications (even the small-scale ones) Flexible toolkit, not a framework (your needs, your call)
https: //youtu.be/ZkWsilpiSqw 0 Applications réactives avec Eclipse Vert.x 1 Building
Reactive Microservices in Java https: //goo.gl/ep6yB9 1 Guide to async programming with Vert.x for Java developers https: //goo.gl/AcWW3A
Q&A Use mlponge to get 50% off