Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Building Microservices with Jakarta EE and MicroProfile - EclipseCon 2019

317 views

Published on

Workshop where you will learn how to build Microservices with Jakarta EE and MicroProfile, focussing on the various runtimes and integration with Docker.

Published in: Software
  • Be the first to comment

  • Be the first to like this

Building Microservices with Jakarta EE and MicroProfile - EclipseCon 2019

  1. 1. EclipseCon 2019 Tutorial session: Building Microservices with Jakarta EE & MicroProfile
  2. 2. Talip Ozkeles Java (EE) Developer IT Consultant Conference Speaker @tozkeles group9.nl
  3. 3. Ivo Woltring Codesmith Software Architect Conference Speaker @ivonet ivonet.nl
  4. 4. Edwin Derks Java (EE) Developer Software Architect Conference Speaker @edwinderks cloudnativesolutions.guru
  5. 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
  6. 6. Photo by Mikes Photos from Pexels
  7. 7. What are Jakarta EE and MicroProfile exactly?
  8. 8. Photo by Inge Wallumrød from Pexels This tutorial will focus on: - Vendors and Portability - Various Runtimes - Efficient development
  9. 9. Photo by David Dibert from Pexels - Ship with Docker - Running in a cloud- native environment
  10. 10. Evolution of Java EE and Spring 1990’s now() ?CLOUDVirtualize Hardware
  11. 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. 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. 13. Photo by Miguel Á. Padriñán from Pexels Uber / Fat JARApplication Server Hollow JAR +
  14. 14. Power of the Application Server
  15. 15. Examples of Application Server Vendors Community Edition & Production Supported Community Edition Community Edition Production Supported
  16. 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. 17. Photo by Tom Fisk from Pexels Application Server Runtime: Hollow JAR
  18. 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. 19. Photo by Tom Fisk from Pexels Application Server Runtime: Uber JAR
  20. 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. 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. 22. Photo by David Dibert from Pexels But in the end Docker … does it even matter?
  23. 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. 24. Photo by Dana Tentis from Pexels Workshop: Quote of the Day App
  25. 25. Workshop: Quote of the Day App
  26. 26. WAR / EAR Java11 Java8 JAR W A R Java11 JAR Compiled Java Docker Image Payara Server Java11 WAR Docker Image Payara Micro Java8 WAR Docker Image Java11 Uber JAR application-server-project uber-jar-project Quotes - JAX-RS - MicroProfile RestClient - MicroProfile FaultTolerance: - Retry, Fallback, Timeout - JSF + PrimeFaces - CDI - MicroProfile RestClient - JAX-RS - CDI - JPA - JSON-B hollow-jar-project
  27. 27. Docker Image Payara Server Java11 WAR Docker Image Payara Micro Java8 WAR Docker Image Java11 Uber JAR - JAX-RS - MicroProfile RestClient - MicroProfile FaultTolerance: - Retry, Fallback, Timeout - JSF + PrimeFaces - CDI - MicroProfile RestClient - JAX-RS - CDI - JPA - JSON-B - health Quotes
  28. 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. 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. 30. Thank you for your visiting this tutorial We value your feedback @edwinderks cloudnativesolutions.guru @ivonet ivonet.nl @tozkeles talip.ozkeles@group9.nl

×