Workshop where you will learn how to build Microservices with Jakarta EE and MicroProfile, focussing on the various runtimes and integration with Docker.
5. Tutorial Session
Prerequisites
This URL redirects to the Github
page containing the tutorial
assignments:
http://ivo2u.nl/oA
Follow these instructions to setup
your device for the tutorial:
http://ivo2u.nl/oc
8. Photo by Inge Wallumrød from Pexels
This tutorial will focus on:
- Vendors and Portability
- Various Runtimes
- Efficient development
9. Photo by David Dibert from Pexels
- Ship with Docker
- Running in a cloud-
native environment
10. Evolution of Java EE and Spring
1990’s now()
?CLOUDVirtualize
Hardware
11. Feature-rich platform of API’s for building enterprise applications
Jakarta EE in a nutshell...
- Profiles
- Full
- Web
- Enterprise Development APIs
- JSP
- JSF
- EJB
- CDI
- JAX-RS
- JPA
- ...many others
12. Designed for building and running scalable applications
Microprofile in a nutshell...
- Java EE / Jakarta EE 8 base (CDI, JSON-P, JAX-RS)
- Microservice APIs
- Healthcheck
- Fault Tolerance
- Metrics
- Config
- Tracing
- Rest Client
- JWT
- …others
13. Photo by Miguel Á. Padriñán from Pexels
Uber / Fat
JARApplication
Server
Hollow
JAR
+
15. Examples of Application Server Vendors
Community
Edition
&
Production
Supported
Community
Edition
Community
Edition
Production
Supported
16. Jakarta EE & MicroProfile
compliant
Application Server
WAR / EAR
Java
● Runs with Java
version
supported by
the server
Conventional application server runtime
<dependency>
<groupId>jakarta.platform</groupId>
<artifactId>jakarta.jakartaee-api</artifactId>
<version>8.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.microprofile</groupId>
<artifactId>microprofile</artifactId>
<version>2.2</version>
<type>pom</type>
</dependency>
● One complete package providing Jakarta EE
● What you see is what you get
● Thoroughly tested by vendor
● Easily patched and upgraded
● Enables portability for enterprise applications
17. Photo by Tom Fisk from Pexels
Application Server
Runtime: Hollow JAR
18. Application server runtime provided as Hollow JAR
Java
● Runs with Java
version
supported by
the server
JAR
WAR
● Applications server as one single artifact
● Little to no operational management tools
● Don’t include the whole application server
with every build of your application
● “Just enough app server”
19. Photo by Tom Fisk from Pexels
Application Server
Runtime: Uber JAR
20. Application server runtime provided as Uber JAR
Java
● Runs with Java
version
supported by
the server
JAR
Compiled Java Bytecode
● One single artifact
● Little to no operational management tools
● Contains your code and application server
● Opposite of lean and tidy, so bigger in size
● “Just enough app server”
21. JDK 8+ Platform
Choose the fitting Java version for your application server runtime
JVM
JAR
WAR
EARCOMPILES
RUNS
IMPLEMENT
Runtime
8
5.193
2.2
HOTSPOT
DEPLOYS
22. Photo by David Dibert from Pexels
But in the end
Docker
… does it even
matter?
23. Shipping and deploying with Docker
Docker Image
Choose
your
runtime
Java
JAR/WAR/EAR
Operational
Environment
● Use docker-compose
● Ship anywhere
● Run anywhere
Docker Image
Choose
your
runtime
Java
JAR/WAR/EAR
24. Photo by Dana Tentis from Pexels
Workshop: Quote of the Day App
28. Tutorial Session
Prerequisites
This URL redirects to the Github
page containing the tutorial
assignments:
http://ivo2u.nl/oA
Follow these instructions to setup
your device for the tutorial:
http://ivo2u.nl/oc
...but let’s have a short break first!
29. Tutorial Bonus Assignments
Further exploration of possibilities
Jakarta EE
- Play around with flaky behaviour
- Modify/Add Quotes
- Explore JSF
- https://www.primefaces.org/showcase/
- Add Exception handling
- Choose different component for
displaying Quotes
MicroProfile
MicroProfile Fault Tolerance:
● Use @CircuitBreaker in hollow-jar-
project
MicroProfile Metrics:
● Add @Counted
● Add @Metered
MicroProfile Health:
● Create a custom HealthCheck
Tips: https://start.microprofile.io
30. Thank you for your visiting this tutorial
We value your feedback
@edwinderks
cloudnativesolutions.guru
@ivonet
ivonet.nl
@tozkeles
talip.ozkeles@group9.nl