microservices and soa - oracle · reference architecture a reference architecture suitable for soa...

35

Upload: others

Post on 20-May-2020

30 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Microservices and SOA - Oracle · Reference Architecture A reference architecture suitable for SOA 2.0: Microservices, API Management and Integration
Page 2: Microservices and SOA - Oracle · Reference Architecture A reference architecture suitable for SOA 2.0: Microservices, API Management and Integration

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. |

Microservices and SOA CON7364

Luis Weir Oracle Ace Director Principal, Capgemini Robert Wunderlich Sr. Principal Product Manager September 22, 2016

Page 3: Microservices and SOA - Oracle · Reference Architecture A reference architecture suitable for SOA 2.0: Microservices, API Management and Integration

Microservices and SOA Oracle OpenWorld San Francisco | September 18-22, 2016

Luis Weir [email protected]

uk.linkedin.com/in/lweir @luisw19

soa4u.co.uk/

Page 4: Microservices and SOA - Oracle · Reference Architecture A reference architecture suitable for SOA 2.0: Microservices, API Management and Integration

4 Copyright © Capgemini and Sogeti 2016. All Rights Reserved

Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016

Table of Contents

What is a Microservice 1

Microservices vs. SOA 2

Reference Architecture 3

Use Cases 4

Page 5: Microservices and SOA - Oracle · Reference Architecture A reference architecture suitable for SOA 2.0: Microservices, API Management and Integration

Introduction

Page 6: Microservices and SOA - Oracle · Reference Architecture A reference architecture suitable for SOA 2.0: Microservices, API Management and Integration

6 Copyright © Capgemini and Sogeti 2016. All Rights Reserved

Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016

Resume

I am very passionate about technology. I have be the lead authored of two books (Oracle SOA Governance 11g Implementation and Oracle API Management 12c

Implementation), I am a regular blogger and speaker in major conferences and events. A well-known industry expert especially when it comes to Oracle middleware

technologies I am also an OTN certified SOA black belt.

Luis Weir

Oracle Ace Director – Cloud Principal at Capgemini UK

I am an Oracle Ace Director, Cloud Principal and a Thought Leader specialised in Oracle Fusion Middleware & Oracle PaaS. With more than 15

years of experience implementing IT solutions across the globe, I have been exposed to a wide wide variety of business problems many of which

I’ve helped solved by adopting SOA architectural styles such as traditional SOA, API management and now Microservices. My current focus is in

assisting organisations define and implement solutions and strategies that can help them realise the benefits that such technologies have to offer.

2nd Place

1st OTN Cloud

Hackathon

June, 2016

Cloud

Contribution Award

SOA Community

March, 2016

Latest Media: Oracle Magazine May/June 2016

