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
Vert.x Montreal JUG 2018
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Julien Ponge
October 25, 2018
Programming
570
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
Transcript
30 slides
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
More Decks by Julien Ponge
See All by Julien Ponge
Quarkus Insights 2023-03-06
jponge
0
140
Reactive Streams. 4 Interfaces. Et après ?
jponge
0
87
Scalability and resilience in practice: current trends and opportunities
jponge
0
320
Eclipse Vert.x at BruJUG 2019
jponge
0
230
Du réactif au service du pneu connecté
jponge
0
410
Bringing Reactive to Enterprise Java Developers
jponge
0
370
Golo LyonJUG 2019
jponge
0
320
Bringing Reactive to Enterprise Application Developer // Reactive Summit 2018
jponge
0
310
Démystifier le réactif et l'orchestration de services avec Vert.x, Kubernetes et Kotlin
jponge
0
310
Other Decks in Programming
See All in Programming
そのデザイントークン、Flutterでも同じ見た目になりますか?
nakamizu
0
440
動画プレイヤーはなぜカクつくのか 〜Flutterのレンダリングとネイティブの境界を解剖する〜
naruogram
0
340
[DroidKnights 2026] Workflow AX: From Auto-Documented Policies to E2E Testing
raeminkang
0
600
Zero-Tap Sign-In対応、結局何をすればいいの?
mitohato14
0
2.6k
高橋メソッドでCVE解説シリーズ 〜CVE-2026-112816〜
hakkadaikon
0
270
学びを記事・スライド・Xへ高速展開する― AI-assisted Learning Loopで回すコンテンツ生成術
ochtum
0
220
あなたはMCPの機能を、まだ知らない。
4geru
1
700
React Native에 현대적인 빌드 도구 더하기: Rollipop 구현기
leegeunhyeok
0
190
TanStack Vue Query と Pinia Colada から学ぶ非同期状態の型設計
aoshi
0
690
Distance field of Julia set
kinakomoti321
0
330
読みやすい!と評判(?)の発表の準備にかける私のこだわり
shoheimitani
0
110
Crash Auto Pipelines
veronikapj
1
440
Featured
See All Featured
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
620
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
310
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.6k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
Deep Space Network (abreviated)
tonyrice
0
420
sira's awesome portfolio website redesign presentation
elsirapls
0
520
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.7k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
340
Rebuilding a faster, lazier Slack
samanthasiow
85
9.8k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
20k
Testing 201, or: Great Expectations
jmmastey
46
8.4k
Docker and Python
trallard
47
4.3k