SlideShare une entreprise Scribd logo
1  sur  42
Télécharger pour lire hors ligne
Nine “Neins” – Where Java
EE will never take you.
@myfear
blog.eisele.net
https://keybase.io/myfear
Disclaimer
https://jcp.org/aboutJava/communityprocess/mrel/jsr342/
How did we get here?
Classical Architectures?
Application	Server
EAR	- Enterprise	Archive
RESTMobile
Web
UI
.JAR.JAR
.JAR
.JAR.JAR
.JAR
.JAR
.JAR
.JAR
.JAR
Browser RDBMS
Application	Server
Application	Server
Application	Server
EAR	- Enterprise	Archive
RESTMobile
Web
UI
.JAR.JAR
.JAR
.JAR.JAR
.JAR
.JAR
.JAR
.JAR
.JAR
Browser RDBMS
LL: Building and Scaling Monoliths
• Monolithicapplication –everything is
package into a single .ear
• Reuse primarily by sharing .jars
• A “big” pushto productiononce or twice a
year
• Single database schema for the entire
application
• >= 500k loc
• >= Heavyweight Infrastructure
• ThousandsofTestcases
• Barely New Testcases
• >= 20 Team Member
• The single.ear requiringa multi-month
test cycle /
• Huge bug and featuredatabases
• User Acceptance Undefined
• Technical Design Approach
• Barely BusinessComponentsor Domains
• Requiringmultiple team involvement &
significant oversight
• Technical Dept
• Outdated Runtimes (Licenses,Complex
updates)
• Grown applications
More users
http://www.internetlivestats.com/internet-users/
J2EE
Spring
RoR
Akka
Reactive Manifesto
Microservices
New requirements
• Rather than acting ondata at rest, modern
software increasingly operates ondata
in near real-time.
• Shortenedtime-frames for putting
changes into production
• New business models evolve from
existing ones
• New questions need to be answered by
existing applications
• Datacenter costs needto go down
constantly
“It’s increasingly obvious that the old,
linear, three-tier architecture model is
obsolete.”
- Gartner
Modernization!
Module
Module
Module
WebUI
.JAR.JAR
.JAR
.JAR.JAR
.JAR
.JAR
.JAR
.JAR
.JARBrowser RDBMS
RDBMS
RDBMS
Routing	Module
Tracking	Module
Order	Module
Tracker UIBrowser HistoryDB
Order	DB
RoutesDB
Tracker UI
Tracker UI
Browser
Browser
REQ: Building and Scaling Microservices
• Lightweight runtime
• Cross– Service Security
• TransactionManagement
• Service Scaling
• Load Balancing
• SLA’s
• Flexible Deployment
• Configuration
• Service Discovery
• Service Versions
• Monitoring
• Governance
• Asynchronouscommunication
• Non-blocking I/O
• Streaming Data
• Polyglot Services
• Modularity (Servicedefinition)
• High performancepersistence(CQRS)
• Event handling / messaging (ES)
• Eventual consistency
• API Management
• Health check and recovery
What does Java EE bring to the table?
JAX-RS
JSON-P
Web SocketServlet
JSFEL
JSP
JSTL
BeanValidation
Interceptors
CDI
Concurrency
JPA
JTA EJB JMS
Batch
JCA
Java EE 7
JavaMail
NINE “Neins”!
Definition:a “Nein” is a lost benefit of a
microservice based system.
1) Java EE helps building distributed
monoliths
• 100s of libraries are part of the base platform
• Upgrading individual libraries partly impossible
(e.g. RIs)
• Requires client libraries (e.g. JAX-RS and JMS) <=
logic drifts into the client.
• Doesn’t support other languages and can’t really
embrace the polyglot approach to microservices
• No independent technical evolution in teams
because of the common base platform
2) Java EE has a threading-model that
isn’t ideal for microservices
• Request to thread binding.
• Can’t be scaled to thousands of servers easily.
• Responsiveness isn’t build in from the core.
• Clustering isn’t part of the specification and relies
on vendor specific features.
• No standardized asynchronous approach for
endpoints (e.g. JAX-RS, JAX-WS)
3) Java EE doesn’t support the notion
of data in motion (streams)
• JDBC and JPA block on Socket I/O
• important methods are synchronized, thereby
allowing onlyone queryat a time on
one connection.
• Batch processing as default way to handle bulk
updates.
• Not even Java 8 Lambdas usable because
Fork/Join and Concurrency Utilities doesn’t play
nicely together in a managed environment
http://mail.openjdk.java.net/pipermail/lambda-dev/2013-April/009335.html
4) Java EE doesn’t support resiliency
• No notion of replication, containment, isolation or
delegation.
• With the exception of vendor specific features
(which require clustering)
• Failures are propagated and not contained
• One component failure usuallybrings down the
complete application
• No support for bulkheading. Clients have to handle
failures.
5) Java EE is implementedas
containers – no service elasticity
• Containerless development impossible
• Testing is hard (Arquillian makes it bearable)
• No simple development models
• Compile, Build,Deploy – cycles for every
microservice
• No class-reloading (unless you use AMAZING tools
like JRebel :-D)
• No increasing or decreasing of resources under
various workloads.(Back-pressure)
• With the exception of vendor specific features
(which require clustering)
6) No notion of immutability
• Handling of large amounts of data within
distributed systems requires immutability for data
• Immutable services are the new paradigm in load
balancing, high availability, and dynamic resource
sharing.
• JPA works well with RDBMS
• CQRS and Event-Sourcing work well with
immutable data-structures and are beneficial for
microservices.
http://cidrdb.org/cidr2015/Papers/CIDR15_Paper16.pdf
7) Choice of data stores, use of
transactions and eventual consistency
• No NoSQL support in Java EE
• Polyglot persistence onlypossible in very few
frameworks.
• Heavily embracing distributed transactions with
2PC.
• Eventual consistencyis ignored and discouraged
http://adrianmarriott.net/logosroot/papers/LifeBeyondTxns.pdf
8) No outer architecture – while still
calling it a platform
• Monitoring
• Distributed Logging
• Security
• Service discovery
• Service locator
• API versioning
• Routing
• …
9) Java EE doesn’t know services
• No service component model
• No service templates
• Hardly any endpoint documentation (WSDLs)
• No service boundaries
• No way to enforce decoupling
You
can do
it in
this way,
but then
it sucks!
Possible Alternative:
Reactive Application
(Lagom, Akka, Play, Vert.x, …)
http://www.reactivemanifesto.org/
Reminder:
Technology alone
won’t solve all the new challenges
Software Design
System Architecture
Methodology and Organization
Distributed Systems Theory
Data Center Operating System
“Rules are for the obedience of fools and
the guidance of wise men.”
Generally attributed to Douglas Bader
Written for architects and developersthat must
quickly gain a fundamental understandingof
microservice-basedarchitectures, this freeO’Reilly
reportexploresthe journey fromSOAto
microservices,discussesapproachesto dismantling
your monolith,and reviews the key tenets ofa
Reactive microservice:
• Isolate all the Things
• Act Autonomously
• Do OneThing, and Do It Well
• Own Your State, Exclusively
• Embrace AsynchronousMessage-Passing
• Stay Mobile,but Addressable
• Collaborate as Systems to Solve Problems
http://bit.ly/ReactiveMicroservice
The detailed example inthis reportis based on
Lagom, a new frameworkthat helps you follow the
requirementsfor buildingdistributed,reactive
systems.
• Get an overview of the Reactive Programming
model and basic requirementsfor developing
reactive microservices
• Learnhow to create base services, expose
endpoints,and then connect them with a
simple, web-based user interface
• Understand how to deal with persistence,state,
and clients
• Use integration technologiesto start a
successfulmigration away fromlegacy systems
http://bit.ly/DevelopReactiveMicroservice
http://bit.ly/SustainableEnterprise
• Understand thechallenges ofstartinga greenfield
development vs tearingapart an existing brownfield
application into services
• Examine your business domain to see if microservices
would bea good fit
• Explorebest practices for automation,high availability,
data separation,and performance
• Align your development teams around business
capabilities and responsibilities
• Inspect design patterns such as aggregator, proxy,
pipeline, or shared resources to model service
interactions
https://www.reactivesummit.org/
Links and further
reading
Project	Site:
http://www.lightbend.com/lagom
GitHub	Repo:
https://github.com/lagom
Documentation:
http://www.lagomframework.com/documentation/1.0.x/java/Home.html
Cargo	Tracker	Example:
https://github.com/lagom/activator-lagom-cargotracker
•Keep all data in memory!
• Store all state changes as events
• Replay all events of an actor to recreate it
• Strong consistencyfor Actor (aggregate) and
Journal
• Eventual Consistencyfor Read Side
https://msdn.microsoft.com/en-us/library/jj554200.aspx
https://www.infoq.com/minibooks/domain-driven-design-quickly

