SlideShare ist ein Scribd-Unternehmen logo
Ready for the Future?
Jakarta EE in Zeiten von Cloud Native & Co
#WISSENTEILEN
Lars Röwekamp | @mobileLarson
@mobileLarson
CIO New Technologies
OPEN KNOWLEDGE
Lars Röwekamp
Das bin ich >
(Architecture, Microservices, Cloud, AI & ML)
OPEN KNOWLEDGE
@_openknowledge
Und da arbeite ich
>
„Cloud native, yeah! “
Die ganze Welt
Die ganze Welt:
„Cloud native, yeah!“
Enterprise Java
„Hold my beer!“
Cloud-native and Enterprise Java? Hold my beer!
Seien wir doch
mal ehrlich …
Seien wir doch
mal ehrlich …
Controller
Manager
Scheduler
API Server
etcd (k/v-Store) Cloud Controller Mgr*
Control Plane (Master Noder) Worker Node 1
Worker Node 2
kubelet
kubelet
Container Runtime
Container Runtime
kube-proxy
kube-proxy
k8-Objects*
k8-Objects*
End User
Developer
kubectl
cli/api/
dashboard
Kubernetes Cluster
(ideas taken from DevOps Mojo by Ashish Patel)
*optional
Data Plane (Worker Nodes)
Seien wir doch mal ehrlich …
Bedarf in Zeiten von Cloud & Co.
• klein aka niedriger Speicherbedarf
• schnell aka geringe Startup Time
• flexibel aka Modularisierung
Startup : ~ 5000 ms
Memory: >> 100 MB
Cloud-native and Enterprise Java? Hold my beer!
Seien wir doch mal ehrlich …
Jakarta EE ist eher
• groß aka hoher Speicherbedarf
• langsam aka lange Startup Time
• unflexibel aka alles oder nix*
* gilt selbst für das stark abgespeckte WebProfile?
+++ BREAKING NEWS: Jakarta EE 10 führt minimalistisches CORE Profile ein +++
EXKURS:
Jakarta EE 10 – Core Profile
• CDI 4.0 Lite*
• JSON-B 3.0
• JSON-P 2.1
• JAX-RS 3.1
• …some additional small stuff
*Introduce a new CDI-lite specification that targets
supporting build time compliation of applications.
Cloud-native and Enterprise Java? Hold my beer!
Cloud-native and Enterprise Java? Hold my beer!
Ok, vielleicht doch nicht soooo groß, aber …
APPLICATION
SERVER
Quelle: https://blogs.oracle.com/javamagazine/post/you-dont-always-need-an-application-server-to-run-jakarta-ee-applications
EAR / WAR
vs
Jakarta EE Application Server
My Application Jakarta EE Libraries Super Cool Vendor Stuff
Runnable JAR
Traditional App Server
Ok, dann gehen Microservices ja doch, …
Ok, dann gehen Microservices ja doch, oder?
Jakarta EE
Distributed Runtimes
„Ich will aber
mitspielen!“
Aber ist das wirklich ein Problem?*
Enterprise Java ist
• stabil
• verbreitet
• standardisiert
• btw: erstes E in JEE steht für Enterprise
* Warum nicht einfach auf JEE verzichten?
Jakarta EE - The Missing Pieces
Was fehlt für Distributed Runtimes?
• Distributed Config Mgt
• Distributed Tracing
• Security Context Propagation
• Monitoring aka Health Checks & Metrics
• Fault Tolerance aka Resilience
Cloud-native and Enterprise Java? Hold my beer!
Cloud-native and Enterprise Java? Hold my beer!
Wie war das noch mit dem
Jakarta EE Core Profile?
Cloud-native and Enterprise Java? Hold my beer!
Look Mom,
it‘s the CORE PROFILE!
> Microprofile
MicroProfile „Hello World“
pure JAX-RS
$ java –jar hello-world-bootable.jar
my_code server
MicroProfile „Hello World“
pure JAX-RS
$ java –jar bootable.jar --deployment=hello-world.war
my_code
server
MicroProfile „REST Service“
pure JEE APIs
MicroProfile
Health Check
via @Readiness
MicroProfile
Metrics
via @Timed
MicroProfile
Fault Tolerance
via @Timeout
MicroProfile
JWT Auth
via @Inject & @Claim
MicroProfile
JWT Auth
via @RolesAllowed*
*pure JEE
~ 3000 ms / 70 MB
Jakarta EE & MicroProfile
PRO
• Standards
• Micro & Makro
• schmal*
• schnell*
• flexibel
CONS
• Bootstrapping
• je mehr, desto* …
* ist stark abhängig von den eingebundenen APIs
Jakarta EE
In Zeiten von Cloud-native & Co
ZWISCHENFAZIT
Jakarta EE in Zeiten von Cloud & Co ….
fat & slow mid-sized & kinda fast
„we ARE here“
„we CAME from here“
Jakarta EE in Zeiten von Cloud & Co ….
fat & slow super slim & turbo fast
„we ARE here“ „we DREAM to be here“
„we CAME from here“
mid-sized & kinda fast
„Was genau war
noch einmal
das Problem?“
„I started thinking about my application’s performance—in this case,
the bootstrap time—and asked myself whether I was happy
with the actual time my application took to start up. The answer was no.
And, nowadays, this is is one of the most important
metrics to be considered when working with
microservices, mainly on a serverless architecture.“
Filipe Spolti, Red Hat
Aus der Rubik: „Spaß beim Startup …“
internal
once
element
Metadata
Processing
at Startup
Aus der Rubik: „Spaß beim Startup …“
Cloud-native and Enterprise Java? Hold my beer!
Was bedeutet das für Cloud-native?
„Container First“ Ansatz von Quarkus
• schmale Pakete == kleine Container Images
• schnelle Boot Time == sofortiges Scale-up
• geringer RSS* Speicher == mehr Container**
*RSS = resident set size (all RAM consumed by a process),
** mehr Container bei gleichem RAM
Die Quarkus
Voodoo Regeln
„Build-Time
Optimization“
Voodoo #1: be small and fast
Quakus Voodoo #1
Build-Time Optimization
Ein Großteil der „möglichen“ Dynamik zur
Laufzeit wird gar nicht benötigt. Daher lässt
sich die Auflösung deren Abhängigkeiten in
die Compile-Time verschieben.*
*@Inject, @Observes, @Path, @GET, …
.java
(plus dependencies)
.class
(regular)
(1) compile (2) run on JVM
.java
(plus dependencies)
.class
(regular)
.class
(optimzed)
(1) compile (2) optimize (3) run on JVM
* plus 16 MB /lib
~ 800 ms / 12 KB*
Quarkus
PROD
Mode
$ java –jar quarkus-app/quarkus-run.jar
./mvnw package
FASTJar
Classloader
(since version 1.12)
> java -jar target/quarkus-app/quarkus-run.jar
73 MB 136 MB
REST
Voodoo vs. Traditional:
Memory (RSS)
Quarkus + JVM
(via OpenJDK)
Traditional Stack
(cloud native)
145 MB 209 MB
REST
+ CRUD
Voodoo vs. Traditional:
Memory (RSS)
Quarkus + JVM
(via OpenJDK)
Traditional Stack
(cloud native)
Voodoo vs. Traditional:
Boot & First Response
0.94s
4.3s
0 1 2 3 4 5 6 7 8 9
REST
Quarkus + JIT (via OpenJDK)
Traditional Stack (Cloud-native)
2.0s
9.5s
0 1 2 3 4 5 6 7 8 9
REST
+ CRUD
Voodoo vs. Traditional:
Boot & First Response
Quarkus + JIT (via OpenJDK)
Traditional Stack (Cloud-native)
Cloud-native and Enterprise Java? Hold my beer!
„Ahead-of-Time
Compilation“
Voodoo #2: be even smaller and faster
Quarkus Voodoo #2
Ahead-of-Time Compilation*
„Write once, run anywhere“ ist in Zeiten von
Containern und damit einheitlichen Laufzeit-
umgebungen obsolet.
*Ahead-of-Time Compilation statt dynamisches scannen / laden von Klassen
.java
(plus dependencies)
.class
(regular)
.class
(optimzed)
(1) compile (2) optimize (3) run on JVM
.java
(plus dependencies)
.class
(regular)
.class
(optimzed)
(1) compile (2) optimize (3) create native image
executable
(native)
~ 20 ms / 40 MB
Quarkus
NATIVE
Mode
$ ./rest-service-runner
~ 20 ms / 40 MB
Quarkus
NATIVE
Mode
$ ./rest-service-runner
12 MB 73 MB 136 MB
Voodoo vs. Traditional:
Memory (RSS)
Quarkus + Natice
(via GraalVM)
Quarkus + JVM
(via OpenJDK)
Traditional Stack
(cloud native)
REST
28 MB 145 MB 209 MB
REST
+ CRUD
Voodoo vs. Traditional:
Memory (RSS)
Quarkus + Natice
(via GraalVM)
Quarkus + JVM
(via OpenJDK)
Traditional Stack
(cloud native)
Voodoo vs. Traditional:
Boot & First Response
Quarkus + Native (via GraalVM)
0.016s
0.94s
4.3s
0 1 2 3 4 5 6 7 8 9
REST
Quarkus + JIT (via OpenJDK)
Traditional Stack (Cloud-native)
0.042s
2.0s
9.5s
0 1 2 3 4 5 6 7 8 9
REST
+ CRUD
Voodoo vs. Traditional:
Boot & First Response
Quarkus + Native (via GraalVM)
Quarkus + JIT (via OpenJDK)
Traditional Stack (Cloud-native)
Aber was ist
mit WORA?
WORP* ist
dass neue
WORA!
*write once, run predictable
create native image
executable
(native)
containerize native image
docker container
(ubi/distroless)
„Power of
Standards“*
Voodoo #3: be convenient
* (de facto) Standards plus Quarkus Extension Framework
Quarkus Voodoo #3
Power of Standards
(Industrie)Standards als Basis nutzen bei
gleichzeitiger Möglichkeit von proprietären
Erweiterung.
.class
(regular)
.class
(optimzed)
optimize via Quarkus
optimized libraries
(3rd party & custom)
.class
(regular)
.class
(optimzed)
optimize via Quarkus
optimized libraries
(Jakarta EE Core Profile)
?
„Minimize Development
Turnaround Time“*
Voodoo #4: spark joy for developers
* and more, e.g Quarkus Testing Framework
+++BONUS MATERIAL+++
Quarkus Voodoo #4
Spark Joy for Developers
Das Maven Goal quarkus:dev erlaubt via
hot reaload* extrem kurze Turnaround-Zeiten
in der Entwicklung.
./mvnw package ./mvnw quarkus:dev
*hot reload
in action
~ 1200 ms / 10 KB*
* Paket besteht nur aus MANIFEST.MF (CP Info) und dev-mode-context.dat
Quarkus
DEV
Mode
* Experimental Developer UI
Und DAS
funktioniert?
Quarkus „Voodoo“
Limitations (GraalVM / SubstrateVM)
• Dynamic Classloading*
• Native VM Interfaces*
• Reflection*
• Dynamic Proxies*
• Class Path Resources* *muss via native-image CLI/API vorab registriert werden
(siehe auch: https://github.com/oracle/graal/blob/master/substratevm/LIMITATIONS.md)
Quarkus „Voodoo“
Limitations (GraalVM / SubstrateVM)
• Dynamic Classloading*
• Native VM Interfaces*
• Reflection*
• Dynamic Proxies*
• Class Path Resources* *muss via native-image CLI/API vorab registriert werden
(siehe auch: https://github.com/oracle/graal/blob/master/substratevm/LIMITATIONS.md)
„Brauche ich nicht!
Oder etwa doch?“
Quarkus „Voodoo“
Limitations (ArC DI / CDI)
• Conversational Scope
• Decorators
• Portable Extensions
• bean.xml ignored
• …
Quarkus „Voodoo“
Limitations (ArC DI / CDI)
• Conversational Scope
• Decorators
• Portable Extensions
• bean.xml ignored
• …
Quarkus
Extension
API*
*(siehe auch: https://quarkus.io/guides/cdi-integration)
Jakarta EE
In Zeiten von Cloud-native & Co
FAZIT
Jakarta EE in Zeiten von Cloud & Co ….
fat & slow super slim & turbo fast
Jakarta EE & MicroProfile plus Quarkus / AoT*
Old School J2EE
mid-sized & kinda fast
Ok, aber
brauche
ICH das*
wirklich?
*super slim, turbo fast via AoT
Runtime Sicht auf Netflix User Management Microservice(s)
Death Star Architectures at it‘s best …
Death Star Architectures at it‘s best …
„You are NOT Amazon,
Twitter or Netflix.“*
* unless you are Amazon, Twitter or Netflix ;-)
Enterprise Java in Zeiten von Cloud & Co ….
Voodoo Regeln eXtended Version
• FatJARs are evil.
• Layered Containers are good.
• Small layered Containers are even better.
• Small* layered native Containers are best.
* Distroless Container Image als extreme Variante
„FATJar sind böse?
Warum das?“
„FATJars verlängern die
DEV Roundtrips unnötig.
Daher ist besser mit
mehreren unterschiedlichen
Layern zu arbeiten.“
*Don't Put Fat Jars in Docker Images:
https://phauer.com/2019/no-fat-jar-in-docker-image/
OS
JRE
app-v1.jar app-v2.jar app-v3.jar
70 MB
126 MB
63 MB 63 MB
63 MB
app-v1.jar 63 MB
DEPENDENCIES
53 MB
changes rarely
RESOURCES
8 MB
changes from
time to time
CODE
2 MB
changes frequently
OS
JRE
code-v1.jar code-v2.jar code-v3.jar
70 MB
126 MB
2 MB 2 MB
2 MB
Dependencies
Resources
53 MB
8 MB
Cloud-native and Enterprise Java? Hold my beer!
Cloud-native and Enterprise Java? Hold my beer!
Zeit für
Fragen?
Immer!
Vielen
Dank!
#WISSENTEILEN
by open knowledge GmbH
@_openKnowledge | @mobileLarson
Lars Röwekamp, CIO New Technologies
Folie 01: © Biletsky Egeniy, iStockphoto.com
Folie 05: © Ljubco, iStockphoto.com
Folie 06: © Orba Aljia, iStockphoto.com
Folie 44: © foxaon1987, Shuttertock.com
Folie 90: © Framework Wonderland, Shutterstock.com
All other pictures, drawings and icons originate from
• pexels.com, pixabay.com, unsplash.com,
• flaticon.com
or were made by my own.
BILDNACHWEIS

Weitere ähnliche Inhalte

PDF
Ready for the Future: Jakarta EE in Zeiten von Cloud Native & Co
PDF
Supersonic Java für die Cloud: Quarkus
PDF
Enterprise Java on Steroids
PPTX
Quarkus, GraalVM und co. Java in der Cloud-Native Welt
PDF
MicroProfile-Anwendungen mit Quarkus
PDF
2011 09-09 activiti
PDF
Iks Sonderdruck Eclipse Magazin Mai 2010: Automatisierte SWTBot-Tests
PPTX
DevOps der Triple-E Klasse - Eclipse DemoCamp
Ready for the Future: Jakarta EE in Zeiten von Cloud Native & Co
Supersonic Java für die Cloud: Quarkus
Enterprise Java on Steroids
Quarkus, GraalVM und co. Java in der Cloud-Native Welt
MicroProfile-Anwendungen mit Quarkus
2011 09-09 activiti
Iks Sonderdruck Eclipse Magazin Mai 2010: Automatisierte SWTBot-Tests
DevOps der Triple-E Klasse - Eclipse DemoCamp

Ähnlich wie Cloud-native and Enterprise Java? Hold my beer! (7)

PDF
Java EE 7 - Enterprise-Anwendungen ohne Ballast
PDF
Intel XDK: Cross-Plattform Entwicklung – Apps Entwickeln für alle Plattformen...
PDF
Continuous Delivery für Cloud-native Anwendungen auf Cloud-nativer Infrastruktur
PDF
Entwicklung eines Konzepts und einer flexiblen Architektur für ein Framework ...
PDF
Java EE 7 - Enterprise-Anwendungen ohne Ballast
PDF
Cloud Native und Java EE: Freund oder Feind?
PDF
Cloud Native & Java EE: Freund oder Feind?
Java EE 7 - Enterprise-Anwendungen ohne Ballast
Intel XDK: Cross-Plattform Entwicklung – Apps Entwickeln für alle Plattformen...
Continuous Delivery für Cloud-native Anwendungen auf Cloud-nativer Infrastruktur
Entwicklung eines Konzepts und einer flexiblen Architektur für ein Framework ...
Java EE 7 - Enterprise-Anwendungen ohne Ballast
Cloud Native und Java EE: Freund oder Feind?
Cloud Native & Java EE: Freund oder Feind?
Anzeige

Mehr von OPEN KNOWLEDGE GmbH (20)

PPTX
Warum der Computer "Nein" sagt - Mehr Nachvollziehbarkeit dank Explainable AI
PDF
Machine Learning? Ja gerne! Aber was und wie? Eine Kurzanleitung für den erfo...
PDF
From Zero to still Zero: Die schönsten Fehler auf dem Weg in die Cloud
PDF
Der Spagat zwischen BIAS und FAIRNESS (2024)
PDF
FEHLENDE DATEN? (K)EIN PROBLEM!: Die Kunst der Data Imputation
PPTX
Nie wieder Log-Files!
PPTX
From Zero to still Zero: The most beautiful mistakes going into the cloud.
PDF
API Expand Contract
PDF
Shared Data in verteilten Architekturen
PDF
Machine Learning mit TensorFlow.js
PDF
KI und Architektur
PDF
It's not Rocket Science: Neuronale Netze
PDF
Shared Data in verteilten Systemen
PDF
Business-Mehrwert durch KI
PDF
Mehr Sicherheit durch Automatisierung
PDF
API-Design, Microarchitecture und Testing
PDF
Hilfe, ich will meinen Monolithen zurück!
PDF
Das ist doch alles nur Frontend - Wer braucht da schon Architektur?
PDF
Auf geht‘s in die Cloud: „Das kann doch nicht so schwer sein!“
PDF
Das Product Goal oder "Ohne Ziele laufen eben alle in die Richtung, die ihnen...
Warum der Computer "Nein" sagt - Mehr Nachvollziehbarkeit dank Explainable AI
Machine Learning? Ja gerne! Aber was und wie? Eine Kurzanleitung für den erfo...
From Zero to still Zero: Die schönsten Fehler auf dem Weg in die Cloud
Der Spagat zwischen BIAS und FAIRNESS (2024)
FEHLENDE DATEN? (K)EIN PROBLEM!: Die Kunst der Data Imputation
Nie wieder Log-Files!
From Zero to still Zero: The most beautiful mistakes going into the cloud.
API Expand Contract
Shared Data in verteilten Architekturen
Machine Learning mit TensorFlow.js
KI und Architektur
It's not Rocket Science: Neuronale Netze
Shared Data in verteilten Systemen
Business-Mehrwert durch KI
Mehr Sicherheit durch Automatisierung
API-Design, Microarchitecture und Testing
Hilfe, ich will meinen Monolithen zurück!
Das ist doch alles nur Frontend - Wer braucht da schon Architektur?
Auf geht‘s in die Cloud: „Das kann doch nicht so schwer sein!“
Das Product Goal oder "Ohne Ziele laufen eben alle in die Richtung, die ihnen...
Anzeige

Cloud-native and Enterprise Java? Hold my beer!