merging microservices architecture with soa practices

33
VP Platform Evangelism Chris Haddad microservices architecture with SOA practices 15 September 2014

Upload: chris-haddad

Post on 21-Apr-2017

2.075 views

Category:

Internet


0 download

TRANSCRIPT

Page 1: Merging microservices architecture with SOA practices

VP Platform EvangelismChris Haddad

Merging microservices architecture

with SOA practices

15 September 2014

Page 2: Merging microservices architecture with SOA practices

2

About the Presenter•Chris Haddad๏ VP Platform Evangelism

๏ F500/G2000 Advisor

๏ Cloudy DevOps for Dev guy

๏ API Strategy and SOA Roadmap consultant

๏ Former Gartner research team leader

Architect๏ SaaS and PaaS

๏ Service portfolio and infrastructure

๏ Data management

๏ Java, .NET, JavaScript, Open Source

Learn more about me• Follow me @cobiacomm on Twitter

• Blog: http://blog.cobia.net/cobiacomm• Decks: http://www.slideshare.net/cobiacomm/

• Profle: http://www.linkedin.com/in/cobiacomm/ • On Google+ too

Page 3: Merging microservices architecture with SOA practices

Agenda•Service Success and Service Angst

• Are microservices the answer?

•Microservice Mindset

• How to properly define, decouple, and size a microservice.

• What DevOps practices overcome microservice deployment roadblocks

• When microservices create fragile instead of antifragile building blocks

3

Page 4: Merging microservices architecture with SOA practices

Service Success – Extend Legacy Reach

4

Page 5: Merging microservices architecture with SOA practices

Service Success – Extend Business Reach

Page 6: Merging microservices architecture with SOA practices

Service Success – Useful Service Blocks

6

Page 7: Merging microservices architecture with SOA practices

Service Success – Agility at Scale

๏ How do you measure agility?

๏ Have services increased your agility?

๏ Does IT service agility exist?

http://blog.cobia.net/cobiacomm/2013/03/19/accelerating-business-agility-with-app-factory-devops-paas/

Page 8: Merging microservices architecture with SOA practices

Common Service Angst

Page 9: Merging microservices architecture with SOA practices

Do SOA Anti-Patterns Prevail?Symptoms

๏Isolation, Uniqueness, Duplication

๏Tight Coupling and Build Again

Cause

๏Lack of Trust - Not Invented Here [NIH]

๏Shared Service Invisibility

๏ Teams do not know about a service

๏ Non-functional and functional requirements are not well documented

9

Page 10: Merging microservices architecture with SOA practices

Tired of Big SOA?๏ Set up a cross-functional SOA Working Group

๏ Develop a SOA Adoption Plan

๏ Define Target Service Portfolio

๏ Develop a Business Case

๏ Plan and Fund Development of SOA Infrastructure

๏ Establish New Roles

๏ Plan Training and Mentoring for Staff

๏ Develop Corporate Policies, Guidelines, and Best Practices

๏ Institute SOA Governance Processes

๏ Establish New Incentives that Reward Good Behavior

๏ Identify Candidate Projects

๏ Establish Priorities

๏ Reassess Your Software Development LifeCycle (SDLC)10

Page 11: Merging microservices architecture with SOA practices

Can we MicroSize SOA?

11

Page 12: Merging microservices architecture with SOA practices

Be Like Mike! – aka NetFlix

12

Page 13: Merging microservices architecture with SOA practices

Microservices to the RescueMicroservices Defined

๏A small problem domain

๏Built and deployed by itself

๏Runs in its own process

๏Integrates via well-known interfaces

๏Owns its own data storage

13Source: http://www.brunton-spall.co.uk/post/2014/05/21/what-is-a-microservice-and-why-does-it-matter/

Page 14: Merging microservices architecture with SOA practices

Microservices to the Rescue

“designing software applications as suites of independently deployable services.”

Common Characteristics

๏organization around business capability

๏automated deployment

๏intelligence in the endpoints

๏decentralized control of languages and data

Source: Martin Fowler http://martinfowler.com/articles/microservices.html

14

Page 15: Merging microservices architecture with SOA practices

Microservices Scope๏ Coarse Grained, Atomic, Business Capability

๏ Example

๏ Customer Profile

๏ Product Catalogue

๏ Shopping Cart

๏ Account Activity

๏ Ratings

๏ Recommendations / Reviews

15

Page 16: Merging microservices architecture with SOA practices

SOA == Microservices๏ Services expose a business capability

๏ Factor applications into composable services

๏ Re-use service building blocks

๏ DRY (Don’t Repeat Yourself)

๏ Shared service delivery

๏ “Microservices is SOA, for those who know what SOA is” Source: Steve Jones

16

Page 17: Merging microservices architecture with SOA practices

SOA != MicroservicesSOA

๏Services Deployed in a Shared Bus

๏One Team Goal

๏Centralize Mediation

๏Not prescriptive on the back-end implementation pattern

17

Micro-services

๏Services Deployed at the Edge

๏Teams aligned with Business Units

