abstraction, federation and microservices

22
l e a n software development www.poppendieck.com Mary Poppendieck [email protected] [email protected] Abstraction and Federation From Micro Chips to Microservices

Upload: phamdiep

Post on 14-Feb-2017

230 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: abstraction, federation and microservices

l e a nsoftware development

www.poppendieck.comMary [email protected]@poppendieck.com

Abstraction and Federation

From Micro Chips to Microservices

Page 2: abstraction, federation and microservices

June 152 Copyright©2015 Poppendieck.LLC

1910 1943 1960 1964 19671950

1012 = One Trillion

Page 3: abstraction, federation and microservices

l e a n

Hardware Scales by

Miniaturization and Abstraction

Miniaturization

Abstraction

June 153 Copyright©2015 Poppendieck.LLC

1975 LSI 11 2015 CoreTM M

40years

Page 4: abstraction, federation and microservices

l e a n

Does Software Scale

through Abstraction?

June 154 Copyright©2015 Poppendieck.LLC

1975 2015

Page 5: abstraction, federation and microservices

Human-Centered Computing Themes for the FutureGerhard Fischer

Center for LifeLongLearning & Design (L3D), Department of Computer Science and Institute of Cognitive Science, Univ. of Colorado, Boulder

Presented at Univ. of Milan, February 2012

June 155 Copyright©2015 Poppendieck.LLC

1983 1993 2007 2015 +

Page 6: abstraction, federation and microservices

l e a n

Software Scales by

Federation and Wide ParticipationFederation

Minicomputer Local equipment control

(Isolation increases reliability)

PC Retail software packages

(Independent install and run)

Internet Websites

(Classic federated architecture)

Smartphone Apps

(Interact through the cloud)

Wide Participation

June 156 Copyright©2015 Poppendieck.LLCReputation Share Practices Education

Embedded

Servers

Services

Wearables

Page 7: abstraction, federation and microservices

l e a n

Friction:

Large System Disease

“Everything in war is simple, but the simplest thing is difficult. The difficulties accumulate and end by producing a kind of friction that is inconceivable unless one has experienced war.” --Carl von Clausewitz

June 157 Copyright©2015 Poppendieck.LLC

High Friction Low Friction

Page 8: abstraction, federation and microservices

l e a n

The Problem with Databases

Monolithic Architecture Microservice Architecture

June 158 Copyright©2015 Poppendieck.LLC

Technology Platform

Database Deep Dependencies

High Friction

Microservices Federation

Low Friction

Page 9: abstraction, federation and microservices

l e a n

Reduce Friction:

Monoliths Microservices

What is a Microservice?

1. Small service:

Does one thing well.

Independently Deployable.

2. Small team:

End-to-end Responsibility.

You build it – you monitor it – you fix it.

3. Practices:

No Central Databases.

Extensive Automation and Monitoring

Double Mock Contract Testing*

Smart Versioning Services.

Canary Releasing.June 159 Copyright©2015 Poppendieck.LLC

Product

Data

Ops

TestDesign

DevLow Friction

*https://github.com/realestate-com-au/pact*Beth Skurrie

Page 10: abstraction, federation and microservices

l e a n

BUT

Microservices Risk

Avoiding Dependency Hell

1. Is it Right for the Domain?

a. Very high volumes seem to require microservices

2. Do You Understand the Domain?

a. Get the bounded contexts right before you start!

b. Refactoring across services is difficult

3. Maintain Strict Discipline

a. Interaction restricted to hardened interfaces

b. Service teams maintain situational awarenessof their service, its consumers, and its providers.

June 15 Copyright©2015 Poppendieck.LLC10

High Risk

Page 11: abstraction, federation and microservices

l e a n

Limit Risk with

Situational Awareness

Consumer Provider

June 1511 Copyright©2015 Poppendieck.LLC

https://github.com/realestate-com-au/pact

Request Response

Mock

Does the Response behave the same as the Mock??

Request Response

PACT

Moc

k

http://martinfowler.com/articles/consumerDrivenContracts.html

Mock

Beth SkurrieLimited Risk

Page 12: abstraction, federation and microservices

l e a n

System of Systems

Cost to Develop & Operate Compared to Competitors

June 1512 Copyright©2015 Poppendieck.LLC

Design goals: 1) low cost, 2) high reliability, 3) highly maneuverability

