xconf coimbatore 2016 - microservices demystified

32
Selvakumar Natesan

Upload: thoughtworks

Post on 15-Jan-2017

258 views

Category:

Technology


1 download

TRANSCRIPT

MicroservicesDemystified

Selvakumar Natesan

What are Microservices?

Typical application

What are Microservices?

What are Microservices?

Monoliths

What are Microservices?

Microservices

* Each element as its own service

What are Microservices?

Microservices

What are Microservices?

Small autonomous services that work together

- Sam Newman

What are Microservices?

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

Characteristics of a Microservice

Catalog

Order

Decentralized Governance

Communication

Characteristics of a Microservice

Catalog

Order

Communication

Decentralized Data Management

Infrastructure Automation

Characteristics of a Microservice

> builds > tests - unit, integration, end to end, performance > provisioning > deployment

> from test environment > to production

Infrastructure Automation

Characteristics of a Microservice

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

Are you ready for Microservices?

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!

Thank you!

Selvakumar Natesan@selvakn

#XConf #Coimbatore

Who are all doing Microservices?