๏Dumb Infrastructure

๏Prescribes back-end implementation pattern

“SOA is a lame enterprise approach, whereas microservices are a cool hacker approach.” Source: Ycombinator

Page 18: Merging microservices architecture with SOA practices

Microservice Roadblocks๏ How big is a micro-service? (UX-first approach, data

domain approach)

๏ How decoupled is a micro-service? (Dependencies, versioning, routing, linking data)

๏ How to micro-size a business capability (granularity, user experience composition)

๏ How to take a RESTful approach towards managing micro-service dependencies (DNS, /etcd, load balancing)

18

Page 19: Merging microservices architecture with SOA practices

Microservice Myths and Legends

๏ The NetFlix Legend – QoS and rapid delivery

๏ Micro-services Foster Rapid Evolution

๏ Agility, Creative Experimentation, and Dynamic Composition

๏ Silos are good (if Micro-serviced)

๏ Containerization Panacea

๏ Lifecycle Complexity is Overblown

๏ Micro-services don’t require SOA principles to succeed

19

Page 20: Merging microservices architecture with SOA practices

Agenda•How to properly define, decouple, and size a microservice.

•What DevOps practices overcome microservice deployment roadblocks

•When microservices create fragile instead of antifragile building blocks

20

Page 21: Merging microservices architecture with SOA practices

DevOps PracticesMicroservices Pre-requisites

๏ Business Domain Responsibility Decomposition

๏ User Interface Integration

๏ Communication Protocols

๏ Data Formats

๏ Redundant Data

๏ Business Intelligence Interfaces

๏ Root Cause Analysis (Logging, Monitoring)

๏ High Availability and Fault Tolerance

๏ Dynamic Service Management

Adapted From: Stefan Tilkov http://www.infoq.com/presentations/Breaking-the-Monolith

21

Page 22: Merging microservices architecture with SOA practices

DevOpS PatternsLoosely couple

๏ Bounded Context

๏ Tolerant Reader

๏ Consumer driven Contracts

๏ Ubiquitous Language

22

Source: Martin Folwer http://martinfowler.com/articles/microservices.html#MicroservicesAndSoa

Page 23: Merging microservices architecture with SOA practices

DevOpS PatternsLoosely couple

๏ Bounded Context

๏ Tolerant Reader

๏ Consumer driven Contracts

๏ Ubiquitous Language

๏ Silos per business capability

๏ Separate database per product

23

Source: Martin Folwer http://martinfowler.com/articles/microservices.html#MicroservicesAndSoa

Page 24: Merging microservices architecture with SOA practices

Agenda•How to properly define, decouple, and size a microservice.

•What DevOps practices overcome microservice deployment roadblocks

•When microservices create fragile instead of antifragile building blocks

24

Page 25: Merging microservices architecture with SOA practices

Fragility and Anti-Fragility“Anti-fragility does not merely withstand a shock but actually improves because of it.”

๏Redundancy

๏ Clustering, Service Farms

๏Failover

๏ Watchdog monitors , Circuit breakers

25

Page 26: Merging microservices architecture with SOA practices

Fragility and Anti-Fragility“Anti-fragility does not merely withstand a shock but actually improves because of it.”

Achieve High Availability in Distributed Systems through:

๏Redundancy

๏Failover

Traditional Service way

๏ Dedicated active-active, active-passive instances

Micro-services way

๏ Dynamic instance provisioning, graceful degradation26

Page 27: Merging microservices architecture with SOA practices

Fragility and Anti-Fragility๏ Redundancy Strategies

๏ Clustering – maintain session state

๏ Service Farms – identical active nodes

๏ Infrastructure

๏ Load Balancers – route to available nodes

๏ Elastic service provisioning – spin up/down based on load and availability

27

Page 28: Merging microservices architecture with SOA practices

Fragility and Anti-Fragility๏ Failover Strategies

๏ Load Balancers – route to available nodes

๏ Watchdog Health Monitors - identify break points

๏ Circuit breakers [https://github.com/Netflix/Hystrix ]

๏ Infrastructure

๏ Intelligent Content Routing

๏ Topics / Queues

๏ Management Scripts – restart service instances

๏ PaaS Service Management

28

Page 29: Merging microservices architecture with SOA practices

Start Small๏ Implement SOA principles on a project-by-project basis

๏ Identify relationship between services and business capabilities

๏ Build a top-down and bottoms-up data model

๏ Work with your Enterprise Architecture Team

29

Page 30: Merging microservices architecture with SOA practices

SOA & Microservices Reconciliation๏ When to create services

๏ Create a service when sharing a business capability

๏ When to create APIs

๏ Sharing a service outside a domain of control

๏ Targeting the widest possible reach and consumption

๏ Offering the service across native web infrastructure

๏ Maximizing asymmetric evolution between service clients, interface, and implementation.

๏ When to create and use microservices

๏ Building an application crossing domains

๏ Rationalizing and consolidating your SOA portfolio

30

Page 31: Merging microservices architecture with SOA practices

31

Accelerate Your IT Business Strategy with WSO2 Services