develop & deploy cloud-native apps as resilient microservices architectures

47
1 Develop & Deploy Cloud-native Apps as Resilient Microservices Architectures @burrsutter [email protected] http://developers.redhat.com http://bit.ly/helloworldmsa

Upload: red-hat-developers

Post on 15-Apr-2017

516 views

Category:

Technology


0 download

TRANSCRIPT

1

Develop & Deploy Cloud-native Apps as Resilient Microservices Architectures

@[email protected]

http://developers.redhat.comhttp://bit.ly/helloworldmsa

Change History

0.9 - NYC Java Meetup1.0 - Great India Developer Summit - fail slides, title change

@burrsutter developers.redhat.com

Microservices is about

AgilityContinuous Delivery, Deployment, Improvement

Peak of Inflated Expectations

Microservices

x

Trough of Disillusionment

Serious Hotness

Your Journey to Microservices :-)

Self-ServiceOn-Demand

ElasticInfrastructure

(Cloud)

Re-Org toDevOps

AutomationPuppet, Chef,

Ansible

CI & CDDeployment

Pipeline&

Containers

OneMicroservice

SiliconValley

DotComStartup

Green vs Brown (shades Brown)

GREENBROWN

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

DTOsEntities3rd Party Maven Dependencies

Programmers(18) Operators

(6)

DBAs(3)

Project Managers

(2)

Business Analysts

(4)

QualityAssurance

(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 reliabilityA/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 ESBOne 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 iPhoneThe 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

Independenceaids Agility

Microservice Principles/Characteristics1. Deployment Independence - updates to an individual

microservice have no negative impact to any other component of the system. Optimized for replacement

2. API Focused3. Do one thing well - small enough and no smaller4. Fit in your head5. Decentralized Data Management

Microservice Concerns

MyService

Resilience

Discovery

Load BalancingScaling / Elasticity Logging

Monitoring

Build,Deployment

PipelineTracing

InvocationMessaging /

IPC

API Authentication

Browser

ExampleACME Laptop 128GB SSD, 8GB RAM

$323.56

Touchscreen128GB SSD 8GB RAMCore i3Windows 10

Add to Cart

In-Store Pickup (15 available)Raleigh, Central Ave, Store #1123

Recommendations

ExampleACME Laptop 128GB SSD, 8GB RAM

$323.56

Touchscreen128GB SSD 8GB RAMCore i3Windows 10

Add to Cart

In-Store Pickup (15 available)Raleigh, Central Ave, Store #1123

Recommendations

Pricing EngineReviews

Details/Specifications

Location-based availability

People who purchased also...

Example(Fail)

ACME Laptop 128GB SSD, 8GB RAM

$323.56

Touchscreen128GB SSD 8GB RAMCore i3Windows 10

Add to Cart

In-Store Pickup (15 available)Raleigh, Central Ave, Store #1123

Recommendations

Pricing EngineReviews

Details/Specifications

Location-based availability

People who purchased also...

X

Example(Fallback)

ACME Laptop 128GB SSD, 8GB RAM

$323.56

Touchscreen128GB SSD 8GB RAMCore i3Windows 10

Add to Cart

Closest store:Raleigh, Central Ave, Store #1123

Recommendations

Pricing EngineReviews

Details/Specifications

Location-based availability

People who purchased also...

X

API “Gateway”

API “Gateway” (Fail)

X

Chaining

Chaining (Fail)

X

Chaining (Cascading Fail)

XXXXX

Mixed

Microservices Playground

https://github.com/redhat-helloworld-msahttp://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

Ver

ticle

1

Ver

ticle

2

Ver

ticle

3

Ver

ticle

4

Ver

ticle

5

JVM

Vert.x Instance

Ver

ticle

1

Ver

ticle

2

Ver

ticle

6

Ver

ticle

7

JVM

Vert.x Instance

vertx.eventBus

Service A Service B

Circuit Breaker

Service A Service B

Hystrix - circuit-breaker, bulkhead

Majestic Monolithhttps://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