1
Develop & Deploy Cloud-native Apps as
Resilient Microservices Architectures
@burrsutter
burr@redhat.com
http://developers.redhat.com
http://bit.ly/helloworldmsa
Change History
0.9 - NYC Java Meetup
1.0 - Great India Developer Summit - fail slides, title change
@burrsutter developers.redhat.com
Microservices is about
Agility
Continuous Delivery, Deployment, Improvement
Peak of
Inflated Expectations
Microservices
x
Trough of
Disillusionment
Serious Hotness
Your Journey to Microservices :-)
Self-Service
On-Demand
Elastic
Infrastructure
(Cloud)
Re-Org to
DevOps
Automation
Puppet, Chef,
Ansible
CI & CD
Deployment
Pipeline
&
Containers
One
Microservice
Silicon
Valley
DotCom
Startup
Green vs Brown (shades Brown)
GREEN
BROWN
Operating System
Java Virtual Machine
Application Server
EAR - Enterprise Archive
.WAR .WAR.WAR.WAR
.JAR.JAR
.JAR
.JAR.JAR
.JAR
.JAR
.JAR
.JAR
.JAR
.JAR.JAR
.JAR
DTOs
Entities
3rd Party Maven
Dependencies
Programmers
(18) Operators
(6)
DBAs
(3)
Project
Managers
(2)
Business
Analysts
(4)
Quality
Assurance
(6)
Compliance
(2)
Software creates real value for the organization when in production (not
in dev, test, stage). There are lessons you can only learn in production.
Many shops take 6 to 9 months for changed code to land in production.
36 Weeks
Monolithic System
Change
Request
Break Up Monolith - into independently deployable services -
microservices housed in Linux Containers (Docker)
36 Weeks
Monolithic System
Change
Request 12 Weeks
Some microservices change faster than others - drivers include
regulation, environmental, competitive, political
36 Weeks
Monolithic System
Change
Request 9 Weeks12 Weeks
Improving microservice “bounded context” with every iteration
36 Weeks
Monolithic System
Change
Request 9 Weeks 612 Weeks
36 Weeks
Monolithic System
Change
Request 9 Weeks 6 412 Weeks
Improved Automation + Improved Team Trust +
Refactored microservices = increased team velocity
Ensuring API backward compatibility allows for faster/safer deployment
36 Weeks
Monolithic System
Change
Request 9 Weeks 6 4 312 Weeks
36 Weeks
Monolithic System
Change
Request 9 Weeks 6 4 3 112 Weeks
Blue/Green Deployments further aid reliability
A/B Testing in Production aids learning and improving
DevOps is an approach to culture, process and tools that emphasizes
collaboration and communication - delivering increased business value via
software delivery more rapidly, frequently, reliably
36 Weeks
Monolithic System
Change
Request 9 Weeks 6 4 3 1112 Weeks
Enterprise Service Bus
The One ESB
One bus to rule them all,
One bus to find them,
One bus to bring them all
And in the darkness bind them
WITH GREAT POWER THERE MUST ALSO COME -- GREAT RESPONSIBILITY!
Amazing Fantasy #15 (August 1962)
Photo taken with Burr’s iPhone
The Amazing Spider-Man Omnibus Vol 1
Conway’s Law
"Any organization that designs a system (defined more broadly here than just
information systems) will inevitably produce a design whose structure is a copy
of the organization's communication structure."
https://www.thoughtworks.com/insights/blog/demystifying-conways-law
Independence
aids Agility
Microservice Principles/Characteristics
1. Deployment Independence - updates to an individual
microservice have no negative impact to any other component of
the system. Optimized for replacement
2. API Focused
3. Do one thing well - small enough and no smaller
4. Fit in your head
5. Decentralized Data Management
Microservice Concerns
MyService
Resilience
Discovery
Load
Balancing
Scaling /
Elasticity
Logging
Monitoring
Build,
Deployment
Pipeline
Tracing
Invocation
Messaging /
IPC
API Authentication
Browser
Example
ACME Laptop 128GB SSD,
8GB RAM
$323.56
Touchscreen
128GB SSD
8GB RAM
Core i3
Windows 10
Add to Cart
In-Store Pickup (15 available)
Raleigh, Central Ave, Store #1123
Recommendations
Example
ACME Laptop 128GB SSD,
8GB RAM
$323.56
Touchscreen
128GB SSD
8GB RAM
Core i3
Windows 10
Add to Cart
In-Store Pickup (15 available)
Raleigh, Central Ave, Store #1123
Recommendations
Pricing Engine
Reviews
Details/Specifications
Location-based availability
People who purchased also...
Example
(Fail) ACME Laptop 128GB SSD,
8GB RAM
$323.56
Touchscreen
128GB SSD
8GB RAM
Core i3
Windows 10
Add to Cart
In-Store Pickup (15 available)
Raleigh, Central Ave, Store #1123
Recommendations
Pricing Engine
Reviews
Details/Specifications
Location-based availability
People who purchased also...
X
Example
(Fallback) ACME Laptop 128GB SSD,
8GB RAM
$323.56
Touchscreen
128GB SSD
8GB RAM
Core i3
Windows 10
Add to Cart
Closest store:
Raleigh, Central Ave, Store #1123
Recommendations
Pricing Engine
Reviews
Details/Specifications
Location-based availability
People who purchased also...
X
API “Gateway”
API “Gateway”
(Fail)
X
Chaining
Chaining (Fail)
X
Chaining (Cascading Fail)
XXXX
X
Mixed
Microservices Playground
https://github.com/redhat-helloworld-msa
http://developers.redhat.com/downloads
Container Development Kit
Helloworld MSA
DropWizard
www.dropwizard.io
JAX-RS API
First to market
DropWizard Metrics
Embeddable servers:
Jetty
Spring Boot
projects.spring.io/spring-boot
Spring API (@RestController)
‘Starter’ POMs:
start.spring.io
Embeddable servers:
Tomcat, Jetty, Undertow
WildFly Swarm
wildfly-swarm.io
Java EE 7 APIs
‘Starter’ POMs: wildfly-swarm.
io/generator
Embeddable servers:
WildFly (Undertow)
Opinionated & java -jar myapp.jar
Vert.x
(Un-Opinionated) Toolkit for reactive, async applications
Every user has their own Vert.x way
Low-latency microservices that interact using the EventBus
Built in elasticity and resiliency
Interact with anything (.NET, Go, Rust, Cobol, Java EE, Spring...)
vertx.io
http://vertx.io/blog/my-first-vert-x-3-application/
Vert.x EventBus
Verticle1
Verticle2
Verticle3
Verticle4
Verticle5
JVM
Vert.x Instance
Verticle1
Verticle2
Verticle6
Verticle7
JVM
Vert.x Instance
vertx.eventBus
Service A Service B
Circuit Breaker
Service A Service B
Hystrix - circuit-breaker, bulkhead
Majestic Monolith
https://m.signalvnoise.com/the-majestic-monolith-29166d022228
Microservices are not for everybody :-)
Release It!
Michael T. Nygard
(note: Java references are a bit dated but
the fail stories are brilliant)
@burrsutter developers.redhat.com

Develop & Deploy cloud-native apps as resilient Microservices Architectures