Contenu connexe

Tendances

Building Reactive Fast Data & the Data Lake with Akka, Kafka, Spark
Building Reactive Fast Data & the Data Lake with Akka, Kafka, SparkBuilding Reactive Fast Data & the Data Lake with Akka, Kafka, Spark
Building Reactive Fast Data & the Data Lake with Akka, Kafka, Spark
Todd Fritz
 
Building an Event-oriented Data Platform with Kafka, Eric Sammer
Building an Event-oriented Data Platform with Kafka, Eric Sammer Building an Event-oriented Data Platform with Kafka, Eric Sammer
Building an Event-oriented Data Platform with Kafka, Eric Sammer
confluent
 
Webinar Slides: Geo-Distributed MySQL Clustering Done Right!
Webinar Slides: Geo-Distributed MySQL Clustering Done Right!Webinar Slides: Geo-Distributed MySQL Clustering Done Right!
Webinar Slides: Geo-Distributed MySQL Clustering Done Right!
Continuent
 

Tendances (20)

The Reactive Principles: Eight Tenets For Building Cloud Native Applications
The Reactive Principles: Eight Tenets For Building Cloud Native ApplicationsThe Reactive Principles: Eight Tenets For Building Cloud Native Applications
The Reactive Principles: Eight Tenets For Building Cloud Native Applications
 
