microservices and self-contained system to scale agile

64
Microservices & Self- Contained Systems to Scale Agile Eberhard Wolff Fellow, innoQ @ewolff

Upload: eberhard-wolff

Post on 06-Jan-2017

767 views

Category:

Software


3 download

TRANSCRIPT

Page 1: Microservices and Self-contained System to Scale Agile

Microservices & Self-Contained Systems to Scale

AgileEberhard WolffFellow, innoQ

@ewolff

Page 2: Microservices and Self-contained System to Scale Agile

http://continuous-delivery-buch.de/

Page 3: Microservices and Self-contained System to Scale Agile

http://microservices-buch.de/ http://microservices-book.com/

Page 4: Microservices and Self-contained System to Scale Agile

http://microservices-book.com/primer.html

FREE!!!!

Page 5: Microservices and Self-contained System to Scale Agile

Microservices

Page 6: Microservices and Self-contained System to Scale Agile

Server Server

Microservices: Definition

> Independent deployment units

> E.g. process, VMs, Docker containers

> Any technology

> Any infrastructure

MicroService

MicroService

Page 7: Microservices and Self-contained System to Scale Agile

Components Collaborate

MicroService

MicroService

Link

Data Replication

RESTMessaging

Page 8: Microservices and Self-contained System to Scale Agile

Layered Microservices

iOS Android Web

Order Search Catalog

BillingCustomer

Backend Backend Backend

Page 9: Microservices and Self-contained System to Scale Agile

Layered Microservices

> Reusable Backend Services

> Mobile client / Web App as frontend

> Backend for frontend (BFF): Custom backend services

> ...to implement frontend specific logic

Page 10: Microservices and Self-contained System to Scale Agile

Layered: Issues

> BFF might contain the same logic – same processes

> BFF might contain most relevant logic

> Change to a business process meanschanging many services

> Lots of communication

Page 11: Microservices and Self-contained System to Scale Agile

Self-contained System

Page 12: Microservices and Self-contained System to Scale Agile

Deploymentmonolith

Graphics by Roman Stranghöhner, innoQhttp://scs-architecture.org

Page 13: Microservices and Self-contained System to Scale Agile

Cut Deploymentmonolith along domains …

Page 14: Microservices and Self-contained System to Scale Agile

… wrap domain in separate web application …

Page 15: Microservices and Self-contained System to Scale Agile

Self-contained System (SCS) –individuallydeployable

Page 16: Microservices and Self-contained System to Scale Agile

SCS =user interface+business logic+data storage

Page 17: Microservices and Self-contained System to Scale Agile

Each SCS contains all layers.

Page 18: Microservices and Self-contained System to Scale Agile

Self-contained Systemsshould be integrated in the web interface

Page 19: Microservices and Self-contained System to Scale Agile

Synchronous remote calls inside the business logic should be avoided.

Page 20: Microservices and Self-contained System to Scale Agile

Asynchronous Remote calls reduce dependencies and prevent error cascades.

Page 21: Microservices and Self-contained System to Scale Agile

Every SCS brings its own data storagewith its own(potentiallyredundant) data

Page 22: Microservices and Self-contained System to Scale Agile

Domained scopedSCS enables the development, operation and maintenance of an domain by a single team.

Team 1

Team 2 Team 3

Page 23: Microservices and Self-contained System to Scale Agile

1 SCS

= 1 Domain

= 1 Web App

= 1 Team

= 1-n Microservices

Page 24: Microservices and Self-contained System to Scale Agile

Why create such a complex system?

Page 25: Microservices and Self-contained System to Scale Agile

Legacy Apps

Page 26: Microservices and Self-contained System to Scale Agile

HTTP

New Stuff

Links

No legacy codeAny technology

JSmall code base

Page 27: Microservices and Self-contained System to Scale Agile

Sustainable Development

Page 28: Microservices and Self-contained System to Scale Agile

Monoliths

> Architecture rot

> …not maintainable any more

> …and can’t be rewritten / replaced

Page 29: Microservices and Self-contained System to Scale Agile

Microservices> Distributed system of small units

> Architecture violations harder

> Architecture won’t rot

> Small units

> Easy to replace

> Service rotten? Replace!

Page 30: Microservices and Self-contained System to Scale Agile

Robust

> One failing Microservice doesn’t crash the system

> However, Microservices must deal with failing Microservices

Page 31: Microservices and Self-contained System to Scale Agile

Continuous Delivery

Page 32: Microservices and Self-contained System to Scale Agile

Principles behind the Agile Manifesto

Our highest priority is

to satisfy the customer

through early and

continuous delivery

of valuable software.

Page 33: Microservices and Self-contained System to Scale Agile

Deployment Monolith

ECommerceSystem

3rd partysystems

Database

Page 34: Microservices and Self-contained System to Scale Agile

Continuous Delivery:Build Pipeline

ECommerceSystem

CommitStage

AutomatedAcceptance

Testing

AutomatedCapacityTesting

ManualExplorative

TestingRelease

Page 35: Microservices and Self-contained System to Scale Agile

Build Pipeline: Problems

> Complex infrastructure

