Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in...

35
© 2017 TM Forum | 1 Being a Service Provider in the Age of Microservices John Gillam - Andreas Polz - BearingPoint

Transcript of Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in...

Page 1: Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in the Age of Microservices John Gillam - Andreas Polz - BearingPoint ©ompiled 2017

© 2017 TM Forum | 1

Being a Service Provider

in the Age of

Microservices

John Gillam -

Andreas Polz - BearingPoint

Page 2: Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in the Age of Microservices John Gillam - Andreas Polz - BearingPoint ©ompiled 2017

2©ompiled 2017 BearingPoint

Any organization that designs a system will produce a design

whose structure is a copy of the organization's communication

structure.

Melvyn Conway, 1967

Source: http://haacked.com/archive/2013/05/13/applying-conways-law.aspx/

Page 3: Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in the Age of Microservices John Gillam - Andreas Polz - BearingPoint ©ompiled 2017

3©ompiled 2017 BearingPoint

Most Common Application Architecture: Monolith

Browser / Client

Load Balancer

Tomcat

ui

core

bpm

scheduling

content-repo

Relational

Database

Simple toDevelop

TestDeployOperate

search

api

Page 4: Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in the Age of Microservices John Gillam - Andreas Polz - BearingPoint ©ompiled 2017

4©ompiled 2017 BearingPoint

Simple toDevelop

TestDeployOperate

Most Common Application Architecture: Monolith

Browser / Client

Load Balancer

Tomcat

Relational

Database

ui

core

bpm

scheduling

content-repo

search

api

Large, complex, monolithic applications

Problems

Page 5: Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in the Age of Microservices John Gillam - Andreas Polz - BearingPoint ©ompiled 2017

5©ompiled 2017 BearingPoint

Problems with Monolithic Applications

Intimidates developers

Page 6: Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in the Age of Microservices John Gillam - Andreas Polz - BearingPoint ©ompiled 2017

6©ompiled 2017 BearingPoint

Problems with Monolithic Applications

Intimidates developers

Obstacle to frequent deployments

Need to redeploy everything to change one component

Overloads your IDE, servlet container and CI-Server

Slows down development

No Isolation

Single Applications within an App-Server are not isolated

Obstacle to scaling development

Lots of coordination and communication required

Requires long-term commitment to a technology stack

Page 7: Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in the Age of Microservices John Gillam - Andreas Polz - BearingPoint ©ompiled 2017

7©ompiled 2017 BearingPoint

What are Microservices?

"Microservices are small, autonomous services that work together"

Small and Focused on Doing One Thing Well

• Service Boundaries = Business Boundaries

Autonomous

• Each service exposes an API, collaborating services communicate (only) via those APIs

• Services can change and be deployed independently of each other

Can you make a change to a service and deploy it by itself without changing anything else?

Page 8: Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in the Age of Microservices John Gillam - Andreas Polz - BearingPoint ©ompiled 2017

8©ompiled 2017 BearingPoint

Key Characteristics of Micro-Service Architectures

Suite of "small" services, where each service …

… focusses on one business capability

… communicates with lightweight mechanisms, e.g. REST/HTTP

… offers its own versioned API

… has an independent version lifecycle and can be deployed byfully automated deployment machinery – Continuous Delivery

… runs in its own process

… possibly uses different programming languages and different data storage technologies – "Polyglotism"

Page 9: Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in the Age of Microservices John Gillam - Andreas Polz - BearingPoint ©ompiled 2017

9©ompiled 2017 BearingPoint

Key Characteristics of Micro-Service Architectures

Suite of "small" services, where each service …

… can be independently scaled

… is built for replacement

… is developed by cross-functional DevOps Teams

Amazon: "You build it, you run it"

One "Two-Pizza" Team responsible for 1-n services

ProductInventoryService

Billing ServiceCustomer Service

Order Service

Page 10: Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in the Age of Microservices John Gillam - Andreas Polz - BearingPoint ©ompiled 2017

10©ompiled 2017 BearingPoint

Key Characteristics of Micro-Service Architectures

Suite of "small" services, where each service …

… can be independently scaled

… is built for replacement

… is developed by cross-functional DevOps Teams

Amazon: "You build it, you run it"

One "Two-Pizza" Team responsible for 1-n services

… is designed for failure, resiliency is built in

Microservice architectures are typically operated in the cloud (private or public), typically in a PaaS

Perfect fit for SaaS software

Page 11: Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in the Age of Microservices John Gillam - Andreas Polz - BearingPoint ©ompiled 2017

11©ompiled 2017 BearingPoint

Microservices are tough!

Page 12: Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in the Age of Microservices John Gillam - Andreas Polz - BearingPoint ©ompiled 2017

12©ompiled 2017 BearingPoint

