java ee meets microservices
TRANSCRIPT
Java EE meets Microservices Are U serious?
Lars Röwekamp CIO New Technologies
#WISSENTEILEN
@mobileLarson @_openKnowledge
Microservices Wo liegt das Problem?
Was sind Microservices? Das geht mit Java EE?
Microservices Wo liegt das Problem? Was sind Microservices? Das geht mit Java EE?
„Monolithic Design”
#WISSENTEILENOFFENKUNDIGGUT
Was ist das Problem?
Was ist das Problem?
‣ Umsetzung von Features dauert zu lange ‣ Technologische „Schulden“ sind bekannt ‣ Architektur-Qualität nimmt ab (an Bedeutung) ‣ „-ility“ Probleme wohin man schaut ‣ Deployment ist kompliziert und dauert lang ‣ Skalierung hat Limit erreicht
‣ Replacement/Refactoring ist zu teuer
#WISSENTEILENOFFENKUNDIGGUT
„For a monolithic to change all must agree on each
change.
Each change has unanticipated effects
requiring testing beforehand.“
Was ist das Problem?
#WISSENTEILENOFFENKUNDIGGUT
Monolithic „Module“ Release
Was ist das Problem?
#WISSENTEILENOFFENKUNDIGGUT
Monolithic „Module“ Release
Was ist das Problem?
#WISSENTEILENOFFENKUNDIGGUT
Monolithic „Module“ Release
Was ist das Problem?
#WISSENTEILENOFFENKUNDIGGUT
Monolithic „Module“ Release
#WISSENTEILENOFFENKUNDIGGUT
Was ist das Problem?
Monolithic „Module“ Release
Was ist das Problem?
#WISSENTEILENOFFENKUNDIGGUT
Monolithic „Module“ Release
Scary!
Was ist das Problem?
#WISSENTEILENOFFENKUNDIGGUT
Was ist das Problem? „You want to be here.“
#WISSENTEILENOFFENKUNDIGGUT
Load Balancer Multi Tenancy
Mic
rose
rvic
es
Was ist das Problem? „You want to be here.“
#WISSENTEILENOFFENKUNDIGGUT
@Runtime@Runtim
e
a.k.
a. „
Tim
e to
Mar
ket“
Was ist das Problem? „You want to be here.“
#WISSENTEILENOFFENKUNDIGGUT
„Help; needed it is.”
Monolithic Design
‣ „one monolithic Application“ ‣ „one monolithic Database“ ‣ „one programming Language“ ‣ „very huge and slow Test Suite“ ‣ „logic is buried in Abstraction“ ‣ „logic is hidden in generated Code“ ‣ „deployment is kind of Scary“
#WISSENTEILENOFFENKUNDIGGUT
Microservices Wo liegt das Problem?
Was sind Microservices? Das geht mit Java EE?
#WISSENTEILENOFFENKUNDIGGUT
„Kind of Definition“
„Small autonomous services that work together.”
by Sam Newman (thoughtworks)
„Microservices are a self-contained and easily
understandable realization of domain logic, highly independent
of each other.” by Adam Bien (Freelancer)
„Loosely coupled service oriented architecture with bounded
contexts.”by Adrian Cockcroft (ehemals Netflix)
„btw: if every service has to be updated at the same
time it’s not loosely coupled.“
„Loosely coupled service oriented architecture with bounded
contexts.”by Adrian Cockcroft (ehemals Netflix)
„btw: If you have to know too much about
surrounding services you don’t have a bounded
context.“
„Eine Einheit, die von einem kleinen Team komplett – also
fachlich und technisch – beherrscht werden kann.”
Oliver Wegner (OTTO)
a.k.a. 2 Pizza Teams
„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.”
„As we l l as the fact that serv ices 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.”
„Microservice Charakteristika a.k.a. Lackmustest”
Charakteristika
„Componentization via Services“
#WISSENTEILENOFFENKUNDIGGUT
Charakteristika
Charakteristika„Organized via
Business Capabilities“
#WISSENTEILENOFFENKUNDIGGUT
Charakteristika
Charakteristika
„Organized via Business Capabilities“
„Any organization that designs a system (defined broadly) will
produce a design whose structure is a copy of the organization's
communication structure.“Conway Law (1967)
#WISSENTEILENOFFENKUNDIGGUT
Charakteristika
Charakteristika
„Organized via Business Capabilities“
Conway Law (1967)
#WISSENTEILENOFFENKUNDIGGUT
Charakteristika
Charakteristika
„Organized via Business Capabilities“
#WISSENTEILENOFFENKUNDIGGUT
Charakteristika
Charakteristika„Products, not Projects“
#WISSENTEILENOFFENKUNDIGGUT
„The traditional model is that you take your software to the wall that separates dev and ops, and throw it over and then forget about it.”
by Werner Vogel (Amazon)
by Werner Vogel (Amazon)
„Not at Amazon. You build it, you run it!”
Charakteristika
Charakteristika„Smart Endpoints, dumb Pipes“
#WISSENTEILENOFFENKUNDIGGUT
„Smart Endpoints, dumb Pipes“Charakteristika
#WISSENTEILENOFFENKUNDIGGUT
Charakteristika
Charakteristika„Decentralized Governance“
#WISSENTEILENOFFENKUNDIGGUT
Charakteristika
Charakteristika„Decentralized
Data Management“
#WISSENTEILENOFFENKUNDIGGUT
Charakteristika
Charakteristika
„Decentralized Data Management“
„App“ DBs
Single DB
#WISSENTEILENOFFENKUNDIGGUT
Charakteristika
Charakteristika
„Decentralized Data Management“
‣ a.k.a. Polyglot Persistence
‣ unterschiedliche Daten Modelle1) ‣ unterschiedliche Daten Storages
‣ Problemfeld „Updates“ ‣ Distributed Transactions zu komplex
‣ Eventual Consistency ‣ Compensation Operation 1) Bounded Context
#WISSENTEILENOFFENKUNDIGGUT
„Starbucks does not use Two-Phase Commit“http://www.enterpriseintegrationpatterns.com/ramblings/18_starbucks.html
Charakteristika
Charakteristika„Design
for Failure“
#WISSENTEILENOFFENKUNDIGGUT
Charakteristika
Charakteristika
„Design for Failure“
‣ fehlertolerante Services-Consumer ‣ wie beeinflusst ein Fehler die UX?
‣ Fehler als „Normalfall“ nicht als „Ausnahme“ ‣ Netflix stellt regelmäßig Systeme ab
‣Monitoring & Resilience ‣ Fehler schnell oder sogar vorab erkennen! ‣ Fehler - wenn möglich - automatisch beheben
#WISSENTEILENOFFENKUNDIGGUT
Charakteristika
Charakteristika„Evolutionary Design“
#WISSENTEILENOFFENKUNDIGGUT
Charakteristika
Charakteristika„Scalable by Purpose“
#WISSENTEILENOFFENKUNDIGGUT
Charakteristika
Charakteristika„Infrastructure Automation“
#WISSENTEILENOFFENKUNDIGGUT
Charakteristika „Infrastructure Automation“
#WISSENTEILENOFFENKUNDIGGUT
Charakteristika „Infrastructure Automation“
#WISSENTEILENOFFENKUNDIGGUT
Charakteristika „Infrastructure Automation“
#WISSENTEILENOFFENKUNDIGGUT
Charakteristika „Infrastructure Automation“
#WISSENTEILENOFFENKUNDIGGUT
Charakteristika
Charakteristika
„Infrastructure Automation“
‣ Logging & Monitoring
‣ Dashboards (up/down Status) ‣ Dashboards (operational Metrics)
‣ Circuit Breaker Status ‣ Aktueller Durchsatz, Latency ‣ Check-Outs, Umsatz ‣…
#WISSENTEILENOFFENKUNDIGGUT
Charakteristika „Infrastructure Automation“
#WISSENTEILENOFFENKUNDIGGUT
Charakteristika „Infrastructure Automation“
#WISSENTEILENOFFENKUNDIGGUT
Charakteristika „Infrastructure Automation“
#WISSENTEILENOFFENKUNDIGGUT
btw:Paperduty
Charakteristika „Infrastructure Automation“
#WISSENTEILENOFFENKUNDIGGUT
Charakteristika „Infrastructure Automation“
#WISSENTEILENOFFENKUNDIGGUT
Aggregation
Charakteristika „Infrastructure Automation“
#WISSENTEILENOFFENKUNDIGGUT
Charakteristika „Infrastructure Automation“
Correlation IDs
#WISSENTEILENOFFENKUNDIGGUT
Wrap up
Wrap up
Charakteristika
#WISSENTEILENOFFENKUNDIGGUT
Microservices Wo liegt das Problem?
Was sind Microservices? Das geht mit Java EE?
Microservice & JEE
Management Monitoring Availability Managment Security
#WISSENTEILENOFFENKUNDIGGUT
Microservice & JEE
Passt das zusammen?
‣ „Maximal Cohesion, Minimal Coupling“1)
‣ Java EE Business Component ‣ Boundary Entity Control Pattern ‣ in einem eigenen WAR ‣ deployed in einer eigenen „Domain“ ‣ Kommunikation via JAX-RS 1) Blog von Adam Bien
#WISSENTEILENOFFENKUNDIGGUT
Microservice & JEE
http://techblog.net.lix.com/2013/01/announcing-ribbon-tying-net.lix-mid.html
#WISSENTEILENOFFENKUNDIGGUT
Die Idee „Micro Java EE“
‣ viele sind mit Java EE sehr zufrieden, ‣ robust, skalierbar, standard, integriert gut ‣ aber muss es immer der „Full/Web Stack“ sein? ‣ oder besser „Just enough Application Server“?
‣ Self-contained Java Microservices (jar) ‣ Java EE Komponenten on demand
Microservice & JEE
#WISSENTEILENOFFENKUNDIGGUT
Wildfly Swarm
#WISSENTEILENOFFENKUNDIGGUT
Dropwizard
#WISSENTEILENOFFENKUNDIGGUT
Spring Boot & Cloud
#WISSENTEILENOFFENKUNDIGGUT
Boot
Autoconfigure
Starters
CLI
Actuator
Tools
Samples
Main Library
@EnableAutoConfiguration
Convenient Dependency Descriptors
Compile & Run Groovy
Non-functional Features
Build & Run self-contained JAR/WAR
Tons of Samples
Spring Boot & Cloud
#WISSENTEILENOFFENKUNDIGGUT
Einige Micro JEE Server
‣Wildfly Swarm ‣ TomEE Shades ‣ Payara Micro Glassfish ‣ KumuluzEE
‣ Dropwizard ‣ Spring Boot
1) JSR 111 (Service Framework)
Microservice & JEE
#WISSENTEILENOFFENKUNDIGGUT
Charakteristika
„Decentralized Governance“Microservice & JEE
#WISSENTEILENOFFENKUNDIGGUT
#WISSENTEILENOFFENKUNDIGGUT
#WISSENTEILENOFFENKUNDIGGUT
Charakteristika
„Decentralized Governance“Microservice & JEE
#WISSENTEILENOFFENKUNDIGGUT
Java EE meets Microservices Ein „subjektives“ Fazit
„subjektives“ Fazit
‣ gutes Konzept zu Modularisierung ‣ gutes Konzept zur Entkopplung ‣ gutes Konzept zu Skalierung ‣ gutes Konzept zur Evolution
‣ fachliche Komplexität beherrschbar ‣ technologische Komplexität automatisierter
‣ geht natürlich (auch) mit Java EE ;-)
#WISSENTEILENOFFENKUNDIGGUT
„subjektives“ Fazit
#WISSENTEILENOFFENKUNDIGGUT
„Ein Microservice kommt selten allein!“
by Lars Röwekamp (CIO New Technologies)
Drei Thesen zum Schluß
#WISSENTEILENOFFENKUNDIGGUT
Drei Thesen zum Schluß
#WISSENTEILENOFFENKUNDIGGUT
„Komplexität wird durch Microservices
verlagert, nicht verringert“
Drei Thesen zum Schluß
#WISSENTEILENOFFENKUNDIGGUT
„Das Finden der richtigen Bounded Contexts ist der
Schlüssel zum Erfolg“
Drei Thesen zum Schluß
#WISSENTEILENOFFENKUNDIGGUT
„Transaktionen sind ein Zeichen für einen
fehlenden Plan B“
Charakteristika? ? ?#WISSENTEILENOFFENKUNDIGGUT
Java EE meets Microservices Are U serious?
Lars Röwekamp CIO New Technologies
#wissenteilen
@mobileLarson @_openKnowledge
Charakteristika
#WISSENTEILENOFFENKUNDIGGUT
Bildnachweise
‣ #1: iStock.com / Andrew Rich (000029536120) ‣ #4: © Daniel Steger for openphoto.net ‣ #14: The Art of Scalability / theartofscalability.com ‣ #17: iStock.com / jpgfactory (000059091620) ‣ #20: iStock.com / VisualField (3096596) ‣ #21: https://pbs.twimg.com/profile_images/585298659589267456/xAPhHpWz.jpg ‣ #22: http://www.jugh.de/files/jugh_content/Referenten/Adam%20Bien.jpg ‣ #23: aws.amazon.com/de/heroes/usa/adrian-cockcroft/ ‣ #25: twitter.com/olliwegner ‣ #29: pixabay,con ‣ #31: Wikimedia / Webysther 20150414193208 ‣ #35: Guido van Nispen / via WIkiepedia ‣ #43: pixabay.com ‣ …
Charakteristika
#WISSENTEILENOFFENKUNDIGGUT
Bildnachweise
‣ … ‣ #64: http://www.programering.com/ ‣ #66: http://techblog.netflix.com/2013/01/announcing-ribbon-tying-netflix-mid.html ‣ #82: http://projects.spring.io/spring-boot/ ‣ #74, #75: © embarc ‣ #76: https://netflix.github.io