> Huge database

> 3rd party integration

> Slow feedback

> Test everything for each commit

> Huge deployment unit

> Deployment slow

Page 36: Microservices and Self-contained System to Scale Agile

Microservices

ECommerceSystem

3rd partysystems

Database

Page 37: Microservices and Self-contained System to Scale Agile

Microservices

3rd partysystems

Database

Order

Catalog

Billing

Search

Page 38: Microservices and Self-contained System to Scale Agile

Order

Billing

Customer

Commit!Stage!

Automated!Acceptance!Testing!

Automated!Capacity!Testing!

Manual!Explorative!Testing!

Release!

Commit!Stage!

Automated!Acceptance!Testing!

Automated!Capacity!Testing!

Manual!Explorative!Testing!

Release!

Commit!Stage!

Automated!Acceptance!Testing!

Automated!Capacity!Testing!

Manual!Explorative!Testing!

Release!

Page 39: Microservices and Self-contained System to Scale Agile

Build Pipeline forMicroservices

> Independent deployment

> Build pipeline per Microservice

> Smaller

> Easier to set up

> Less features (3rd party systems)

> Faster Feedback: Less tests

Page 40: Microservices and Self-contained System to Scale Agile

Independent Scaling

> Can scale each Microserviceindenpendently

> Much easier than for a Deployment Monolith

Page 41: Microservices and Self-contained System to Scale Agile

Technology Freedom

> No meetings for introducing a bug fix in a library!

> No big migration away from outdated technology

> Easier experiments

> Higher motivation

Page 42: Microservices and Self-contained System to Scale Agile

Scaling Agility

Page 43: Microservices and Self-contained System to Scale Agile

Scaling Agility

> Do more

> Get more storiesimplemented

> ...and running in production

TODO IN PROGRESS DONE

Page 44: Microservices and Self-contained System to Scale Agile

Scaling Agility

> Add more people

> Let the work in parallel

> Build more teams

Page 45: Microservices and Self-contained System to Scale Agile

What is the problem?

Page 46: Microservices and Self-contained System to Scale Agile

Communication

> Agile means communication

> Instead of written requirements

> ...story cards

> + direct communication

Page 47: Microservices and Self-contained System to Scale Agile

# Persons vs. Potential Links

0

100

200

300

0 10 20 30

Page 48: Microservices and Self-contained System to Scale Agile

Communication is great!

Need more persons

Page 49: Microservices and Self-contained System to Scale Agile

Challenges forScaling Agile

> Dependencies cause delays

> Too much communication aboutfunctionalities,...

> ...releasing software,

> ...and technologies

Page 50: Microservices and Self-contained System to Scale Agile

Challenges forScaling Agile

> Dependencies cause delays

> Too much communication aboutfunctionalities...

> ...releasing software,

> ...and technologies

Page 51: Microservices and Self-contained System to Scale Agile

Conway‘s Law

Architecturecopies

communication structuresof the organization

Page 52: Microservices and Self-contained System to Scale Agile

Logic

UI

Database

Change Order

Process!

Page 53: Microservices and Self-contained System to Scale Agile

time

DBTeam Sprint

LogicTeam Sprint

GUITeam Sprint

3 sprints

Page 54: Microservices and Self-contained System to Scale Agile

Domained scopedSCS enables the development of a domain by a single team

– no coordinationOrder Team =

UI+Logic+Database

Page 55: Microservices and Self-contained System to Scale Agile

Challenges for ScalingAgile

> Dependencies cause delays

> Too much communication aboutfunctionalities...

> ...releasing software,

> ...and technologies

Page 56: Microservices and Self-contained System to Scale Agile

Deployment Monolith

Stories

Technical Coordination

Coordinating Releases

Page 57: Microservices and Self-contained System to Scale Agile

Self-contained System (SCS) –individuallydeployable

Page 58: Microservices and Self-contained System to Scale Agile

Technical decisions can be made independently from other systems(programming language, frameworks, tooling, platform)

Page 59: Microservices and Self-contained System to Scale Agile

SCS

Stories

TechnicalCoordination

Stories

TechnicalCoordination

Stories

TechnicalCoordination

Order Billing Search

Release Release Release

Page 60: Microservices and Self-contained System to Scale Agile

Why Microservices/SCS?

Sustainable development speed

Continuous Delivery

Choose best technology for job!

Handle Legacy more efficient

Independent Scaling

Robustness

Scaling Agile

Page 61: Microservices and Self-contained System to Scale Agile

Conclusion

Page 62: Microservices and Self-contained System to Scale Agile

Conclusion: SCS & Microservices

> Microservices have many advantages

> SCS are a way to use Microservices

> …for large projects

> …to scale agile

Page 63: Microservices and Self-contained System to Scale Agile

Thank You!

@ewolff

http://microservices-buch.de/

http://microservices-book.com/primer.html

http://scs-architecture.org

Page 64: Microservices and Self-contained System to Scale Agile

EMail [email protected] to get:Slides+ Microservices Primer+ Sample Microservices Book+ Sample of Continuous Delivery Book

Powered by Amazon Lambda & Microservices