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.
Microservices with JEE
Best Practices and a Close Look using
WebSphere Liberty Profile
Michael Hofmann, ARS Computer und C...
© ARS Computer und Consulting GmbH 2017
Microservices with JEE
2
IBM Redbook
Motivation
market interest
missing literatu...
© ARS Computer und Consulting GmbH 2017
Microservices with JEE
3
Twelve factor applications
“A methodology for building
so...
© ARS Computer und Consulting GmbH 2017
Microservices with JEE
4
Factor 2 - Dependencies
Key points:
 App declares all de...
© ARS Computer und Consulting GmbH 2017
Microservices with JEE
5
Factor 3 - Config
Key points:
 Config includes anything ...
© ARS Computer und Consulting GmbH 2017
Microservices with JEE
6
Factor 4 - Backing Services
Key points:
Backing services...
© ARS Computer und Consulting GmbH 2017
Microservices with JEE
7
Backing Service
Polyglot Persistence
 SQL
 NoSQL
Messag...
© ARS Computer und Consulting GmbH 2017
Microservices with JEE
8
Factor 5 – Build, Release, Run
Key points:
strict separa...
© ARS Computer und Consulting GmbH 2017
Microservices with JEE
9
Package … deploy … config
One single executable JAR file
...
© ARS Computer und Consulting GmbH 2017
Microservices with JEE
10
Factor 8 - Concurrency
Key points:
Recommends splitting...
© ARS Computer und Consulting GmbH 2017
Microservices with JEE
11
Scalability
 Core characteristic of a microservice
 Be...
© ARS Computer und Consulting GmbH 2017
Microservices with JEE
12
Liberty features for Scalability
 Fast startup time
 L...
© ARS Computer und Consulting GmbH 2017
Microservices with JEE
13
IBM WAS Liberty Collective
© ARS Computer und Consulting GmbH 2017
Microservices with JEE
14
IBM WAS Liberty Collective with Dynamic Routing
© ARS Computer und Consulting GmbH 2017
Microservices with JEE
15
Liberty elasticity
Scaling Controller installs new Libe...
© ARS Computer und Consulting GmbH 2017
Microservices with JEE
16
Factor 11 - Logs
Key points:
A 12-factor app never conc...
© ARS Computer und Consulting GmbH 2017
Microservices with JEE
17
Factor 12 – Admin processes
Key points:
Keep admin task...
© ARS Computer und Consulting GmbH 2017
Microservices with JEE
18
Liberty Monitoring/Administration
Liberty feature: moni...
© ARS Computer und Consulting GmbH 2017
Microservices with JEE
19
High demands on prod stage
 Liberty healthManager-1.0 a...
© ARS Computer und Consulting GmbH 2017
Microservices with JEE
20
http://MicroProfile.io
© ARS Computer und Consulting GmbH 2017
Microservices with JEE
21
Contact information
Michael Hofmann, ARS Computer und C...
Upcoming SlideShare
Loading in …5
×

Microservices with JEE - Best Practices and a Close Look using WebSphere Liberty Profile

107 views

Published on

Many organizations see great potential in embracing the major trend in IT-Architectures: Microservices. There is the prospect of solving common problems with conventional Architectures, especially how to deal with monoliths. On one side development organizations with focus on the JEE platform feel challenged how to best implement Microservices using JEE Technology. On the other side are JEE platform providers enhancing and changing their offerings to align with the Microservices trend. This session looks into the advantages and draw backs of the JEE approach and discusses technical as well as organizational aspects. Another focus is on how the IBM WebSphere Liberty Profile Server fits to the task and compares this approach with others.

Published in: Software
  • Be the first to comment

  • Be the first to like this

