Director-Integration Architecture,
WSO2
Kasun Indrasiri
Adaptive and Iterative Integration for
Microservices and Cloud Native
Architectures
● Integration and digital transformation
● Role of integration in cloud native architectures
● Microservice integration patterns
● Realizing cloud native and microservices architecture with
WSO2 Integration Platform
Overview
Digital
Transformation and
Integration
Integration is possibly the most
important aspect of
digital transformation
What is
Cloud Native?
Methodology of building and
running applications that fully
exploits the power of cloud
computing
Cloud Native
Applications
● Cloud native apps are composed
of microservices or serverless
functions
● Packaged in containers
● Runs on a Continuous Delivery
model
● Adaptive governance
Rise of Cloud Native
Applications
Integrating
Microservices and
Cloud Native Apps
Integration is essential to build
any real world use case with
cloud native apps
From ESB to Smart
Endpoints and
Dumb Pipes
Microservices architecture
fosters the elimination of a
central ESB and creates
smart endpoints connected
via dumb pipes
Virtual
Service 1
● Centralized ESB layer provides the integration and network
communication and governance capabilities
ESB as the Central Integration Bus
Service A
Virtual
Service 2
Virtual
Service 3
Service B Service C Service D
ESB
Consumers
● Microservices code has to take care of all network
communication and governance of services
Smart Endpoints and Dumb Pipes
Microservice
X
Microservice
P
Microservice
Y
Microservice
z
Microservice
Q
Microservice
R
Microservice
S
Java
Consumers
Node.js Go
Source : https://medium.com/netflix-techblog/
Engineering-trade-offs-and-the-netflix-api-re-
architecture-64f122b277dd
Integrating Microservices - Anti-Patterns
● API gateway with business
logic
○ E.g. Previous architecture of
Netflix API Gateway
● Integrate microservice with a
central ESB
How to Integrate
Microservices
Active Composition/Orchestration Pattern
Synchronous/request-response communication
Consumer 1
API Service P API Service Q API Service R API Service S
Consumers
Consumer 2 Consumer 3
Ό Service A
Proprietary &
Legacy
Systems
Web API /
SaaS
API Services/
Edge Services
Composite Service/
Integration Services
Core Services/
Atomic Services
Ό Service I
Ό Service H
Ό Service J
Ό Service E
Ό Service C
Ό Service D
Ό Service G
Ό Service B
Ό Service F
Reactive Composition/Choreography Pattern
Ό Service A Ό Service B Ό Service C
Event Bus
Application
Asynchronous event-driven communication
Produce Consume
Produce Consume
Produce Consume
Produce Consume
Active
or
Reactive?
● Active Composition
○ Ideal for interactive services
○ Service are NOT autonomous
● Reactive Composition
○ Ideal for asynchronous
interactions
○ Composition logic is opaque
Hybrid of Active and Reactive Composition
Consumer 1
API Service P API Service Q API Service R API Service S
Consumers
Consumer 2 Consumer 3
Ό Service A
Event Bus
Proprietary &
Legacy
Systems
Web API /
SaaS
API Services/
Edge Services
Composite Service/
Integration Services
Core Services/
Atomic Services
Ό Service I
Ό Service H
Ό Service J
Ό Service E
Ό Service C
Ό Service D
Ό Service G
Ό Service B
No ‘Green Field’
Enterprises!
Isolate the legacy and modern systems by placing an anti-
corruption layer between them
Anti-Corruption Layer Pattern
Data
Store
Data
Store
Data
Store
Data
Store
Microservice
Data
Store
Subsystem B
Anti-
Corruption
LayerMicroservice
Microservice
Subsystem A
● Incrementally replace specific pieces of functionality with new
applications and services
● Create a façade that intercepts requests going to the backend
legacy system
Strangler Pattern
Legacy
Modern
Strangler Façade
Early Migration
Modern
Legacy
Strangler Façade
Later Migration
Modern
Migration Complete
Building Microservices Integration with WSO2
Consumer 1
API Service P API Service Q API Service R API Service S
Consumers
Consumer 2 Consumer 3
Ό Service A
Ό Service B
Ό Service F
Event Bus
Proprietary &
Legacy
Systems
Web API /
SaaS
API Services/
Edge Services
Composite Service/
Integration Services
Core Services/
Atomic Services
Ό Service I
Ό Service H
Ό Service J
Ό Service E
Ό Service C
Ό Service D
MicroESB
Service Mesh
● Microservices code has to take care of all network
communication and governance of services
● Hence such capabilities can be offloaded to a separate layer
Microservice A
Network Stack
Service Mesh
Sidecar
Microservice B
Network Stack
Service Mesh
Sidecar
Control Plane
HTTP1.x.HTTP2.gRPC,TCP
Application Network
Functions
Business
Logic
Primitive
Network
Functions Data Plane
Service Mesh - Guidelines
● Service Mesh is only meant for commodity features
○ Interservice communication resiliency
○ Governance of services: observability, security, throttling
● Never implement business logic at the service mesh layer!
● Data plane more or less supports synchronous
communication
Conclusion
● Cloud native shift is inevitable
● Adaptive and iterative approach is required
● Use a hybrid set of microservices integration patterns
Questions?
THANK YOU
wso2.com

