delivering with microservices - how to iterate towards sophistication
TRANSCRIPT
CROSS CUTTING CONCERNS
public void RefreshAllResults(){ […]
WithConnection( connection => connection.Execute(DbTable + "UpdateAll", CommandType.StoredProcedure));
[…]}
results-service
UpdateAllResults
service-a service-b service-c
FROM THE TRENCHES
AN ALTERNATIVE TO VENDOR-LED SOA
http://www.infoq.com/presentations/webber-guerilla-soa
DEFINE MICROSERVICES
AN ALTERNATIVE TO VENDOR-LED SOA
http://www.infoq.com/presentations/webber-guerilla-soa
DEFINE MICROSERVICES
The Problem
AN ALTERNATIVE TO VENDOR-LED SOA
http://www.infoq.com/presentations/webber-guerilla-soa
DEFINE MICROSERVICES
The Problem
The Solution
AN ALTERNATIVE TO VENDOR-LED SOA
http://www.infoq.com/presentations/webber-guerilla-soa
DEFINE MICROSERVICES
The Problem
The Solution
The Problem
Again
AN ALTERNATIVE TO VENDOR-LED SOA
http://www.infoq.com/presentations/webber-guerilla-soa
DEFINE MICROSERVICES
The Problem
The Solution
Back to The
Future
The Problem
Again
DISTRIBUTED AND WEB ARCHITECTURES
C++
1980s
Java
1990s
ANSI C
TCP Client-Sever RPC
CORBA RMI
DEFINE MICROSERVICES
DISTRIBUTED AND WEB ARCHITECTURES
C++
1980s
Java
1990s
ANSI C
TCP Client-Sever RPC
CORBA RMI
DEFINE MICROSERVICES
2000s 2010s
XML JavaScript
SOAP SOA
JSON REST
HTTP The Internet
SOFTWARE DEVELOPMENT METHODOLOGIES
RUP
XP Continuous Integration
AgileContinuous
Delivery
1980s 1990s 2000s 2010s
DEFINE MICROSERVICES
THE PRODIGAL SON
Service Oriented
Architecture
Continuous Delivery
Microservices
DEFINE MICROSERVICES
XP AgileThe Internet Distributed Systems
INTEREST
0 January 2014
June 2015 100
Google Trends Data
# “microservices” searches
MICROSERVICES RUSH
SCALE
"In order to scale to the next order of magnitude, we're rethinking the fundamentals of our architecture"
Philip Fisher-Ogden, Director of Engineering
"We created the viewing service to encapsulate the domain of viewing data collection, processing, and providing "
"These components would be easier to develop, test, debug, deploy, and operate if they were extracted into their own services."
http://www.techrepublic.com/article/netflix-on-how-to-build-services-that-scale-beyond-millions-of-users/
MICROSERVICES RUSH
BREAK THE MONOLITH
Monolithic Perl —> Monolithic C++ —> Java —> microservices
Monolithic C++ —> Perl / C++ —> Java / Scala -> microservices
Monolithic Rails —> JS / Rails / Scala —> microservices
MICROSERVICES RUSH
BUSINESS VALUE FIRST
https://yow.eventer.com/yow-2011-1004/domain-driven-design-strategies-for-dealing-with-legacy-systems-by-eric-evans-1033
MICROSERVICES RUSH
CONWAY’S LAW
"Any organisation that designs a system […] will inevitably produce a design whose structure is a copy
of the organisation's communication structure."
Melvin Conway, How Do Committees Invent - 1968
MICROSERVICES RUSH
REFLECTIONS
microservices? need big upfront design?
Microservices
strategic value
MICROSERVICES RUSH
REFLECTIONS
microservices? need big upfront design?
Microservices
strategic value break the monolith
MICROSERVICES RUSH
REFLECTIONS
microservices? need big upfront design?
Microservices
strategic value break the monolith scale
MICROSERVICES RUSH
REFLECTIONS
microservices? need big upfront design?
Microservices
strategic value break the monolith scale re-org
MICROSERVICES RUSH
THE PROBLEM
Infrastructure
Features
Infrastructure
Features
WatchlistService Type of work delivered over time
DELIVERING MICROSERVICES
BUSINESS & ARCHITECTURE CONTRACTDELIVERING MICROSERVICES
Strategic Goals
Architectural Principles
Design & Delivery Practices
BUSINESS & ARCHITECTURE CONTRACTDELIVERING MICROSERVICES
Strategic Goals
Architectural Principles
Design & Delivery Practices
minilith
RELEASE 1 - ARCHITECTURE
greenfield
brownfieldmonolith
minilith
minilith
DELIVERING MICROSERVICES
minilith
RELEASE 1 - ARCHITECTURE
greenfield
brownfieldmonolith
minilith
minilithClient
DELIVERING MICROSERVICES
minilith
RELEASE 1 - ARCHITECTURE
greenfield
brownfieldmonolith
minilith
minilithClient
Presentation
DELIVERING MICROSERVICES
minilith
RELEASE 1 - ARCHITECTURE
greenfield
brownfieldmonolith
minilith
minilithClient
Presentation
Biz Services
DELIVERING MICROSERVICES
minilith
RELEASE 1 - ARCHITECTURE
greenfield
brownfieldmonolith
minilith
minilithClient
Presentation
Biz Servicesservices
DELIVERING MICROSERVICES
RELEASE 1 - CONTINUOUS DELIVERY
• CODE
• BUILD
• PLAN
• RELEASE • TO TEST FLIGHT
• CODE
• BUILD
• PLAN
• RELEASE • TO TEST FLIGHT
CODE
PLAN
BUILD
TEST
RELEASE TO PRODUCT OWNER
+ BETA
INSTALL
TRACK USAGE
USER FEEDBACK
Continuous Integration
Usability and Feedback Cycle
DELIVERING MICROSERVICES
RELEASE 1 - CONTRACT TESTING
Functional
Integration
Unit Unit
Contracts
Web Application Web Services
DELIVERING MICROSERVICES
RELEASE 1 - COUPLING GRAPHS WITH D3JS
Requests Flow
http://techblog.netflix.com/2015/02/a-microscope-on-microservices.html
DELIVERING MICROSERVICES
Dependencies
https://www.youtube.com/watch?v=hsoovFbpAoE
RELEASE 1 - COUPLING GRAPHS WITH D3JS
Requests Flow
http://techblog.netflix.com/2015/02/a-microscope-on-microservices.html
DELIVERING MICROSERVICES
RELEASE 1 - TRANSACTIONS LOGGING
service-A service-B
service-CID: ABCD
ID: EFGHcaused by ABCD
DELIVERING MICROSERVICES
RELEASE 1 - TRANSACTIONS LOGGING
service-A service-B
service-CID: ABCD
ID: EFGHcaused by ABCD
ID: IJKLcaused by EFGH
DELIVERING MICROSERVICES
RELEASE 1 - DIFFERENT LEVELS OF MONITORING
Infrastructure
New Relic
RuntimeLog
Logstash & Kibana
DELIVERING MICROSERVICES
RELEASE 1 - BUILD CAPABILITIES
• Continuously Deliver CI, automated builds, tests, and deployments, release management
• Re-think the pyramid of tests Favor contracts testing to UI functional testing
• Control dependencies Modules integration via HTTP, dependency graph, transaction logging
• Release to production Learn about your prod environment, consider containers and/or in-process lightweight web servers, load balancers, caching, etc…
• Monitor & Analyse Have system monitoring and data analytics in place.
DELIVERING MICROSERVICES
RELEASE 2 - ARCHITECTURE
greenfield
brownfieldmonolith
Client
Presentation
services
services
DELIVERING MICROSERVICES
RELEASE 2 - ARCHITECTURE
greenfield
brownfieldmonolith
Client
Presentation
Biz Services
services
services
DELIVERING MICROSERVICES
RELEASE 2 - ARCHITECTURE
greenfield
brownfieldmonolith
Client
Presentation
Biz Servicesservices
services
services
DELIVERING MICROSERVICES
RELEASE 2 - NEW SERVICE USE CASES
new bounded context scale separately
security
DELIVERING MICROSERVICES
RELEASE 2 - NEW SERVICE USE CASES
new bounded context scale separately
securitydata aggregation
DELIVERING MICROSERVICES
RELEASE 2 - ISOLATION DATA
"No direct database access is allowed from outside the service, and there’s no data sharing among the services"
Werner Vogels, CTO and Vice President of amazon.com
DELIVERING MICROSERVICES
RELEASE 2 - ISOLATION INTEGRATION
Orchestration Choreography
http://www.thoughtworks.com/insights/blog/scaling-microservices-event-stream
DELIVERING MICROSERVICES
RELEASE 2 - UNDERSTAND SERVICES
• Know if and when to create a new service new bounded context, aggregation, security, scale independently
• Define (your level of) isolation code, compilation, runtime, persistence, integration
• Reduce barrier to entry repository blueprint, pipeline template, scaffolding script
• Build what you can support develop DevOps culture (e.g. infrastructure as code)
DELIVERING MICROSERVICES
RELEASE N - SCALING FOR LOAD CAP THEOREM
DELIVERING MICROSERVICES
Availability
ConsistencyPartition
Tolerance
DELIVERING MICROSERVICESRELEASE N - SCALING FOR LOAD
ARCHITECTUREConsistent & Available
(No Partition Tolerance)
DELIVERING MICROSERVICESRELEASE N - SCALING FOR LOAD
ARCHITECTUREConsistent & Available
(No Partition Tolerance)Partition Tolerant & Available
(No consistency)
DELIVERING MICROSERVICESRELEASE N - SCALING FOR LOAD
ARCHITECTUREConsistent & Available
(No Partition Tolerance)Partition Tolerant & Available
(No consistency)Partition Tolerant & Available
(Eventual consistency)
read replicas
Writes Reads
PO
BA
QA
DEV
OPS
RELEASE N - SCALING DELIVERY SERVICE TEAMS
DELIVERING MICROSERVICES
service team service A
service B service C
HQ
PO
BA
QA
DEV
OPS
RELEASE N - SCALING DELIVERY SERVICE TEAMS
DELIVERING MICROSERVICES
service team service A
service B service C
HQ
service A service B service C
PO
BA
QA
DEV
OPS
RELEASE N - SCALING DELIVERY SERVICE TEAMS
DELIVERING MICROSERVICES
service team service A
service B service C
HQ
service A service B service C
RELEASE N - SCALING DELIVERY DISTRIBUTED TEAMS
DELIVERING MICROSERVICES
CHENGDU BRISBANE SYDNEY PERTH
RELEASE N - SCALING DELIVERY DISTRIBUTED TEAMS
DELIVERING MICROSERVICES
CHENGDU BRISBANE
mogul-service pizza-image-service
SYDNEY PERTH
RELEASE N - SCALING DELIVERY DISTRIBUTED TEAMS
DELIVERING MICROSERVICES
CHENGDU BRISBANE
mogul-service pizza-image-service
SYDNEY PERTH
media-serviceauth-service dough-service email-service
mogul-private-service moderation-service
pizza-service order-service
leaderboard-service charity-service
microservices? need big upfront design?
Microservices
strategic value break the monolith scale re-org
CONCLUSIONKEY TAKEAWAYS
microservices? need big upfront design?
Microservices
strategic value break the monolith scale re-org
CONCLUSION
• what are microservices
KEY TAKEAWAYS
microservices? need big upfront design?
Microservices
strategic value break the monolith scale re-org
CONCLUSION
• what are microservices• does not require big upfront design
KEY TAKEAWAYS
microservices? need big upfront design?
Microservices
strategic value break the monolith scale re-org
CONCLUSION
• what are microservices• does not require big upfront design• application of agile techniques to distributed systems
KEY TAKEAWAYS
microservices? need big upfront design?
Microservices
strategic value break the monolith scale re-org
CONCLUSION
• what are microservices• does not require big upfront design• application of agile techniques to distributed systems• agree with business why microservices
KEY TAKEAWAYS
microservices? need big upfront design?
Microservices
strategic value break the monolith scale re-org
CONCLUSION
• what are microservices• does not require big upfront design• application of agile techniques to distributed systems• agree with business why microservices• continuous delivery, testing strategy, monitoring
KEY TAKEAWAYS
microservices? need big upfront design?
Microservices
strategic value break the monolith scale re-org
CONCLUSION
• what are microservices• does not require big upfront design• application of agile techniques to distributed systems• agree with business why microservices• continuous delivery, testing strategy, monitoring• start small, grow your own capabilities
KEY TAKEAWAYS
microservices? need big upfront design?
Microservices
strategic value break the monolith scale re-org
CONCLUSION
• what are microservices• does not require big upfront design• application of agile techniques to distributed systems• agree with business why microservices• continuous delivery, testing strategy, monitoring• start small, grow your own capabilities• scale your services and your organisation
KEY TAKEAWAYS
microservices? need big upfront design?
Microservices
strategic value break the monolith scale re-org
CONCLUSION
• what are microservices• does not require big upfront design• application of agile techniques to distributed systems• agree with business why microservices• continuous delivery, testing strategy, monitoring• start small, grow your own capabilities• scale your services and your organisation• choose what works for you
KEY TAKEAWAYS
jeandamore
blog.corsamore.com
jeandamore
jdamore
Jean D’Amore Technology Market Principal
ABOUT ME