Microservices with JEE - Best Practices and a Close Look using WebSphere Liberty Profile

  1. 1. Microservices with JEE Best Practices and a Close Look using WebSphere Liberty Profile Michael Hofmann, ARS Computer und Consulting GmbH and Erin Schnabel, IBM IBM InterConnect 2017 Conference (Session ID: BMC-4741)
  2. 2. © ARS Computer und Consulting GmbH 2017 Microservices with JEE 2 IBM Redbook Motivation market interest missing literature about microservices with Java showing best practices even less literature on microservices with Java EE Target Microservices with Java and Java EE from development to production
  3. 3. © ARS Computer und Consulting GmbH 2017 Microservices with JEE 3 Twelve factor applications “A methodology for building software-as-a-service applications” Factors are independent of  programming language  backing services  cloud provider http://12factor.net/
  4. 4. © ARS Computer und Consulting GmbH 2017 Microservices with JEE 4 Factor 2 - Dependencies Key points:  App declares all dependencies  App doesn’t rely on “pre-requisite” system-wide packages  use dependency isolation tool (build time, e.g. Gradle) Runtime aspect:  Liberty Features declared in server.xml  Package application with Liberty
  5. 5. © ARS Computer und Consulting GmbH 2017 Microservices with JEE 5 Factor 3 - Config Key points:  Config includes anything that can vary between deploys  does not include internal application config Liberty:  central config file  can be managed in source repository (scm)  dynamic reload  JNDI variables
  6. 6. © ARS Computer und Consulting GmbH 2017 Microservices with JEE 6 Factor 4 - Backing Services Key points: Backing services e.g. Datastore, Watson, …. Resources can be attached and detached at will Java and Java EE support a lot of different backing services…
  7. 7. © ARS Computer und Consulting GmbH 2017 Microservices with JEE 7 Backing Service Polyglot Persistence  SQL  NoSQL Messaging Systems  Java Messaging System (JMS) Client  AMQP  MQTT
  8. 8. © ARS Computer und Consulting GmbH 2017 Microservices with JEE 8 Factor 5 – Build, Release, Run Key points: strict separation between stages: Build, Release, Run e.g. no code changes at runtime The Liberty way: Build pipeline! Git commit to master -> build -> live! Liberty in docker container Liberty own packaging feature
  9. 9. © ARS Computer und Consulting GmbH 2017 Microservices with JEE 9 Package … deploy … config One single executable JAR file  Spring Boot  Wildfly Swarm (JBoss)  IBM WebSphere Liberty All alternatives  Application together with  external configuration (immutable artifact) and  necessary runtime  in minimalised form  augmented with functions for metrics and health care
  10. 10. © ARS Computer und Consulting GmbH 2017 Microservices with JEE 10 Factor 8 - Concurrency Key points: Recommends splitting processes based on the type of work Scale by making more processes Liberty supports: Autoscaling Dynamic Routing Cluster Elasticity
  11. 11. © ARS Computer und Consulting GmbH 2017 Microservices with JEE 11 Scalability  Core characteristic of a microservice  Better when microservices scale automatically  Disadvantage of static provisioning  Spring Boot und Wildfly Swarm depend on infrastructure  Liberty has additional features
  12. 12. © ARS Computer und Consulting GmbH 2017 Microservices with JEE 12 Liberty features for Scalability  Fast startup time  Low memory footprint  IBM supports Liberty in a docker container  Liberty Collectives and Cluster with Autoscaling und Dynamic- Routing Automatic scaling with Liberty exclusive features possible!
  13. 13. © ARS Computer und Consulting GmbH 2017 Microservices with JEE 13 IBM WAS Liberty Collective
  14. 14. © ARS Computer und Consulting GmbH 2017 Microservices with JEE 14 IBM WAS Liberty Collective with Dynamic Routing
  15. 15. © ARS Computer und Consulting GmbH 2017 Microservices with JEE 15 Liberty elasticity Scaling Controller installs new Liberty servers Minimal installation package (server + app) Host leader  communicates with Scaling Controller  monitors workload  informs members about commands from Scaling Controller Polyglot environments  StrongLoop server  Liberty server  Liberty Docker containers
  16. 16. © ARS Computer und Consulting GmbH 2017 Microservices with JEE 16 Factor 11 - Logs Key points: A 12-factor app never concerns itself with routing or storage of its output stream Process streams are captured by the execution environment Usage of: Liberty feature for ELK-Stack Create correlation-ID with UUID to track calls across service boundaries
  17. 17. © ARS Computer und Consulting GmbH 2017 Microservices with JEE 17 Factor 12 – Admin processes Key points: Keep admin task code with application code Run admin tasks in an identical environment to the app  Run against a “Release” / Same config Same dependency isolation:  gradlew  bundle exec  python virtualenv
  18. 18. © ARS Computer und Consulting GmbH 2017 Microservices with JEE 18 Liberty Monitoring/Administration Liberty feature: monitor-1.0  Collects performance data at runtime  Accessible with JMX or REST  Liberty feature: adminCenter-1.0  Admin-Web-Client:  used heap memory  loaded classes  active JVM threads  CPU usage  other metrics, depending on resource
  19. 19. © ARS Computer und Consulting GmbH 2017 Microservices with JEE 19 High demands on prod stage  Liberty healthManager-1.0 and healthAnalyzer-1.0  Max. percent of request timeouts and max. response time  Intense memory consumption  Potential Memory-Leaks  Results in the following actions:  Server restart  Create Heap or Thread Dump  Toggle server to Maintenance Mode  Executed on: Host, Cluster or Server
  20. 20. © ARS Computer und Consulting GmbH 2017 Microservices with JEE 20 http://MicroProfile.io
  21. 21. © ARS Computer und Consulting GmbH 2017 Microservices with JEE 21 Contact information Michael Hofmann, ARS Computer und Consulting GmbH michael.hofmann@ars.de www.ars.de Erin Schnabel, IBM schnabel@us.ibm.com Twitter: @ebullientworks

×