Adaptive and Iterative Integration for Microservices and Cloud Native Architectures

  • 1.
    Director-Integration Architecture, WSO2 Kasun Indrasiri Adaptiveand Iterative Integration for Microservices and Cloud Native Architectures
  • 2.
    ● Integration anddigital transformation ● Role of integration in cloud native architectures ● Microservice integration patterns ● Realizing cloud native and microservices architecture with WSO2 Integration Platform Overview
  • 3.
    Digital Transformation and Integration Integration ispossibly the most important aspect of digital transformation
  • 4.
    What is Cloud Native? Methodologyof building and running applications that fully exploits the power of cloud computing
  • 5.
    Cloud Native Applications ● Cloudnative apps are composed of microservices or serverless functions ● Packaged in containers ● Runs on a Continuous Delivery model ● Adaptive governance
  • 6.
    Rise of CloudNative Applications
  • 7.
    Integrating Microservices and Cloud NativeApps Integration is essential to build any real world use case with cloud native apps
  • 8.
    From ESB toSmart Endpoints and Dumb Pipes Microservices architecture fosters the elimination of a central ESB and creates smart endpoints connected via dumb pipes
  • 9.
    Virtual Service 1 ● CentralizedESB layer provides the integration and network communication and governance capabilities ESB as the Central Integration Bus Service A Virtual Service 2 Virtual Service 3 Service B Service C Service D ESB Consumers
  • 10.
    ● Microservices codehas to take care of all network communication and governance of services Smart Endpoints and Dumb Pipes Microservice X Microservice P Microservice Y Microservice z Microservice Q Microservice R Microservice S Java Consumers Node.js Go
  • 11.
    Source : https://medium.com/netflix-techblog/ Engineering-trade-offs-and-the-netflix-api-re- architecture-64f122b277dd IntegratingMicroservices - Anti-Patterns ● API gateway with business logic ○ E.g. Previous architecture of Netflix API Gateway ● Integrate microservice with a central ESB
  • 12.
  • 13.
    Active Composition/Orchestration Pattern Synchronous/request-responsecommunication Consumer 1 API Service P API Service Q API Service R API Service S Consumers Consumer 2 Consumer 3 Ό Service A Proprietary & Legacy Systems Web API / SaaS API Services/ Edge Services Composite Service/ Integration Services Core Services/ Atomic Services Ό Service I Ό Service H Ό Service J Ό Service E Ό Service C Ό Service D Ό Service G Ό Service B Ό Service F
  • 14.
    Reactive Composition/Choreography Pattern ΌService A Ό Service B Ό Service C Event Bus Application Asynchronous event-driven communication Produce Consume Produce Consume Produce Consume Produce Consume
  • 15.
    Active or Reactive? ● Active Composition ○Ideal for interactive services ○ Service are NOT autonomous ● Reactive Composition ○ Ideal for asynchronous interactions ○ Composition logic is opaque
  • 16.
    Hybrid of Activeand Reactive Composition Consumer 1 API Service P API Service Q API Service R API Service S Consumers Consumer 2 Consumer 3 Ό Service A Event Bus Proprietary & Legacy Systems Web API / SaaS API Services/ Edge Services Composite Service/ Integration Services Core Services/ Atomic Services Ό Service I Ό Service H Ό Service J Ό Service E Ό Service C Ό Service D Ό Service G Ό Service B
  • 17.
  • 18.
    Isolate the legacyand modern systems by placing an anti- corruption layer between them Anti-Corruption Layer Pattern Data Store Data Store Data Store Data Store Microservice Data Store Subsystem B Anti- Corruption LayerMicroservice Microservice Subsystem A
  • 19.
    ● Incrementally replacespecific pieces of functionality with new applications and services ● Create a façade that intercepts requests going to the backend legacy system Strangler Pattern Legacy Modern Strangler Façade Early Migration Modern Legacy Strangler Façade Later Migration Modern Migration Complete
  • 20.
    Building Microservices Integrationwith WSO2 Consumer 1 API Service P API Service Q API Service R API Service S Consumers Consumer 2 Consumer 3 Ό Service A Ό Service B Ό Service F Event Bus Proprietary & Legacy Systems Web API / SaaS API Services/ Edge Services Composite Service/ Integration Services Core Services/ Atomic Services Ό Service I Ό Service H Ό Service J Ό Service E Ό Service C Ό Service D MicroESB
  • 21.
    Service Mesh ● Microservicescode has to take care of all network communication and governance of services ● Hence such capabilities can be offloaded to a separate layer Microservice A Network Stack Service Mesh Sidecar Microservice B Network Stack Service Mesh Sidecar Control Plane HTTP1.x.HTTP2.gRPC,TCP Application Network Functions Business Logic Primitive Network Functions Data Plane
  • 22.
    Service Mesh -Guidelines ● Service Mesh is only meant for commodity features ○ Interservice communication resiliency ○ Governance of services: observability, security, throttling ● Never implement business logic at the service mesh layer! ● Data plane more or less supports synchronous communication
  • 23.
    Conclusion ● Cloud nativeshift is inevitable ● Adaptive and iterative approach is required ● Use a hybrid set of microservices integration patterns
  • 24.
  • 25.