Low FrictionLimited Risk

Page 13: abstraction, federation and microservices

l e a n

The Gripen

Rapid DevelopmentIntegrated Federated Architecture

June 1513 Copyright©2015 Poppendieck.LLC

Limited Risk Lower Friction

Page 14: abstraction, federation and microservices

l e a n

Strategies for Monoliths:

Pack Dependent Code into Containers

Packing Containers1. Start with an important module.

2. Find its [major] dependencies.

3. Package related code into a container.

4. Repeat, refactoring to keep containers small..

Why Containers?

Portability Build once run anywhere

Consistency Configuration managed

by containers at runtime

Isolation Hardened containers

protect the contents

Easy of Use 1 sec start up

15 min learning curve

Utilization Many more apps/server

June 1514 Copyright©2015 Poppendieck.LLC

Server

Host OS

Hypervisor

Guest

OS

Bins

/Libs

Guest

OS

Guest

OS

App

A'

Bins

/Libs

Bins

/Libs

App

A

App

B

Server

Host OS

Docker Engine

Bins/LibsBins/Libs

App

A

App

A'

App

B

App

B'

App

B'

App

B'

App

B'

Virtualization Containers

Low Friction

Limited Risk

Page 15: abstraction, federation and microservices

l e a n

Strategies for Monoliths:

One Thing We Know for Sure

For Complex Systems

This does not work

June 15 Copyright©2015 Poppendieck.LLC15

Page 16: abstraction, federation and microservices

l e a n

Strategies for Monoliths:

One Thing We Know for Sure

For Complex Systems

This works

June 15 Copyright©2015 Poppendieck.LLC16

Page 17: abstraction, federation and microservices

l e a n

Strategies for Monoliths:

Use Continuous Delivery

June 15 Copyright©2015 Poppendieck.LLC17

Acceptance test driven development process

Tight collaboration between business and delivery teams

Cross-functional teams include QA and operations

Automated build, testing, db migration, and deployment

Incremental development on mainline with continuous integration

Software always production ready

Releases tied to business needs, not operational constraints

Credit: Jez Humble

Limited Risk

Low Friction

Page 18: abstraction, federation and microservices

l e a n

Dev and Ops are Different

Safety-Focused Goals(Prevention Focus)Prevent Failure Is it safe?

Find the safest option

Duty and Obligation Setbacks => redoubled efforts

Praise => more relaxed efforts

Rewards Attention is for bad behavior

Nothing going wrong (no loss)is the ideal reward

Aspirational Goals(Promotion Focus)Create gains Let’s do it!

Explore all the options

Aspirational Goals Praise => redoubled efforts

Setbacks => discouragement

Rewards Attention is for good behavior

Gains are the ideal reward

June 1518 Copyright©2015 Poppendieck.LLC

Regulatory Focus

Lower FrictionLimit Risk

Page 19: abstraction, federation and microservices

l e a n

One Goal

Shared Responsibility

“The Business”

“The Product Guys”

“The Engineers”

“Operations”

“We Work Together”

“Nobody Succeeds Unless Everyone Succeeds”

June 1519 Copyright©2014 Poppendieck.LLCNot Me All of Us

Who is Responsible?

Page 20: abstraction, federation and microservices

l e a n

The Military Model

Understand Command Intent

Two Levels Up

Command Intent:

A concise expression of the purpose of

the campaign, the desired results, and the

expected team progress toward achieving

the desired end state.

Maintain Situational Awareness

One Level Up

1. Collaborative Planning

2. Situational awareness of the

progress of other squads/platoons

3. Adapt to make sure the

company reaches the end state

June 1520 Copyright©2015 Poppendieck.LLC

Page 21: abstraction, federation and microservices

l e a n

Maneuverability*

The ability to gain, shed,

or redirect momentum

really fast.

The ability to capitalize

on agility with flawless

execution.

June 15 Copyright©2015 Poppendieck.LLC21

* Thanks to Mike Nygard! http://www.michaelnygard.com/blog/2015/04/manueverability/

Limited Risk

Low Friction

The most

maneuverable

competitor wins.

Page 22: abstraction, federation and microservices

l e a nsoftware development

www.poppendieck.comMary [email protected]@poppendieck.com

Thank You!

For a copy of these slides, e-mail [email protected]