Java EE meets
Microservices
Are u serious?
	
  
	
  
Lars Röwekamp
CIO New Technologies
	
  
	
  
@mobileLarson
@_openknowledge
#WISSENTEILEN
Branchenneutrale Softwareentwicklung und IT-Beratung
ÜBER OPEN KNOWLEDGE
#WISSENTEILEN
Lars Röwekamp (a.k.a. @mobileLarson)
ÜBER MICH
LR
#WISSENTEILEN
Wer bin ich - und wen ja, wie viele?
•  CIO New Technologies
•  Enterprise & Mobile
•  Author, Speaker, Coach & Mentor
•  Snowboard & MTB Enthusiast
•  mehrfacher Vater, einfacher Ehemann
#WISSENTEILEN
Der böse Monolith	
  
Der gute Microservice	
  
Das geht mit JEE?	
  
Super Secret Bonusmaterial!	
  
JEE & Microservices
#WISSENTEILEN
Der böse Monolith
#WISSENTEILEN
MONOLITH
MONOLITH
#WISSENTEILEN
Eigentlich eine tolle Sache ...
•  bekannte Architektur
•  IDE freundlich
•  einfach zu verteilen
•  einfach zu testen
•  einfach zu deployen
MONOLITH
#WISSENTEILEN
Aber nur wenn ...
•  Separation of Concerns (SoC)
•  High Cohesion & Low Coupling (via APIs)
•  Don’t Repeat Yourself (DRY)
•  Law of Demeter (LoD)
•  Domain Driven Design (DDD)
•  You Aren’t Going to Need It (YAGNI)
#WISSENTEILEN
MONOLITH
UI / Interface
Business Logic
Persistence
Module 1 Module 2 Module 3
MONOLITH
#WISSENTEILEN
Aber die Realität sieht anders aus ...
•  Umsetzung von Features dauert zu lange
•  Technologische Schulden wohin man schaut
•  Architektur-Qualität nimmt ab (an Bedeutung)
•  „-ility“-Probleme an allen Ecken und Enden
•  Deployment ist kompliziert und dauert lang
•  Skalierung hat Limit erreicht
#WISSENTEILEN
MONOLITH
UI / Interface
Business Logic
Persistence
Module 1 Module 2 Module 3
#WISSENTEILEN
MONOLITH
MONOLITH
#WISSENTEILEN
Der Big Ball of Mud ...
•  „one monolithic Database“
•  „one Programming Language“
•  „very huge and slow Test Suite“
•  „logic is buried in Abstraction“
•  „logic is hidden in generated Code“
•  „no survival without handmade Caching“
MONOLITH
#WISSENTEILEN
„For a monolith to change
all must agree on
each change.
Each change can has
unanticipated effects
requiring testing beforehead.“
	
  
#WISSENTEILEN
MONOLITH
#WISSENTEILEN
MONOLITH
#WISSENTEILEN
MONOLITH
#WISSENTEILEN
MONOLITH
#WISSENTEILEN
MONOLITH
#WISSENTEILEN
MONOLITH
Monolith	
  
#WISSENTEILEN
MONOLITH
Scale	
  by	
  
Cloning	
  
Scale	
  by	
  	
  
Data	
  
Par--oning	
  
Scale	
  by	
  
using	
  	
  
Microservices	
  
Monolith	
  
#WISSENTEILEN
Der gute Microservice
#WISSENTEILEN
„In short, the microservice architectural style is an
approach to developing a single application as a
suite of small services, each running in its own
process and communicating with lightweight
mechanisms, often an HTTP resource API.”
#WISSENTEILEN
„As well as the fact that services are independently
deployable and scalable, each service also
provides a firm module boundary, even allowing for
different services to be written in different
programming languages. They can also be
managed by different teams.”
MICROSERVICES
#WISSENTEILEN
„Functional
Decompensation“
MICROSERVICES
#WISSENTEILEN
„Single Responsibility
Pattern“
MICROSERVICES
#WISSENTEILEN
„Explicitly
published
Interfaces“
MICROSERVICES
#WISSENTEILEN
„Independently
deploy, upgrade,
scale, replace“
MICROSERVICES
#WISSENTEILEN
„Potentially heterogeneous
a.k.a. polyglot“
MICROSERVICES
#WISSENTEILEN
„Light-weight
Communication“
#WISSENTEILEN
MICROSERVICES
MICROSERVICES
#WISSENTEILEN
Microservices PROs ...
•  „easier to develop, understand & maintain“
•  „starts faster than a monolith“
•  „local changes can be easily deployed“
•  „scale independently“
•  „improves fault isolation“
•  „not tech driven but business focused“
#WISSENTEILEN
MICROSERVICES
#WISSENTEILEN
Das geht
mit JEE?
DAS GEHT MIT JEE?
#WISSENTEILEN
„Technologisch?
Auf jeden Fall.“
#WISSENTEILEN
DAS GEHT MIT JEE?
Management	
   Monitoring	
   Availability	
   Security	
  
