xconf coimbatore 2016 - microservices demystified
TRANSCRIPT
SOA ?ESB
(proprietary tools)
Heavy Integration (like WCF, SOAP, JBI)
Hard to test
Technical service boundaries
Business Contract as boundaries
Lightweight transport (like http/json)
What are Microservices?
service-oriented architecture composed of loosely coupled elements that have
bounded contexts- Adrian Cockcroft
Microservices
What are Microservices?
Microservices
Write programs that do one thing and do it well. Write programs to work together
- The Unix Way
What are Microservices?
Characteristics of a Microservice Architecture
> Componentization via Services > Organized around Business Capabilities > Products not Projects > Smart endpoints and dumb pipes > Decentralized Governance > Decentralized Data Management > Infrastructure Automation > Design for failure > Evolutionary Design
http://martinfowler.com/articles/microservices.html
Componentization via Services
http/json
async / messaging
CommunicationService
OrderService
CatalogService
http/json
RecommendationService
Characteristics of a Microservice
Organized around Business Capabilities
Presentation
Business Logic
Data Access / DB
Characteristics of a Microservice
Characteristics of a Microservice
Catalog
Order
Shipping
Bounded Context
Organized around Business Capabilities
Characteristics of a Microservice
Catalog
Order
Shipping
Organized around Business Capabilities
"organizations which design systems ... are constrained to produce designs which are copies of the communication structures of these
organizations" —Melvin Conway
Products, Not Projects
Characteristics of a Microservice
Catalog
Team own end to end From technical choices to deployment
{ "id": "iphone-6s-16gb", "specification": { "...": "..." }, "price": 35000, "currency": "₹", "...": "..."}
Smart endpoints and dump pipes
Characteristics of a Microservice
Catalog
Order
Communication
RESTful(http / json)
/items/iphone-6s-16gb
Infrastructure Automation
Characteristics of a Microservice
> builds > tests - unit, integration, end to end, performance > provisioning > deployment
> from test environment > to production
Design for failure
Characteristics of a Microservice
> Tolerate the failure of services > Timeouts, retries and circuit breaker patterns > Real-time monitoring > Log aggregation
Evolutionary Design
Characteristics of a Microservice
> Build few bigger services first > Then, slowly peel off different services > Based on independent replacement and upgradeability > Make granular releases
Characteristics of a Microservice Architecture
> Componentization via Services > Organized around Business Capabilities > Products not Projects > Smart endpoints and dumb pipes > Decentralized Governance > Decentralized Data Management > Infrastructure Automation > Design for failure > Evolutionary Design
http://martinfowler.com/articles/microservices.html
Readiness for microservices
Are you ready for Microservices?> Operational Complexity due to distribution > Tolerance for Eventual consistency > Automated Testing (Test Pyramid) > Automated Build and Deployment > Rapid Provisioning > Monitoring needs > Remote calls – expensive
Avoid microservices envy
Readiness for microservices http://martinfowler.com/bliki/MicroservicePremium.html
Readiness for microservices
Microservice architectures provide unique benefits at the cost of increased (essential)
complexity.
Want to know more?martinfowler.com/microservices
Building Microservices
Domain-Driven Design
Implementing Domain-Driven Design
Release It!