Reactive Design Patterns
Reactive Design PatternsReactive Design Patterns
Reactive Design Patterns
 
Revitalizing Walmart's Aging Architecture for Web Scale
Revitalizing Walmart's Aging Architecture for Web ScaleRevitalizing Walmart's Aging Architecture for Web Scale
Revitalizing Walmart's Aging Architecture for Web Scale
 
Building Reactive Fast Data & the Data Lake with Akka, Kafka, Spark
Building Reactive Fast Data & the Data Lake with Akka, Kafka, SparkBuilding Reactive Fast Data & the Data Lake with Akka, Kafka, Spark
Building Reactive Fast Data & the Data Lake with Akka, Kafka, Spark
 
Reactive Streams 1.0.0 and Why You Should Care (webinar)
Reactive Streams 1.0.0 and Why You Should Care (webinar)Reactive Streams 1.0.0 and Why You Should Care (webinar)
Reactive Streams 1.0.0 and Why You Should Care (webinar)
 
What's inside the black box? Using ML to tune and manage Kafka. (Matthew Stum...
What's inside the black box? Using ML to tune and manage Kafka. (Matthew Stum...What's inside the black box? Using ML to tune and manage Kafka. (Matthew Stum...
What's inside the black box? Using ML to tune and manage Kafka. (Matthew Stum...
 
MANTL Data Platform, Microservices and BigData Services
MANTL Data Platform, Microservices and BigData ServicesMANTL Data Platform, Microservices and BigData Services
MANTL Data Platform, Microservices and BigData Services
 
Distributed architecture in a cloud native microservices ecosystem
Distributed architecture in a cloud native microservices ecosystemDistributed architecture in a cloud native microservices ecosystem
Distributed architecture in a cloud native microservices ecosystem
 
What is Reactive programming?
What is Reactive programming?What is Reactive programming?
What is Reactive programming?
 
Designing apps for resiliency
Designing apps for resiliencyDesigning apps for resiliency
Designing apps for resiliency
 
Disaster Recovery Plans for Apache Kafka
Disaster Recovery Plans for Apache KafkaDisaster Recovery Plans for Apache Kafka
Disaster Recovery Plans for Apache Kafka
 
Modernizing Applications with Microservices
Modernizing Applications with MicroservicesModernizing Applications with Microservices
Modernizing Applications with Microservices
 
The Road Most Traveled: A Kafka Story | Heikki Nousiainen, Aiven
The Road Most Traveled: A Kafka Story | Heikki Nousiainen, AivenThe Road Most Traveled: A Kafka Story | Heikki Nousiainen, Aiven
The Road Most Traveled: A Kafka Story | Heikki Nousiainen, Aiven
 
Sneaking Scala through the Back Door
Sneaking Scala through the Back DoorSneaking Scala through the Back Door
Sneaking Scala through the Back Door
 
How Netflix does Microservices
How Netflix does Microservices How Netflix does Microservices
How Netflix does Microservices
 
Designing microservices
Designing microservicesDesigning microservices
Designing microservices
 
Building an Event-oriented Data Platform with Kafka, Eric Sammer
Building an Event-oriented Data Platform with Kafka, Eric Sammer Building an Event-oriented Data Platform with Kafka, Eric Sammer
Building an Event-oriented Data Platform with Kafka, Eric Sammer
 
Webinar Slides: Geo-Distributed MySQL Clustering Done Right!
Webinar Slides: Geo-Distributed MySQL Clustering Done Right!Webinar Slides: Geo-Distributed MySQL Clustering Done Right!
Webinar Slides: Geo-Distributed MySQL Clustering Done Right!
 
Webinar slides: Introduction to Database Proxies (for MySQL)
Webinar slides: Introduction to Database Proxies (for MySQL)Webinar slides: Introduction to Database Proxies (for MySQL)
Webinar slides: Introduction to Database Proxies (for MySQL)
 
Multi-Datacenter Kafka - Strata San Jose 2017
Multi-Datacenter Kafka - Strata San Jose 2017Multi-Datacenter Kafka - Strata San Jose 2017
Multi-Datacenter Kafka - Strata San Jose 2017
 

En vedette

Wild Flies and a Camel - Chicago JUG - 03/15
Wild Flies and a Camel - Chicago JUG - 03/15Wild Flies and a Camel - Chicago JUG - 03/15
Wild Flies and a Camel - Chicago JUG - 03/15
Markus Eisele
 
Distributed Systems Done Right: Why Java Enterprises Are Embracing The Actor ...
Distributed Systems Done Right: Why Java Enterprises Are Embracing The Actor ...Distributed Systems Done Right: Why Java Enterprises Are Embracing The Actor ...
Distributed Systems Done Right: Why Java Enterprises Are Embracing The Actor ...
Lightbend
 
Stay productive while slicing up the monolith
Stay productive while slicing up the monolith Stay productive while slicing up the monolith
Stay productive while slicing up the monolith
Markus Eisele
 

En vedette (20)

THEFT-PROOF JAVA EE - SECURING YOUR JAVA EE APPLICATIONS
 THEFT-PROOF JAVA EE - SECURING YOUR JAVA EE APPLICATIONS THEFT-PROOF JAVA EE - SECURING YOUR JAVA EE APPLICATIONS
THEFT-PROOF JAVA EE - SECURING YOUR JAVA EE APPLICATIONS
 
Community and Java EE @ DevConf.CZ
Community and Java EE @ DevConf.CZCommunity and Java EE @ DevConf.CZ
Community and Java EE @ DevConf.CZ
 
ARCHITECTING LARGE ENTERPRISE JAVA PROJECTS - vJUG
ARCHITECTING LARGE ENTERPRISE JAVA PROJECTS - vJUGARCHITECTING LARGE ENTERPRISE JAVA PROJECTS - vJUG
ARCHITECTING LARGE ENTERPRISE JAVA PROJECTS - vJUG
 
Architecting for failure - Why are distributed systems hard?
Architecting for failure - Why are distributed systems hard?Architecting for failure - Why are distributed systems hard?
Architecting for failure - Why are distributed systems hard?
 
Wild Flies and a Camel - Chicago JUG - 03/15
Wild Flies and a Camel - Chicago JUG - 03/15Wild Flies and a Camel - Chicago JUG - 03/15
Wild Flies and a Camel - Chicago JUG - 03/15
 
Wild Flies and a Camel Java EE Integration Stories
Wild Flies and a Camel Java EE Integration StoriesWild Flies and a Camel Java EE Integration Stories
Wild Flies and a Camel Java EE Integration Stories
 
Microservice Come in Systems
Microservice Come in SystemsMicroservice Come in Systems
Microservice Come in Systems
 
How would ESBs look like, if they were done today.
How would ESBs look like, if they were done today.How would ESBs look like, if they were done today.
How would ESBs look like, if they were done today.
 
OpenShift for Java EE Developers
OpenShift for Java EE DevelopersOpenShift for Java EE Developers
OpenShift for Java EE Developers
 
Distributed Systems Done Right: Why Java Enterprises Are Embracing The Actor ...
Distributed Systems Done Right: Why Java Enterprises Are Embracing The Actor ...Distributed Systems Done Right: Why Java Enterprises Are Embracing The Actor ...
Distributed Systems Done Right: Why Java Enterprises Are Embracing The Actor ...
 
Architecting Large Enterprise Projects @DevConf.CZ
Architecting Large Enterprise Projects @DevConf.CZArchitecting Large Enterprise Projects @DevConf.CZ
Architecting Large Enterprise Projects @DevConf.CZ
 
Taking the friction out of microservice frameworks with Lagom
Taking the friction out of microservice frameworks with LagomTaking the friction out of microservice frameworks with Lagom
Taking the friction out of microservice frameworks with Lagom
 
Stay productive while slicing up the monolith
Stay productive while slicing up the monolith Stay productive while slicing up the monolith
Stay productive while slicing up the monolith
 
Java EE microservices architecture - evolving the monolith
Java EE microservices architecture - evolving the monolithJava EE microservices architecture - evolving the monolith
Java EE microservices architecture - evolving the monolith
 
Hyperscale Computing, Enterprise Agility with Mesosphere
Hyperscale Computing, Enterprise Agility with MesosphereHyperscale Computing, Enterprise Agility with Mesosphere
Hyperscale Computing, Enterprise Agility with Mesosphere
 
10 Golden Social Media Rules for Developer Relations Manager
10 Golden Social Media Rules for Developer Relations Manager10 Golden Social Media Rules for Developer Relations Manager
10 Golden Social Media Rules for Developer Relations Manager
 
CQRS and Event Sourcing for Java Developers
CQRS and Event Sourcing for Java DevelopersCQRS and Event Sourcing for Java Developers
CQRS and Event Sourcing for Java Developers
 
MySQL Web Reference Architecture
MySQL Web Reference Architecture MySQL Web Reference Architecture
MySQL Web Reference Architecture
 
FASHION
FASHION FASHION
FASHION
 
Javentura - Spring Boot under the hood
Javentura - Spring Boot under the hoodJaventura - Spring Boot under the hood
Javentura - Spring Boot under the hood
 

Similaire à Nine Neins - where Java EE will never take you

Varrow Q4 Lunch & Learn Presentation - Virtualizing Business Critical Applica...
Varrow Q4 Lunch & Learn Presentation - Virtualizing Business Critical Applica...Varrow Q4 Lunch & Learn Presentation - Virtualizing Business Critical Applica...
Varrow Q4 Lunch & Learn Presentation - Virtualizing Business Critical Applica...
Andrew Miller
 

Similaire à Nine Neins - where Java EE will never take you (20)

Stay productive_while_slicing_up_the_monolith
Stay productive_while_slicing_up_the_monolithStay productive_while_slicing_up_the_monolith
Stay productive_while_slicing_up_the_monolith
 
Java in the age of containers - JUG Frankfurt/M
Java in the age of containers - JUG Frankfurt/MJava in the age of containers - JUG Frankfurt/M
Java in the age of containers - JUG Frankfurt/M
 
Migrating From Java EE To Cloud-Native Reactive Systems
Migrating From Java EE To Cloud-Native Reactive SystemsMigrating From Java EE To Cloud-Native Reactive Systems
Migrating From Java EE To Cloud-Native Reactive Systems
 
Migrating from Java EE to cloud-native Reactive systems
Migrating from Java EE to cloud-native Reactive systemsMigrating from Java EE to cloud-native Reactive systems
Migrating from Java EE to cloud-native Reactive systems
 
Microservices - opportunities, dilemmas and problems
Microservices - opportunities, dilemmas and problemsMicroservices - opportunities, dilemmas and problems
Microservices - opportunities, dilemmas and problems
 
Varrow Q4 Lunch & Learn Presentation - Virtualizing Business Critical Applica...
Varrow Q4 Lunch & Learn Presentation - Virtualizing Business Critical Applica...Varrow Q4 Lunch & Learn Presentation - Virtualizing Business Critical Applica...
Varrow Q4 Lunch & Learn Presentation - Virtualizing Business Critical Applica...
 
170215 msa intro
170215 msa intro170215 msa intro
170215 msa intro
 
Streaming to a new Jakarta EE / JOTB19
Streaming to a new Jakarta EE / JOTB19Streaming to a new Jakarta EE / JOTB19
Streaming to a new Jakarta EE / JOTB19
 
Frameworks Galore: A Pragmatic Review
Frameworks Galore: A Pragmatic ReviewFrameworks Galore: A Pragmatic Review
Frameworks Galore: A Pragmatic Review
 
SpringPeople - Introduction to Cloud Computing
SpringPeople - Introduction to Cloud ComputingSpringPeople - Introduction to Cloud Computing
SpringPeople - Introduction to Cloud Computing
 
Java in the Age of Containers and Serverless
Java in the Age of Containers and ServerlessJava in the Age of Containers and Serverless
Java in the Age of Containers and Serverless
 
Iot cloud service v2.0
Iot cloud service v2.0Iot cloud service v2.0
Iot cloud service v2.0
 
MySQL Options in OpenStack
MySQL Options in OpenStackMySQL Options in OpenStack
MySQL Options in OpenStack
 
ScaleBase Webinar: Scaling MySQL - Sharding Made Easy!
ScaleBase Webinar: Scaling MySQL - Sharding Made Easy!ScaleBase Webinar: Scaling MySQL - Sharding Made Easy!
ScaleBase Webinar: Scaling MySQL - Sharding Made Easy!
 
Single Page Applications - Desert Code Camp 2012
Single Page Applications - Desert Code Camp 2012Single Page Applications - Desert Code Camp 2012
Single Page Applications - Desert Code Camp 2012
 
OpenStack Days East -- MySQL Options in OpenStack
OpenStack Days East -- MySQL Options in OpenStackOpenStack Days East -- MySQL Options in OpenStack
OpenStack Days East -- MySQL Options in OpenStack
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
 
Database Virtualization: The Next Wave of Big Data
Database Virtualization: The Next Wave of Big DataDatabase Virtualization: The Next Wave of Big Data
Database Virtualization: The Next Wave of Big Data
 
Building FoundationDB
Building FoundationDBBuilding FoundationDB
Building FoundationDB
 
Monitoring MySQL at scale
Monitoring MySQL at scaleMonitoring MySQL at scale
Monitoring MySQL at scale
 

Plus de Markus Eisele

Plus de Markus Eisele (11)

Sustainable Software Architecture - Open Tour DACH '22
Sustainable Software Architecture - Open Tour DACH '22Sustainable Software Architecture - Open Tour DACH '22
Sustainable Software Architecture - Open Tour DACH '22
 
Going from java message service (jms) to eda
Going from java message service (jms) to eda Going from java message service (jms) to eda
Going from java message service (jms) to eda
 
Let's be real. Quarkus in the wild.
Let's be real. Quarkus in the wild.Let's be real. Quarkus in the wild.
Let's be real. Quarkus in the wild.
 
What happens when unicorns drink coffee
What happens when unicorns drink coffeeWhat happens when unicorns drink coffee
What happens when unicorns drink coffee
 
Stateful on Stateless - The Future of Applications in the Cloud
Stateful on Stateless - The Future of Applications in the CloudStateful on Stateless - The Future of Applications in the Cloud
Stateful on Stateless - The Future of Applications in the Cloud
 
Cloud wars - A LavaOne discussion in seven slides
Cloud wars - A LavaOne discussion in seven slidesCloud wars - A LavaOne discussion in seven slides
Cloud wars - A LavaOne discussion in seven slides
 
Streaming to a new Jakarta EE
Streaming to a new Jakarta EEStreaming to a new Jakarta EE
Streaming to a new Jakarta EE
 
Reactive Integrations - Caveats and bumps in the road explained
Reactive Integrations - Caveats and bumps in the road explained  Reactive Integrations - Caveats and bumps in the road explained
Reactive Integrations - Caveats and bumps in the road explained
 
Stay productive while slicing up the monolith
Stay productive while slicing up the monolithStay productive while slicing up the monolith
Stay productive while slicing up the monolith
 
Stay productive while slicing up the monolith
Stay productive while slicing up the monolithStay productive while slicing up the monolith
Stay productive while slicing up the monolith
 
How lagom helps to build real world microservice systems
How lagom helps to build real world microservice systemsHow lagom helps to build real world microservice systems
How lagom helps to build real world microservice systems
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 

Nine Neins - where Java EE will never take you

  • 1. Nine “Neins” – Where Java EE will never take you. @myfear blog.eisele.net https://keybase.io/myfear
  • 2.
  • 4. How did we get here?
  • 8. LL: Building and Scaling Monoliths • Monolithicapplication –everything is package into a single .ear • Reuse primarily by sharing .jars • A “big” pushto productiononce or twice a year • Single database schema for the entire application • >= 500k loc • >= Heavyweight Infrastructure • ThousandsofTestcases • Barely New Testcases • >= 20 Team Member • The single.ear requiringa multi-month test cycle / • Huge bug and featuredatabases • User Acceptance Undefined • Technical Design Approach • Barely BusinessComponentsor Domains • Requiringmultiple team involvement & significant oversight • Technical Dept • Outdated Runtimes (Licenses,Complex updates) • Grown applications
  • 10. New requirements • Rather than acting ondata at rest, modern software increasingly operates ondata in near real-time. • Shortenedtime-frames for putting changes into production • New business models evolve from existing ones • New questions need to be answered by existing applications • Datacenter costs needto go down constantly
  • 11. “It’s increasingly obvious that the old, linear, three-tier architecture model is obsolete.” - Gartner
  • 15. REQ: Building and Scaling Microservices • Lightweight runtime • Cross– Service Security • TransactionManagement • Service Scaling • Load Balancing • SLA’s • Flexible Deployment • Configuration • Service Discovery • Service Versions • Monitoring • Governance • Asynchronouscommunication • Non-blocking I/O • Streaming Data • Polyglot Services • Modularity (Servicedefinition) • High performancepersistence(CQRS) • Event handling / messaging (ES) • Eventual consistency • API Management • Health check and recovery
  • 16. What does Java EE bring to the table?
  • 18. NINE “Neins”! Definition:a “Nein” is a lost benefit of a microservice based system.
  • 19. 1) Java EE helps building distributed monoliths • 100s of libraries are part of the base platform • Upgrading individual libraries partly impossible (e.g. RIs) • Requires client libraries (e.g. JAX-RS and JMS) <= logic drifts into the client. • Doesn’t support other languages and can’t really embrace the polyglot approach to microservices • No independent technical evolution in teams because of the common base platform
  • 20. 2) Java EE has a threading-model that isn’t ideal for microservices • Request to thread binding. • Can’t be scaled to thousands of servers easily. • Responsiveness isn’t build in from the core. • Clustering isn’t part of the specification and relies on vendor specific features. • No standardized asynchronous approach for endpoints (e.g. JAX-RS, JAX-WS)
  • 21. 3) Java EE doesn’t support the notion of data in motion (streams) • JDBC and JPA block on Socket I/O • important methods are synchronized, thereby allowing onlyone queryat a time on one connection. • Batch processing as default way to handle bulk updates. • Not even Java 8 Lambdas usable because Fork/Join and Concurrency Utilities doesn’t play nicely together in a managed environment http://mail.openjdk.java.net/pipermail/lambda-dev/2013-April/009335.html
  • 22. 4) Java EE doesn’t support resiliency • No notion of replication, containment, isolation or delegation. • With the exception of vendor specific features (which require clustering) • Failures are propagated and not contained • One component failure usuallybrings down the complete application • No support for bulkheading. Clients have to handle failures.
  • 23. 5) Java EE is implementedas containers – no service elasticity • Containerless development impossible • Testing is hard (Arquillian makes it bearable) • No simple development models • Compile, Build,Deploy – cycles for every microservice • No class-reloading (unless you use AMAZING tools like JRebel :-D) • No increasing or decreasing of resources under various workloads.(Back-pressure) • With the exception of vendor specific features (which require clustering)
  • 24. 6) No notion of immutability • Handling of large amounts of data within distributed systems requires immutability for data • Immutable services are the new paradigm in load balancing, high availability, and dynamic resource sharing. • JPA works well with RDBMS • CQRS and Event-Sourcing work well with immutable data-structures and are beneficial for microservices. http://cidrdb.org/cidr2015/Papers/CIDR15_Paper16.pdf
  • 25. 7) Choice of data stores, use of transactions and eventual consistency • No NoSQL support in Java EE • Polyglot persistence onlypossible in very few frameworks. • Heavily embracing distributed transactions with 2PC. • Eventual consistencyis ignored and discouraged http://adrianmarriott.net/logosroot/papers/LifeBeyondTxns.pdf
  • 26. 8) No outer architecture – while still calling it a platform • Monitoring • Distributed Logging • Security • Service discovery • Service locator • API versioning • Routing • …
  • 27. 9) Java EE doesn’t know services • No service component model • No service templates • Hardly any endpoint documentation (WSDLs) • No service boundaries • No way to enforce decoupling
  • 28. You can do it in this way, but then it sucks!
  • 32. Software Design System Architecture Methodology and Organization Distributed Systems Theory Data Center Operating System
  • 33. “Rules are for the obedience of fools and the guidance of wise men.” Generally attributed to Douglas Bader
  • 34. Written for architects and developersthat must quickly gain a fundamental understandingof microservice-basedarchitectures, this freeO’Reilly reportexploresthe journey fromSOAto microservices,discussesapproachesto dismantling your monolith,and reviews the key tenets ofa Reactive microservice: • Isolate all the Things • Act Autonomously • Do OneThing, and Do It Well • Own Your State, Exclusively • Embrace AsynchronousMessage-Passing • Stay Mobile,but Addressable • Collaborate as Systems to Solve Problems http://bit.ly/ReactiveMicroservice
  • 35. The detailed example inthis reportis based on Lagom, a new frameworkthat helps you follow the requirementsfor buildingdistributed,reactive systems. • Get an overview of the Reactive Programming model and basic requirementsfor developing reactive microservices • Learnhow to create base services, expose endpoints,and then connect them with a simple, web-based user interface • Understand how to deal with persistence,state, and clients • Use integration technologiesto start a successfulmigration away fromlegacy systems http://bit.ly/DevelopReactiveMicroservice
  • 36. http://bit.ly/SustainableEnterprise • Understand thechallenges ofstartinga greenfield development vs tearingapart an existing brownfield application into services • Examine your business domain to see if microservices would bea good fit • Explorebest practices for automation,high availability, data separation,and performance • Align your development teams around business capabilities and responsibilities • Inspect design patterns such as aggregator, proxy, pipeline, or shared resources to model service interactions
  • 38.
  • 41. •Keep all data in memory! • Store all state changes as events • Replay all events of an actor to recreate it • Strong consistencyfor Actor (aggregate) and Journal • Eventual Consistencyfor Read Side https://msdn.microsoft.com/en-us/library/jj554200.aspx