Netflix Architecture

Page 13: Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in the Age of Microservices John Gillam - Andreas Polz - BearingPoint ©ompiled 2017

13©ompiled 2017 BearingPoint

Coupling & Cohesion

Orchestration vs. Choreography

The Shared Database

User Interface Integration

Distributed Computing

Packaging

Asynchronous Programming Model

Resilience

"Outer Architecture"

Etc.

Microservices are tough!

Page 14: Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in the Age of Microservices John Gillam - Andreas Polz - BearingPoint ©ompiled 2017

14©ompiled 2017 BearingPoint

Challenges: Coupling

Loose coupling

• A loosely coupled service knows as little as it needs to about the services with which it collaborates

• A change to one service should not require a change to another (e.g. consumers)

Page 15: Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in the Age of Microservices John Gillam - Andreas Polz - BearingPoint ©ompiled 2017

15©ompiled 2017 BearingPoint

Challenges: Cohesion

High Cohesion

• We want related behavior to sit together, and unrelated behavior to sit elsewhere

• Why? If we want to change behavior, we want to be able to change it in one place and release that change as soon as possible.

Page 16: Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in the Age of Microservices John Gillam - Andreas Polz - BearingPoint ©ompiled 2017

16©ompiled 2017 BearingPoint

Challenges: Orchestration vs. Choreography

Synchronous vs. Asynchronous

• Request/Response vs. Event-based (highly decoupled)

Orchestration vs. Choreography

• More loosely coupled• More flexible• "I strongly prefer aiming for a choreographed

system, where each service is smart enough to understand its role in the whole dance"

Page 17: Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in the Age of Microservices John Gillam - Andreas Polz - BearingPoint ©ompiled 2017

17©ompiled 2017 BearingPoint

Challenges: The Shared Database

Charge Inventory

Billing Ordering Rating

We allow to view and bind to internal implementation details The DB is effectively a very large, shared API that is quite brittle …

Page 18: Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in the Age of Microservices John Gillam - Andreas Polz - BearingPoint ©ompiled 2017

18©ompiled 2017 BearingPoint

Challenges: The Shared Database

Charge Inventor

y

Billing Ordering Rating

We allow to view and bind to internal implementation details The DB is effectively a very large, shared API that is quite brittle …

Page 19: Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in the Age of Microservices John Gillam - Andreas Polz - BearingPoint ©ompiled 2017

19©ompiled 2017 BearingPoint

Possible Solutions: The Shared Database

Call the "owner" Service for data via REST/HTTP

Duplicate data via asynchronous Notifications

Charge Inventory

BillingService

OrderingService

RatingService

ChargeInventory

ServiceREST/HTTP A

PI Eventhub

Service

API

REST/HTTP

ChargeCreatedEvent

/charges/…Command Messaging

ChargeCreatedEvent

Page 20: Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in the Age of Microservices John Gillam - Andreas Polz - BearingPoint ©ompiled 2017

20©ompiled 2017 BearingPoint

Example: Billing Service

Call other services via REST/HTTP to get all the necessary data

Simpler queries inside the individual services

Data aggregation / calculation within scalable microservice

Higher resource allocation but higher performance

BillingService

ChargeInventoryService

REST/HTTP

API

ChargeSpecs

Service

API

RatingServiceA

PI

Charge Inventory

Charge Specs

Rating

Page 21: Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in the Age of Microservices John Gillam - Andreas Polz - BearingPoint ©ompiled 2017

21©ompiled 2017 BearingPoint

Challenges: User Interface Integration

API Composition

Page 22: Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in the Age of Microservices John Gillam - Andreas Polz - BearingPoint ©ompiled 2017

22©ompiled 2017 BearingPoint

Challenges: User Interface Integration

UI Fragment Composition

Page 23: Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in the Age of Microservices John Gillam - Andreas Polz - BearingPoint ©ompiled 2017

23©ompiled 2017 BearingPoint

Challenges: Packaging / DeploymentFrom WAR Files …

FE

BE BE BE

FE

Page 24: Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in the Age of Microservices John Gillam - Andreas Polz - BearingPoint ©ompiled 2017

24©ompiled 2017 BearingPoint

Challenges: Packaging / Deployment… to Micro-Applications

search.jar

bpm.jar

content-repo.jar

scheduling.jar

backend.jar

Spring Boot

api.jar

Embedded Tomcat

ui.jar

Spring Boot Spring Boot

Spring Boot Spring Boot

Spring BootEmbedded Tomcat

Spring Boot

api-gateway.jar

Embedded Tomcat

Spring Boot

batch.jar

Spring Boot

events.jar

Spring Boot

Page 25: Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in the Age of Microservices John Gillam - Andreas Polz - BearingPoint ©ompiled 2017