(http://bit.ly/1RTCAU3)

Systematic Approach for Migrating to Oracle Cloud

SaaS (http://bit.ly/1Xr6acs)

Oracle Magazine Jan/Feb 2016 (http://ora.cl/Vhh)

API Management Implementation

(http://ora.cl/Gcw)

A Word About Microservices and SOA

(http://bit.ly/25Dk5go)

Page 7: Microservices and SOA - Oracle · Reference Architecture A reference architecture suitable for SOA 2.0: Microservices, API Management and Integration

What is a Microservice The three aspects of Microservices according to me!!

Page 8: Microservices and SOA - Oracle · Reference Architecture A reference architecture suitable for SOA 2.0: Microservices, API Management and Integration

8 Copyright © Capgemini and Sogeti 2016. All Rights Reserved

Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016

What is a Microservice?

Functional decomposition of systems

into manageable and independently

deployable components,

Microservice Architectures by Dr. Andreas Schroeder

(http://bit.ly/1TOGZK8)

“Loosely coupled service oriented architecture with bounded context”,

– Adrian Cockcroft, April 2015

Page 9: Microservices and SOA - Oracle · Reference Architecture A reference architecture suitable for SOA 2.0: Microservices, API Management and Integration

9 Copyright © Capgemini and Sogeti 2016. All Rights Reserved

Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016

The three aspects of Microservices Architecture (according to me!)

Organizational Technical

Architectural

Page 10: Microservices and SOA - Oracle · Reference Architecture A reference architecture suitable for SOA 2.0: Microservices, API Management and Integration

10 Copyright © Capgemini and Sogeti 2016. All Rights Reserved

Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016

Technical

Deployed independently Run on its own process

Scales independently Isolates faults

Is stateless Owns its data

Microservice

Page 11: Microservices and SOA - Oracle · Reference Architecture A reference architecture suitable for SOA 2.0: Microservices, API Management and Integration

11 Copyright © Capgemini and Sogeti 2016. All Rights Reserved

Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016

Architectural

Microservice

Single responsibility Bounded context

Choreographed API gateways

Polyglot Smart endpoint and

dump pipe

Page 12: Microservices and SOA - Oracle · Reference Architecture A reference architecture suitable for SOA 2.0: Microservices, API Management and Integration

12 Copyright © Capgemini and Sogeti 2016. All Rights Reserved

Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016

You build it you run it

Organisational

Microservice

Small teams Teams organized around

business capabilities

Products not projects

Culture of automation Decentralised governance

Page 13: Microservices and SOA - Oracle · Reference Architecture A reference architecture suitable for SOA 2.0: Microservices, API Management and Integration

Microservice vs. SOA Key differences and communalities

Page 14: Microservices and SOA - Oracle · Reference Architecture A reference architecture suitable for SOA 2.0: Microservices, API Management and Integration

14 Copyright © Capgemini and Sogeti 2016. All Rights Reserved

Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016

Inspiration from Martin Fowler’s Microservices presentation at

GOTO conference, Berlin November 2014 (minute 14)

https://www.youtube.com/watch?v=wgdBVIX9ifA

Microservices vs SOA

“The value of the term microservices is that

it allows to put a label on a useful subset of

the SOA terminology”,

Martin Fowler (minute 14), GOTO conference,

Berlin November 2014

SOA Typically adopted to

deliver horizontal

integrations

Traditional

SOA

(i.e. AIA)

Best for vertical

integrations

Not for

integration.

Best for building

modern systems

API

Management

Microservices

Architecture

Wrong comparison… The difference lies in the realisation style to implement SOA

Page 15: Microservices and SOA - Oracle · Reference Architecture A reference architecture suitable for SOA 2.0: Microservices, API Management and Integration

15 Copyright © Capgemini and Sogeti 2016. All Rights Reserved

Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016

Microservices vs SOA – Technical Stack

Modern Monolith

Any Hardware

Hardware Resources

Host OS

Hypervisor (type 1 or 2)

Guest OS (VMs)

Bin/Libs (MREs, Interpreters, etc)

Application Server

Application (ie. ESB)

Services

Container Engine

Relational Database

Legacy Monolith

Mainframe

(ie IBM System Z, S/360)

Storage

(ie. DB2, IMS/DB)

Hypervisor (ie. PR/SM –Type 1)

Hardware Resources

(ie. DADB, IDMS,IEDN)

Operating System

(ie. z/OS, z/VSE)

Batch Services

(ie JCL,JES,3rd p.)

Application Services (ie. CICS)

Microservice Architecture

Any Hardware

Hardware Resources

Host OS

Guest OS (VMs)

Scala

Java

Ruby

Node

Jolie

Services

Container Engine

Bin/Libs

Bin/Libs Bin/Libs Bin/Libs

Container Engine

Bin/Libs Hypervisor (type 1 or 2)

Mongo

Cassandra

Oracle HBase

Neo4j

Page 16: Microservices and SOA - Oracle · Reference Architecture A reference architecture suitable for SOA 2.0: Microservices, API Management and Integration

16 Copyright © Capgemini and Sogeti 2016. All Rights Reserved

Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016

Architectural

Pattern Traditional SOA MSA

Monolith pattern (http://bit.ly/1Gjr2Y0) Yes No

Polyglot Programming & Persistence

(http://bit.ly/18BvDIj & http://bit.ly/1XYiak2)

Not traditionally (use of Suites) Yes

API gateway pattern (http://bit.ly/1WTyNLJ) Yes Yes

Orchestration (http://bit.ly/1U0SWil) Yes No

Choreography (http://bit.ly/1ssALZQ) No Yes

Event Collaboration (http://bit.ly/25Dk7oE) Yes Yes

Canonical Schema (http://bit.ly/1r6KkfK) Very common No

Schema centralization (http://bit.ly/1sVlqkc) Very common No

Decouple Contract (http://bit.ly/1O8mVpm) Yes Could be….

Bounded Context (http://bit.ly/1o7AK8B) Some times Yes

Ubiquitous Language (http://bit.ly/1c8nXQe) Some times Yes

Bulkhead (http://bit.ly/1c8nXQe) Not really… Yes

Tolerant Reader (http://bit.ly/1aa4mr9) Some times Yes

Client-side Service Discovery

(http://bit.ly/1OunUyq)

Initially only (service registry) Recommended

Server-side Service Discovery

(http://bit.ly/1X3RmzA)

Yes Yes

ESB Pattern (http://bit.ly/1ZlSKeT) Yes Across bounded contexts (dump pipe)

Page 17: Microservices and SOA - Oracle · Reference Architecture A reference architecture suitable for SOA 2.0: Microservices, API Management and Integration

17 Copyright © Capgemini and Sogeti 2016. All Rights Reserved

Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016

Choreography vs Orchestration – Which one is which?

Page 18: Microservices and SOA - Oracle · Reference Architecture A reference architecture suitable for SOA 2.0: Microservices, API Management and Integration

18 Copyright © Capgemini and Sogeti 2016. All Rights Reserved

Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016

Bounded Context

“Gather together those things that change for the same reason, and separate those things that change

for different reasons” – The single responsibility principle by Robert C. Martin, November 2009, http://bit.ly/1VDgw79

“Domain driven design (DDD) divides up a large system into Bounded Contexts, each of which can have a unified model –

essentially a way of structuring Multiple Canonical Models.”

Opportunity

Pipeline Territory

Customer

Product

Customer

Product

Ticket

Defect

Product

Version

Sales

Person

Sales Context Support Context

Use Bounded Context

to Separate Concerns

Bounded context by Martin Follower, January 2014

http://martinfowler.com/bliki/BoundedContext.html

Page 19: Microservices and SOA - Oracle · Reference Architecture A reference architecture suitable for SOA 2.0: Microservices, API Management and Integration

19 Copyright © Capgemini and Sogeti 2016. All Rights Reserved

Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016

How to eat the Elephant?

One piece a the time! Understand the

problem. Slice and dice

your elephant by

defining boundaries in

the business

capabilities. Modernise

one piece at the time.

Starting small

Rep

len

ish

men

t

Ord

ers

Sales

Orders

Logistic

s

Tracking

Page 20: Microservices and SOA - Oracle · Reference Architecture A reference architecture suitable for SOA 2.0: Microservices, API Management and Integration

20 Copyright © Capgemini and Sogeti 2016. All Rights Reserved

Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016

Recommend

Domain Driven Design & Microservices

by Eric Evans

https://www.youtube.com/watch?v=yPvef9R3k-M

Goto Berlin, Nov 2014

Principles of Microservices

By Sam Newman

https://www.youtube.com/watch?v=PFQnNFe27kU

Devoxx Belgium, Nov 2015

Page 21: Microservices and SOA - Oracle · Reference Architecture A reference architecture suitable for SOA 2.0: Microservices, API Management and Integration

21 Copyright © Capgemini and Sogeti 2016. All Rights Reserved

Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016

MSA Operations Model Traditional Operations Model

Organisational

Development and support teams organized by technologies

resulting in siloes(Conway’s law in action)

SO

A

Su

pp

ort

Te

am

DB

Su

pp

ort

Te

am

UI

Su

pp

ort

tea

m UI

Dev Team

Database

Dev Teams

SOA

Dev Team

Pro

ject T

ea

ms

Coms

Gaps

Multi-disciplinary [small] teams organized by business

capability resulting in modular systems

Customer UI

DB MW

Orders UI

DB MW

Items UI

DB MW

Shipment UI

DB MW

DevOps / Continuous Delivery

Customer

Microservice

Orders

Microservice

Items

Microservice

Shipment

Microservice

Page 22: Microservices and SOA - Oracle · Reference Architecture A reference architecture suitable for SOA 2.0: Microservices, API Management and Integration

22 Copyright © Capgemini and Sogeti 2016. All Rights Reserved

Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016

Recommend

Modeling Microservices at Spotify with

Petter Mahlen

http://tinyurl.com/msaspotify

At a microservices talk in March in Sweden,

Petter Mahlen, Backend Infrastructure Engineer

at Spotify, spoke to a packed house at Jfokus

about microservices.

Page 23: Microservices and SOA - Oracle · Reference Architecture A reference architecture suitable for SOA 2.0: Microservices, API Management and Integration

Reference Architecture A reference architecture suitable for SOA 2.0:

Microservices, API Management and Integration

Page 24: Microservices and SOA - Oracle · Reference Architecture A reference architecture suitable for SOA 2.0: Microservices, API Management and Integration

24 Copyright © Capgemini and Sogeti 2016. All Rights Reserved

Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016

SOA 2.0 Reference Architecture

SYSTEMS OF ENGAGEMENT

SaaS

API Applications

CX HCM ERP EPM Legacy, etc

Business APIs

Single Purpose APIs

Special Purpose APIs Presentation APIs Partner [B2B] APIs Public [Consumer] APIs

Microservices

SYSTEMS OF RECORDS SYSTEMS OF INNOVATION

SY

ST

EM

S O

F

DIF

FE

RE

NT

IAT

ION

$

API

Message Pipe

Page 25: Microservices and SOA - Oracle · Reference Architecture A reference architecture suitable for SOA 2.0: Microservices, API Management and Integration

25 Copyright © Capgemini and Sogeti 2016. All Rights Reserved

Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016

SOA 2.0 Capability Model

Message Pipe

Microservices

API Applications

Single Purpose APIs

Business APIs

AuthN/AuthZ/API Key Validation Policy Enforcement HTTP Routing Calls Aggregation Light Transformation

Light Scripting In-memory Cache Rate Limiting/Throttling Streaming REST/SOAP Conversions

System AuthN/AuthZ Connectivity Adapters Connection & Session

Management

Data Transformation Complex Orchestrations &

Logic

Protocol/Transport

Conversions

Federated AuthN/AuthZ API Key Validation Call Aggregation Tailored Contracts Thread Protection

Thread Protection Client Backend Logic Scripting Platform/Backend APIs Push Nots/Websockets Polyglot Consumer SDKs

Polyglot Programming Polyglot Persistency Single Responsibility

Choreography Stack Independence Auto Scaling

Message routing Light transformation Reliable Messaging Push Listener Queuing/De-queuing

Page 26: Microservices and SOA - Oracle · Reference Architecture A reference architecture suitable for SOA 2.0: Microservices, API Management and Integration

26 Copyright © Capgemini and Sogeti 2016. All Rights Reserved

Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016

API Applications

SOA 2.0 In the Oracle Cloud PaaS

Microservices

Message Pipe

Single Purpose APIs

Business APIs

Java Cloud SOA Cloud App Container & Container

Cloud

Java Cloud App Container Cloud Mobile Cloud

API Platform Cloud

API Platform Cloud

Integration Cloud Messaging Cloud

DB and NoSQL Clouds

Page 27: Microservices and SOA - Oracle · Reference Architecture A reference architecture suitable for SOA 2.0: Microservices, API Management and Integration

Use Case Modern application based no Microservice Architecture with

integration to on-premises legacy systems for synchronization

Page 28: Microservices and SOA - Oracle · Reference Architecture A reference architecture suitable for SOA 2.0: Microservices, API Management and Integration

28 Copyright © Capgemini and Sogeti 2016. All Rights Reserved

Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016

Conceptual Solution Architecture

Order & Fulfillment

Domain

Customer Relations

Domain ERP

Domain

(P2C, R2C,

HR, GL,

Billing, etc.)

API Gateway(s)

Microservice

Architecture

Microservice

Architecture

Message Pipe

Mobile Apps

Adapter

Adapter

Contact Customer

Shipment

Order Product

Web Apps Applications

Async

Communication

Sync

Communication Managed API Microservice Monolith Service Choreography Bounded Context

Page 29: Microservices and SOA - Oracle · Reference Architecture A reference architecture suitable for SOA 2.0: Microservices, API Management and Integration

29 Copyright © Capgemini and Sogeti 2016. All Rights Reserved

Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016

Connectivity Agent

Modern Application in Oracle PaaS

Frontend Application

Application Container

Cloud PaaS

API Gateway

API Platform

Business API

Validate

API-Key

Limits &

throttle User Authn Route Respond

Integration Flows`

Integration Cloud

Dequeue Connect Transform

Customer

Data Hub

PLSQL

DB Adapter

On-premises

Microservice

Container Cloud

Node.JS Container

Main Node

Application

Connectivity

Modules

Microservice Storage

NoSQL Cloud

JSON

Objects

https://xxx

1

HTML5/JS

2

[PUT] {json}

9

Integration Flows

Messaging Cloud

REST API Queue

3

4

7

{json}

http 200

{json ack}

{json ack}

{json}

{json}

{json}

http 200

5

6

10

11

12 sqlnet

https

Registers agent

Opens connection

https

8

1) User access URL and renders page

2) User performs action in client side (i.e.. Update

personal details) which triggers an API [PUT] request

3) A customer business API resource is invoked i.e.. [PUT]/

customers/{person id}. The person update details are passed in

the HTTP body as a JSON. API key and user token are also passed

4) Request is validated (key, user token), policies applied and if successful

request PUT request is routed to the relevant customer microservice endpoint

5, 6, 7) The microservice (implemented in Node.JS) executes the business logic which results in

updating the customer personal details JSON object in the NoSQL database and also triggering an

update event by calling the messaging cloud API. A HTTP 200 response is send back if all goes OK

8, 9) A HTTP 200 response is send back with a small JSON object in the body with an acknowledgment

(i.e. { status: “no errors” }

10, 11, 12) Once ICS detects a new message in the topic, it deques the message, transforms it and via the

connectivity agent, calls the relevant PLSQL API to update the customer record

Frontend APIs Node Main App

Express Modules Oracle JET Modules

Page 30: Microservices and SOA - Oracle · Reference Architecture A reference architecture suitable for SOA 2.0: Microservices, API Management and Integration

30 Copyright © Capgemini and Sogeti 2016. All Rights Reserved

Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016

Conclusion Why adopt Microservices?

Page 31: Microservices and SOA - Oracle · Reference Architecture A reference architecture suitable for SOA 2.0: Microservices, API Management and Integration

31 Copyright © Capgemini and Sogeti 2016. All Rights Reserved

Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016

Conclusion - Why adopt Microservices Architecture (I)

Modularity

Eat the elephant one piece at the time. Phased implementation approach. Starting

small. Small teams owning full lifecycle of their piece (a business capability) [23]

Segmented complexity

Separate a big problem into smaller problems handled by small teams ensures mental

models are retained avoiding a “legacy in the making” [5]

Ease of deployment/speed

Moving away from entire system deployment (i.e. “one line change to a million-line-

long monolithic”). Deploy services independently and fast (i.e. with containers) and

introduce automation (continuous delivery) [23]

Page 32: Microservices and SOA - Oracle · Reference Architecture A reference architecture suitable for SOA 2.0: Microservices, API Management and Integration

32 Copyright © Capgemini and Sogeti 2016. All Rights Reserved

Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016

Conclusion - Why adopt Microservices Architecture (II)

Scalability & resilience

Scale independently and possibly on-demand. Bulkheads to isolate problems and

avoid whole system failures (avoiding the cascade effect), Then purposely test

resilience [23]

Breaking organizational silos

Organize small teams based on business capabilities in order to avoid organizational

silos being reflected in the way systems are built (Conway's law [32])

Enabling cloud transition

Building container-based modular applications whilst adhering to basic principles (like

12 factor [30], Lehman’s law [31], and the reactive manifesto [33]) cloud adoption is a

real option

Page 33: Microservices and SOA - Oracle · Reference Architecture A reference architecture suitable for SOA 2.0: Microservices, API Management and Integration

The information contained in this presentation is proprietary.

Copyright © 2016 Capgemini and Sogeti. All rights reserved.

Rightshore® is a trademark belonging to Capgemini.

www.capgemini.com

www.sogeti.com

About Capgemini and Sogeti

With more than 180,000 people in over 40 countries, Capgemini is a global leader in

consulting, technology and outsourcing services. The Group reported 2015 global

revenues of EUR 11.9 billion. Together with its clients, Capgemini creates and delivers

business, technology and digital solutions that fit their needs, enabling them to achieve

innovation and competitiveness. A deeply multicultural organization, Capgemini has

developed its own way of working, the Collaborative Business Experience™, and

draws on Rightshore®, its worldwide delivery model.

Learn more about us at www.capgemini.com.

Sogeti is a leading provider of technology and software testing,

specializing in Application, Infrastructure and Engineering Services.

Sogeti offers cutting-edge solutions around Testing, Business

Intelligence & Analytics, Mobile, Cloud and Cyber Security. Sogeti

brings together more than 23,000 professionals in 15 countries and has

a strong local presence in over 100 locations in Europe, USA and India.

Sogeti is a wholly-owned subsidiary of Cap Gemini S.A., listed on the

Paris Stock Exchange.

Page 34: Microservices and SOA - Oracle · Reference Architecture A reference architecture suitable for SOA 2.0: Microservices, API Management and Integration

Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Confidential – Oracle Internal/Restricted/Highly Restricted 34

Page 35: Microservices and SOA - Oracle · Reference Architecture A reference architecture suitable for SOA 2.0: Microservices, API Management and Integration