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
Von "Enterprise" zu "Reactive" (JAX 2015)
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Lutz Hühnken
April 22, 2015
Programming
61
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Von "Enterprise" zu "Reactive" (JAX 2015)
Vortrag "Von Enterprise zu Reactive" von der JAX 2015.
Lutz Hühnken
April 22, 2015
More Decks by Lutz Hühnken
See All by Lutz Hühnken
Building a Bank (with DDD, Microservices, and Autonomous Teams)
lutzh
0
140
OOP Munich Night School - EDA is More Than Events - 3.2.2025
lutzh
0
230
Events, Workflows, Sagas: Complex Flows in Distributed Applications (2024-11-12 Software Architecture Gathering, Berlin)
lutzh
0
180
Event-Driven Architecture - 10 Jahre klüger
lutzh
0
230
The Unreasonable Effectiveness of Events at BOBKonf Berlin 2024
lutzh
1
310
Managing Architecture - LeadDev Berlin - 2023-12-05
lutzh
0
210
Microservices need Microworkflows w-jax Munich 2023
lutzh
0
170
Events, Workflows, Sagas? Keep Your Event-driven Architecture Sane at Developer Week Nuremberg
lutzh
0
130
Events, Workflows, Sagas at KanDDDinsky Berlin 2022
lutzh
0
510
Other Decks in Programming
See All in Programming
AIに “答え“を書かせるのを やめてみた
___akari11
0
120
AmebaブログはKMPから卒業します
kmars0605
0
200
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
200
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
350
IBM Bob でAI駆動開発『QC-Playbook』
ichirokano2
0
110
JIS keyboard support in Omarchy
lef237
0
120
Workers Cache を知る
syumai
0
370
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
320
[Dev Group Paris Octobre 26] Agentforce, SIforce, Claudeforce, Slackbot… on s'y retrouve ?
nabondance
0
110
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
8
2.2k
Next.js: The final boss of Web Performance
guaca
0
260
APNsからLive Activityを開始する話
yumnumm
0
170
Featured
See All Featured
Believing is Seeing
oripsolob
1
240
The SEO identity crisis: Don't let AI make you average
varn
0
590
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
We Have a Design System, Now What?
morganepeng
55
8.4k
BBQ
matthewcrist
90
10k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
310
Building an army of robots
kneath
307
47k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
Making Projects Easy
brettharned
120
6.8k
How to Ace a Technical Interview
jacobian
280
24k
So, you think you're a good person
axbom
PRO
2
2.2k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
800
Transcript
Lutz Hühnken | @lutzhuehnken | Typesafe Von „Enterprise“ zu „Reactive“
Von Enterprise zu Reactive @lutzhuehnken Reactive „for the rest of
us“.. Big Data Web Scale HFT Tomcat Web MVC RDBMS
Von Enterprise zu Reactive @lutzhuehnken Was ist Enterprise? Im Sinne
dieses Vortrags: • Alles, was auf Java EE basiert • Insbesondere Servlet API basierte Webapps, z.B. auf Tomcat
Von Enterprise zu Reactive @lutzhuehnken Was ist Reactive?
Von Enterprise zu Reactive @lutzhuehnken Was ist Reactive? Behauptet doch
jeder von sich…
Von Enterprise zu Reactive @lutzhuehnken Was ist Reactive? Alles Akka,
oder was?
Von Enterprise zu Reactive @lutzhuehnken Mal anders: Fragen, die wir
immer wieder hören
Von Enterprise zu Reactive @lutzhuehnken WAR? Servlet Container? Web Layer
Library X (nutzt ThreadLocal) ?
Von Enterprise zu Reactive @lutzhuehnken Kann ich das nutzen mit
RDBMS/ JDBC? Backend Wie mache ich 2PC?
Von Enterprise zu Reactive @lutzhuehnken Thread per Request
Von Enterprise zu Reactive @lutzhuehnken n Threads per m Requests
Von Enterprise zu Reactive @lutzhuehnken n Threads per m Requests
Effekt: Kleinere Einheit der Nebenläufigkeit (Task level concurrency)
Von Enterprise zu Reactive @lutzhuehnken Kleiner Exkurs: Gilt auch für
Aktoren (Überhaupt: Gemeinsamkeit (einiger) reaktiver Systeme)
Von Enterprise zu Reactive @lutzhuehnken n Threads per m Requests
Was heißt das für ThreadLocal?
Von Enterprise zu Reactive @lutzhuehnken n Threads per m Requests
Was heißt das für I/O?
Von Enterprise zu Reactive @lutzhuehnken n Threads per m Requests
In Tomcat / Servlet Container?
Von Enterprise zu Reactive @lutzhuehnken Konsequenzen (alpha) • Servlet Container
• ThreadLocal • Blocking I/O werden zu Anti-Pattern. Vermeiden!
Von Enterprise zu Reactive @lutzhuehnken Jetzt habe ich aber so
etwas.. try { stmt = con.createStatement(); ResultSet rs = stmt.executeQuery(query); while (rs.next()) { String coffeeName = rs.getString("COF_NAME"); int supplierID = rs.getInt("SUP_ID"); float price = rs.getFloat("PRICE"); int sales = rs.getInt("SALES"); int total = rs.getInt("TOTAL"); System.out.println(coffeeName + "\t" + supplierID + "\t" + price + "\t" + sales + Blocking I/O, Sorgenkind JDBC
Von Enterprise zu Reactive @lutzhuehnken Isolieren! Bei vert.x „Worker Verticle“
Bei Play/Akka: Volle Kontrolle über Dispatcher Nicht nur für JDBC, generell für „blocking“ code
Von Enterprise zu Reactive @lutzhuehnken Konsequenzen (beta) • auf Servlet
Container und ThreadLocal verzichten • Blocking I/O vermeiden. Im Notfall: Isolieren.
Von Enterprise zu Reactive @lutzhuehnken Jetzt habe ich aber so
etwas.. @Transactional public static class GreetingService { @Inject private JmsTemplate jmsTemplate; @PersistenceContext private EntityManager entityManager; public void createGreeting(String name) { Greeting greeting = new Greeting(name); this.entityManager.persist(greeting); this.jmsTemplate.convertAndSend("greetings", greeting); … Verteilte Transaktion
Von Enterprise zu Reactive @lutzhuehnken
Von Enterprise zu Reactive @lutzhuehnken Vermeiden this.entityManager.persist(greeting); this.jmsTemplate.convertAndSend("greetings", greeting); …
Warum nicht separater Abgleich (Reconciliation)? In unserem kleinen Beispiel:
Von Enterprise zu Reactive @lutzhuehnken Trennen Jeder 2 PC kann
durch asynchrones Messaging ausgedrückt werden!
Von Enterprise zu Reactive @lutzhuehnken 2PC => Messaging Kleine Einschränkung
- Voraussetzungen: •tentative operations •at-least-once delivery •idempotent messages Item-B Cancellation Tentative Op Item-A
Von Enterprise zu Reactive @lutzhuehnken Verwerten Service A (Reactive) Service
B (Legacy)
Von Enterprise zu Reactive @lutzhuehnken Konsequenzen (1.0) • auf Servlet
Container und ThreadLocal verzichten • Blocking I/O vermeiden. Im Notfall: Isolieren. • Distributed Tx: Vermeiden, trennen, verwerten
Von Enterprise zu Reactive @lutzhuehnken Warum das Ganze? • Wir
haben gesehen: Ich kann auch meine „normale“ Geschäftsanwendung reactive machen, und dabei Kompromisse eingehen. • Was bringt mir das?
Von Enterprise zu Reactive @lutzhuehnken • Heißt nicht nur „web
scale“. • Effizient sein. Moderne Hardware nutzen (Many Core, NUMA) • Von Innovation profitieren (s. Brian Goetz gestern)
Von Enterprise zu Reactive @lutzhuehnken Nicht von mir! Sondern von
John Rose, Java VM Architect, JFokus, Stockholm, February 2015
Von Enterprise zu Reactive @lutzhuehnken • Prinzipien der Supervision &
Isolation • Let it crash!
Von Enterprise zu Reactive @lutzhuehnken • Spaß!! • Ernsthaft. All
das ist nicht entwickelt worden, um unser Leben komplizierter zu machen. Sondern einfacher! • Wie würdest du es mit Menschen lösen..?
Von Enterprise zu Reactive @lutzhuehnken Vielen Dank
[email protected]
Twitter: @lutzhuehnken
Kommt zum Typesafe-Stand! (In der Nähe der Garderobe) Geht zu den anderen „Reactive“ Vorträgen!