25©ompiled 2017 BearingPoint

Micro-Application Packaging

Advantages

• Isolation

‒ Isolate applications from each other

‒ JVM isolation: Each application runs in its own JVM

‒ Full isolation (optional): Each application runs in its own container or OS virtual machine

• Monitoring / Logging

‒ Simpler monitoring of each application

‒ Each application has its own log file

‒ Memory footprint statistics per application

• Scaling

‒ Scaling can be done per application

• Flexibility

‒ Embedded app server is transparent, i.e. can be Tomcat, Jetty, etc.

Page 26: Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in the Age of Microservices John Gillam - Andreas Polz - BearingPoint ©ompiled 2017

26©ompiled 2017 BearingPoint

Micro-Application Packaging

Disadvantages

• Higher complexity

‒ More JVMs to manage, configure, monitor

• Different ports per application

‒ However, with V8.0 installation and monitoring comes "out of the box", dashboards, etc. will be in place automatically

• Slightly bigger memory footprint

• Optimal configuration per application needs to be found (which is effort, but helps us afterwards)

• Integration and operations teams must upgrade deployment process, infrastructure, firewall rules, etc.

Page 27: Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in the Age of Microservices John Gillam - Andreas Polz - BearingPoint ©ompiled 2017

27©ompiled 2017 BearingPoint

Challenges: Packaging / Deployment… to Containers

Page 28: Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in the Age of Microservices John Gillam - Andreas Polz - BearingPoint ©ompiled 2017

28©ompiled 2017 BearingPoint

Challenges: Packaging / Deployment… to Container Management

Kubernetes Master

etcd

Controller Manager

Scheduler

API Server

Worker Node

Kubelet

Worker Node

Kubelet

Pod Pod Pod Pod

Docker Docker

Oracle 12c Database

Separate VM, Storage

Elasticsearch 5

Separate VMs, Storage

Page 29: Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in the Age of Microservices John Gillam - Andreas Polz - BearingPoint ©ompiled 2017

29©ompiled 2017 BearingPoint

Challenges: Outer Architecture

"Outer Architecture"= Cross-Cutting Concerns

Service DiscoveryCentral Logging

Metrics & AnalyticsSolid CI/CD practices

Page 30: Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in the Age of Microservices John Gillam - Andreas Polz - BearingPoint ©ompiled 2017

© 2017 TM Forum | 30

Feedback Loop

▪When a company decides to adopt a microservices oriented

paradigm, one of 2 outcomes should be consided.

It will fail. It will revert back to monolithic architectures.

It will succeed, which in turn will slowly change the organisational and

communication structure of the company

Page 31: Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in the Age of Microservices John Gillam - Andreas Polz - BearingPoint ©ompiled 2017

© 2017 TM Forum | 31

Feedback Loop

▪When a company decides to adopt a microservices oriented

paradigm, one of 2 outcomes should be consided.

It will fail. It will revert back to monolithic architectures.

It will succeed, which in turn will slowly change the organisational and

communication structure of the company

▪ If it succeds, that will in turn trigger another change

Requirements for their service providers will be turned a lot more

granular

Page 32: Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in the Age of Microservices John Gillam - Andreas Polz - BearingPoint ©ompiled 2017

32 “The Best Connected Data for Digital Business”

Typical journey

Page 33: Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in the Age of Microservices John Gillam - Andreas Polz - BearingPoint ©ompiled 2017

33 “The Best Connected Data for Digital Business”

Orchestration

Physical Infrastructure

Virtual Infrastructure

ApplicationsService

Provisioning

Monetisation(inc

Chargeback)

The orchestration debate

Page 34: Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in the Age of Microservices John Gillam - Andreas Polz - BearingPoint ©ompiled 2017

34 “The Best Connected Data for Digital Business”

Self Developed / Customised COTS

COTS

Cost to implement

Speed of Delivery / ChangeThe lock in debate

Page 35: Being a Service Provider in the Age of Microservices...2017/05/02  · Being a Service Provider in the Age of Microservices John Gillam - Andreas Polz - BearingPoint ©ompiled 2017

35 “The Best Connected Data for Digital Business”

Top to bottom orchestrated digital stack

Access, Authentication, AuthorizationProduct ManagementCustomer ManagementOrder ManagementBilling Management

Finance ManagementBusiness OperationsService Management

Your services:Bare Metal, Virtual, Storage, Apps, Middleware, Platform (DB, BigData etc.) 3rd Party BT, MSFT, AWS, Google etc.

Ideally – single identity, single access method, common API set etc.

IT Service Management layer

Digital Partner Ecosystem

Users /CustomersDepartments / Channels

Integration LayerPoint to Point integrationDigital Services Reference Architecture (DSRA)iPaaS