RIP IT UP AND START AGAIN?
Sam Newman
THE MICROSERVICES ORGANISATION
@samnewman
Sam Newman
Building
Microservices
DESIGNING FINE-GRAINED SYSTEMS
@samnewman
NEW BOOK!
https://samnewman.io/books/monolith-to-microservices/
@samnewman
Inventory
Returns
Invoicing
Accounts
Customer
Service
Shipping
@samnewman
Inventory
Returns
Invoicing
Accounts
Customer
Service
Shipping
@samnewman
Inventory
Returns
Invoicing
Accounts
Customer
Service
Shipping
Independently deployable services that work
together, modelled around a business domain
@samnewman
Independently deployable services that work
together, modelled around a business domain
@samnewman
Independently deployable services that work
together, modelled around a business domain
Inventory
Returns
Invoicing
Accounts
Customer
Service
Shipping
V1
Inventory
Returns
Invoicing
Accounts
Customer
Service
Shipping
V2
@samnewman
Music Corp
@samnewman
Music Corp
Persistence
@samnewman
Music Corp
Persistence
@samnewman
Music Corp
Persistence
@samnewman
Music Corp
Persistence
@samnewman
Music Corp
Persistence
@samnewman
Music Corp
Persistence
Low Cohesion
@samnewman
Music Corp
Persistence
Low Cohesion
@samnewman
Music Corp
Persistence
Low Cohesion
High Coupling
@samnewman
Music Corp
Persistence
Low Cohesion
High Coupling
@samnewman
ONION ARCHITECTURE
Music Corp
Persistence
Low Cohesion
High Coupling
@samnewman
3 TIERED ARCHITECTURE
@samnewman
3 TIERED ARCHITECTURE
Presentation
@samnewman
3 TIERED ARCHITECTURE
Presentation
Business
@samnewman
3 TIERED ARCHITECTURE
Presentation
Business
Data Access
@samnewman
3 TIERED ARCHITECTURE
Presentation
Business
Data Access
FE Devs
@samnewman
3 TIERED ARCHITECTURE
Presentation
Business
Data Access
Devs
FE Devs
@samnewman
3 TIERED ARCHITECTURE
Presentation
Business
Data Access
Devs
DBAs
FE Devs
@samnewman
TRADITIONAL IT STRUCTURES
Devs QAs DBAs Ops
@samnewman
TRADITIONAL IT STRUCTURES
Devs QAs DBAs Ops
@samnewman
TRADITIONAL IT STRUCTURES
Devs QAs DBAs Ops
CIO/CTO
@samnewman
TRADITIONAL IT STRUCTURES
Devs QAs DBAs Ops
CIO/CTO
“The Business”
@samnewman
CONWAY’S LAW
@samnewman
CONWAY’S LAW
"Organizations which design systems ... are constrained
to produce designs which are copies of the
communication structures of these organizations"
- Melvin Conway
@samnewman
FEATURE-BASED TEAMS
Presentation
Business
Data Access
@samnewman
FEATURE-BASED TEAMS
Presentation
Business
Data Access
@samnewman
FEATURE-BASED TEAMS
Presentation
Business
Data Access
@samnewman
FEATURE-BASED TEAMS
Presentation
Business
Data Access
Devs
DBAs
FE Devs
@samnewman
FEATURE-BASED TEAMS
Presentation
Business
Data Access
Devs
DBAs
FE Devs
Contention
@samnewman
FEATURE-BASED TEAMS
Presentation
Business
Data Access
Devs
DBAs
FE Devs
Contention
Temporary
Teams?
@samnewman
Feature-based teams =
collective ownership
@samnewman
SPLIT DIFFERENTLY
Presentation
Business
Data Access
Presentation
Business
Data Access
Presentation
Business
Data Access
@samnewman
FASTER DELIVERY
Inventory
Returns
Invoicing
Accounts
Customer
Service
Shipping
@samnewman
FASTER DELIVERY
Inventory
Returns
Invoicing
Accounts
Customer
Service
Shipping
@samnewman
FASTER DELIVERY
Inventory
Returns
Invoicing
Accounts
Customer
Service
Shipping
@samnewman
FASTER DELIVERY
Inventory
Returns
Invoicing
Accounts
Customer
Service
Shipping
@samnewman
CODE OWNERSHIP
https://martinfowler.com/bliki/CodeOwnership.html
@samnewman
CODE OWNERSHIP
https://martinfowler.com/bliki/CodeOwnership.html
Strong
@samnewman
CODE OWNERSHIP
https://martinfowler.com/bliki/CodeOwnership.html
Strong
Weak
@samnewman
CODE OWNERSHIP
https://martinfowler.com/bliki/CodeOwnership.html
Strong
Weak
Collective
@samnewman
COLLECTIVE OWNERSHIP?
Accounts
Returns
Invoicing
Shipping
Inventory
User
Service
@samnewman
COLLECTIVE OWNERSHIP?
Accounts
Returns
Invoicing
Shipping
Inventory
User
Service
@samnewman
COLLECTIVE OWNERSHIP?
Accounts
Returns
Invoicing
Shipping
Inventory
User
Service
@samnewman
COLLECTIVE OWNERSHIP?
Accounts
Returns
Invoicing
Shipping
Inventory
User
Service
Flexible working
@samnewman
COLLECTIVE OWNERSHIP?
Accounts
Returns
Invoicing
Shipping
Inventory
User
Service Retaining product and
technical alignment?
Flexible working
@samnewman
COLLECTIVE OWNERSHIP?
Accounts
Returns
Invoicing
Shipping
Inventory
User
Service Retaining product and
technical alignment?
Flexible working
Business alignment?
@samnewman
COLLECTIVE OWNERSHIP?
Accounts
Returns
Invoicing
Shipping
Inventory
User
Service Retaining product and
technical alignment?
Flexible working
Business alignment?
Co-ordination!
@samnewman
COLLECTIVE OWNERSHIP?
Accounts
Returns
Invoicing
Shipping
Inventory
User
Service Retaining product and
technical alignment?
Flexible working
Business alignment?
Scale?
Co-ordination!
@samnewman
SERVICES OWNED BY TEAMS
Accounts
Returns
Invoicing
Shipping
Inventory
User
Service
@samnewman
SERVICES OWNED BY TEAMS
Accounts
Returns
Invoicing
Shipping
Inventory
User
Service
@samnewman
SERVICES OWNED BY TEAMS
Accounts
Returns
Invoicing
Shipping
Inventory
User
Service
@samnewman
SERVICES OWNED BY TEAMS
Accounts
Returns
Invoicing
Shipping
Inventory
User
Service
Clear lines of ownership
@samnewman
SERVICES OWNED BY TEAMS
Accounts
Returns
Invoicing
Shipping
Inventory
User
Service
Clear lines of ownership
Increased autonomy
@samnewman
SERVICES OWNED BY TEAMS
Accounts
Returns
Invoicing
Shipping
Inventory
User
Service
Clear lines of ownership
Increased autonomy
Easier to align to the business
@samnewman
SERVICES OWNED BY TEAMS
Accounts
Returns
Invoicing
Shipping
Inventory
User
Service
Clear lines of ownership
Increased autonomy
Easier to align to the business
Bottlenecks?
@samnewman
SERVICES OWNED BY TEAMS
Accounts
Returns
Invoicing
Shipping
Inventory
User
Service
Clear lines of ownership
Increased autonomy
Easier to align to the business
Bottlenecks?
Orphaned Services?
@samnewman
SERVICES OWNED BY TEAMS
Accounts
Returns
Invoicing
Shipping
Inventory
User
Service
Clear lines of ownership
Increased autonomy
Easier to align to the business
Bottlenecks?
Orphaned Services?
Local vs Global Optimisation?
@samnewman
Collective code ownership
struggles with scale
@samnewman
Collective
Ownership
Strong
Ownership
@samnewman
Collective
Ownership
Strong
Ownership
@samnewman
Collective
Ownership
Strong
Ownership
Global consistency
@samnewman
Collective
Ownership
Strong
Ownership
Global consistency Local optimisation
@samnewman
Independent
Deployablility
@samnewman
STEVE YEGGE’S PLATFORM RANT
https://plus.google.com/+RipRowan/posts/eVeouesvaVX
@samnewman
STEVE YEGGE’S PLATFORM RANT
“All teams will henceforth expose their data and functionality
through service interfaces”
https://plus.google.com/+RipRowan/posts/eVeouesvaVX
@samnewman
STEVE YEGGE’S PLATFORM RANT
“All teams will henceforth expose their data and functionality
through service interfaces”
“Teams must communicate with each other through these
interfaces”
https://plus.google.com/+RipRowan/posts/eVeouesvaVX
@samnewman
@samnewman
Amazon prioritises local optimisation
APIs
APIs
Co-ordination
Shipping
V2
DB
Shipping
V2
DB
Shipping
V2
DB
Shipping
V2
DB
Shipping
V2
DB
Shipping
V2
DB
@samnewman
PROBLEMS WITH DEFINED OWNERSHIP BOUNDARIES
Accounts
Returns
Invoicing
Shipping
Inventory
User
Service Bottlenecks
@samnewman
PROBLEMS WITH DEFINED OWNERSHIP BOUNDARIES
Accounts
Returns
Invoicing
Shipping
Inventory
User
Service Bottlenecks
Orphaned Services
@samnewman
PROBLEMS WITH DEFINED OWNERSHIP BOUNDARIES
Accounts
Returns
Invoicing
Shipping
Inventory
User
Service Bottlenecks
Orphaned Services
Local Optimisation
@samnewman
BOTTLENECKS
Inventory
Returns
Invoicing
Accounts
Customer
Service
Shipping
@samnewman
BOTTLENECKS
Inventory
Returns
Invoicing
Accounts
Customer
Service
Shipping
@samnewman
BOTTLENECKS
Inventory
Returns
Invoicing
Accounts
Customer
Service
Shipping
@samnewman
BOTTLENECKS
Inventory
Returns
Invoicing
Accounts
Customer
Service
Shipping
Move People
@samnewman
BOTTLENECKS
Inventory
Returns
Invoicing
Accounts
Customer
Service
Shipping
Move People
@samnewman
BOTTLENECKS
Inventory
Returns
Invoicing
Accounts
Customer
Service
Shipping
Move People
Pull Request
@samnewman
BOTTLENECKS
Inventory
Returns
Invoicing
Accounts
Customer
Service
Shipping
Move People
Pull Request
@samnewman
ORPHANED SERVICES
Inventory
Returns
Invoicing
Accounts
Customer
Service
Shipping
@samnewman
ORPHANED SERVICES
Inventory
Returns
Invoicing
Accounts
Customer
Service
Shipping
@samnewman
ORPHANED SERVICES
Inventory
Returns
Invoicing
Accounts
Customer
Service
Shipping
???
@samnewman
ORPHANED SERVICES
Inventory
Returns
Invoicing
Accounts
Customer
Service
Shipping
???
Take
Ownership
@samnewman
ORPHANED SERVICES
Inventory
Returns
Invoicing
Accounts
Customer
Service
Shipping
???
Take
Ownership
@samnewman
ORPHANED SERVICES
Inventory
Returns
Invoicing
Accounts
Customer
Service
Shipping
???
Take
Ownership
Roving
Custodian
@samnewman
ORPHANED SERVICES
Inventory
Returns
Invoicing
Accounts
Customer
Service
Shipping
???
Take
Ownership
Roving
Custodian
@samnewman
ORPHANED SERVICES
Inventory
Returns
Invoicing
Accounts
Customer
Service
Shipping
???
Take
Ownership
Roving
Custodian
@samnewman
LOCAL OPTIMISATION
Inventory
Returns
Invoicing
Accounts
Customer
Service
Shipping
@samnewman
LOCAL OPTIMISATION
Inventory
Returns
Invoicing
Accounts
Customer
Service
Shipping
Mongo!
@samnewman
LOCAL OPTIMISATION
Inventory
Returns
Invoicing
Accounts
Customer
Service
Shipping
Mongo!
Oracle!
@samnewman
LOCAL OPTIMISATION
Inventory
Returns
Invoicing
Accounts
Customer
Service
Shipping
Mongo!
Oracle! Cassandra!
@samnewman
LOCAL OPTIMISATION
Inventory
Returns
Invoicing
Accounts
Customer
Service
Shipping
Mongo!
Oracle! Cassandra!
@samnewman
LOCAL OPTIMISATION
Inventory
Returns
Invoicing
Accounts
Customer
Service
Shipping
Mongo!
Oracle! Cassandra!
Communities Of Practice
@samnewman
LOCAL OPTIMISATION
Inventory
Returns
Invoicing
Accounts
Customer
Service
Shipping
Mongo!
Oracle! Cassandra!
Communities Of Practice
Governance
@samnewman
RIP IT UP AND START AGAIN?
“And there was times I'd take my pen
And feel obliged to start again”
- Orange Juice
@samnewman
Local vs Global Optimisation
@samnewman
Microservices are an architecture
which optimises for autonomy
You have to decide how much
autonomy you want
@samnewman
THANKS!
https://samnewman.io/

Rip It Up - The Microservice Organisation