#WISSENTEILEN
DAS GEHT MIT JEE?
#WISSENTEILEN
DAS GEHT MIT JEE?
DAS GEHT MIT JEE?
#WISSENTEILEN
Aber passt das wirklich zusammen?
•  „Maximal cohesion, minimal coupling.“1)
•  JEE Business Component
•  Boundary Entity Control Pattern
•  In einem eigenen WAR
•  Kommunikation via REST
•  Deployed in einer eigenen Domain
1)	
  Blogbeitrag	
  von	
  Adam	
  Bien	
  
#WISSENTEILEN
DAS GEHT MIT JEE?
#WISSENTEILEN
DAS GEHT MIT JEE?
#WISSENTEILEN
DAS GEHT MIT JEE?
DAS GEHT MIT JEE?
#WISSENTEILEN
Idee: „Just enough Server“
•  Self-Contained Java Microservices (.jar)
•  Java EE Komponenten on demand
•  Embedded Servlet / Web Engine
•  Health Checks, Metrics, Security
•  externe Konfiguration via CommandLine & Co
#WISSENTEILEN
DAS GEHT MIT JEE?
#WISSENTEILEN
DAS GEHT MIT JEE?
#WISSENTEILEN
DAS GEHT MIT JEE?
#WISSENTEILEN
DAS GEHT MIT JEE?
#WISSENTEILEN
DAS GEHT MIT JEE?
#WISSENTEILEN
DAS GEHT MIT JEE?
#WISSENTEILEN
DAS GEHT MIT JEE?
Mal	
  ehrlich,	
  so	
  rich;g	
  	
  
lose	
  gekoppelt	
  	
  
ist	
  das	
  aber	
  nicht,	
  oder?	
  	
  
#WISSENTEILEN
DAS GEHT MIT JEE?
Ok,	
  aber	
  wie	
  konfiguriere	
  
ich	
  übergreifende	
  
Einstellungen?	
  
#WISSENTEILEN
DAS GEHT MIT JEE?
Und	
  was	
  ist,	
  	
  
wenn	
  mal	
  nix	
  ist?	
  
#WISSENTEILEN
DAS GEHT MIT JEE?
#WISSENTEILEN
DAS GEHT MIT JEE?
Fault Tolerance Algorithm ...
#WISSENTEILEN
DAS GEHT MIT JEE?
Cool.	
  Aber	
  wie	
  war	
  das	
  
noch	
  mit	
  der	
  Skalierung?	
  
#WISSENTEILEN
DAS GEHT MIT JEE?
Btw,	
  ist	
  das	
  denn	
  
überhaupt	
  sicher?	
  
#WISSENTEILEN
DAS GEHT MIT JEE?
Ziemliches	
  Chaos!	
  Wie	
  
steigt	
  man	
  da	
  noch	
  durch?	
  	
  
#WISSENTEILEN
DAS GEHT MIT JEE?
#WISSENTEILEN
DAS GEHT MIT JEE?
#WISSENTEILEN
DAS GEHT MIT JEE?
#WISSENTEILEN
DAS GEHT MIT JEE?
zur Erinnerung ...
#WISSENTEILEN
DAS GEHT MIT JEE?
#WISSENTEILEN
„Micro“ Profile
#WISSENTEILEN
„Micro“ Profile
MicroProfile.io
#WISSENTEILEN
The Mission:
An open forum to optimize Enterprise Java
for a microservices architecture by innovating
across multiple implementations and
collaborating on common areas of interest
with a goal of standardization.
#WISSENTEILEN
MicroProfile.io
#WISSENTEILEN
#WISSENTEILEN
Microservices & JEE
Are u serious?
FAZIT
#WISSENTEILEN
•  gutes Konzept zur Modularisierung
•  gutes Konzept zur Entkopplung
•  gutes Konzept zur Skalierung
•  gutes Konzept zur Evolution
FAZIT
#WISSENTEILEN
Geht natürlich (auch)
mit JavaEE ;-)
FAZIT
#WISSENTEILEN
Microservices & JEE?
Best Friends Forever!
FAZIT
„BFF“
Best Friends Forever!
#WISSENTEILEN
„Ein Microservice
kommt selten allein!“
FAZIT
by Lars Röwekamp (CIO New Technologies)
#WISSENTEILEN
FAZIT
#WISSENTEILEN
FAZIT
#WISSENTEILEN
Komplexität
wird durch Microservices
verlagert, nicht verringert!
Fazit
#WISSENTEILEN
#WISSENTEILEN
? # !
LARS RÖWEKAMP
CIO NEW TECHNOLOGIES
lars.roewekamp@openknowledge.de
+49 (0) 441 4082 – 0
@mobileLarson
@_openknowledge
OFFENKUNDIGGUT
KOTAKT
#WISSENTEILEN
#1: © Andrew Rich – iStock
#5: © Daniel Steger – openPhoto
#38: © Andrew Rich – iStock
#69: © Andrew Rich – iStock
#85: © Peshkova - shutterstock.com
#27: commons.wikimedia.org
#26, #78: pixabay.com
Icons in this presentation designed by “Freepik”,
BILDNACHWEISE
#WISSENTEILEN

Java EE goes Microservices. Are you serious?