SlideShare a Scribd company logo
Integration Microservices
Bridging Microservices, Integration, and APIs
SF Microservices - June Meetup 2017
Kasun Indrasiri
Director-Integration Architecture at WSO2
About Me
● Director - Integration Architecture at WSO2
● Author ‘Beginning WSO2 ESB’, several microservices articles
● Committer/PMC Apache Synapse
WSO2
● Open source middleware company
● API Management, Integration, IAM and IOT platforms.
Microservices Architecture in a nutshell
Monolithic Applications
Microservices Architecture in a nutshell
SOA
Microservices Architecture in a nutshell
SOA with APIs
Microservices Architecture in a nutshell
Microservices
Why Microservices Compositions?
● Too many fine-grained microservices.
● Business functionalities often require to interact with more than one
(micro)service.
● Microservices typically don't publish their APIs for direct invocation.
● Brown-field Reality requires ‘Integration’
○ Green fields enterprises don’t exists.
○ Hybrid usage of Microservices and monolithic architecture is quite common.
○ Need to integrate with existing legacy systems, proprietary systems, databases and
SaaS.
Microservices and ESB - Facts and Myths
● How to Integrate Microservices/How to create microservice compositions?
● From ESB to ‘Smart endpoints and dumb pipes’
○ Routing logic or business logic that resides at the central ESB layer has to be segregated and
distributed among the (smart) clients and (micro) services.
(source : YOW! 2016 — Microservices by Martin Fowler)
Microservices and ESB - Myths and Facts
Point to Point Interactions
● Strict, dogmatic adherence to ‘smart-endpoint and dumb pipes’ results
Point-to-point(P2P) connectivity between your services and consumers.
● P2P approach is not scalable and exponentially increases the complexity of
the service interactions.
 ‘Smart-endpoint and dumb pipes’ in practice (source : Microservices in Practice)
Glimpse of existing Microservice Implementations
● How do the existing microservice implementations handle the service
compositions/service orchestration?
Microservice - Compositions
Netflix
● The Netflix API is the “front door” to the Netflix
ecosystem of microservices.
● API provides the logic of composing calls to all
services that are required to construct a
response.
● The Netflix API is an orchestration service that
exposes coarse grained APIs by composing
fined grained functionality provided by the
microservices.
● Orchestration logic is built with Java, RxJava
Microservice - Compositions
Uber
● ‘Edge Services’ which are exposed to the
external client/mobile applications and the
service orchestration logic is burnt into the
edge service.
● Edge services are primarily implemented
on top of Node.js
Microservice - Compositions
Paypal
● The API façade layer exposes Paypal
business functionalities to various internal
and external client applications
● The orchestration logic resides in the API
façade layer and its implemented using
Groovy.
Miniservices
“A miniservice is a coarse-grained, independently deployable and independently
scalable application component.”
● “Innovation Insight for Miniservices” : Published: 21 February 2017
○ https://www.gartner.com/doc/3615120/innovation-insight-miniservices
Pragmatic Microservices Architecture
● Microservices types with different granularities
Integration Microservices
● Composing microservices and create a new service
● Similar to the ‘Miniservice’ concept wrt to the granularity
● Integrate web APIs/SaaS, legacy systems and microservices
● API services/Edge service is also an integration microservice with some API
gateway capabilities.
Technologies for building Integration Microservices
● Frameworks based on general purpose lang. : Java, Node.js, Groovy - e.g.:
SpringBoot, Dropwizard
○ Not designed with suitable abstractions for integration/network interactions
○ Compositions cannot be illustrated graphically.
● Apache Camel and other ESBs.
○ Bulky traditional ESB architecture -> Not fully compatible with MSA principles.
○ High level DSLs with a lot of tweaks to make it a powerful programming lang. (e.g. expression
languages, properties)
● Ballerina - ballerinalang.org.
Ballerina (ballerinalang.org)
● Ballerina is a new parallel programming language that is designed and
optimized for integration.
● Graphical and textual syntax which is built on top of the sequence diagram
metaphor.
● Designed for network interactions with JSON/XML/SQL/MIME and
HTTP/JMS/File/WebSockets
● Lightweight, high-performance and container native Integration runtime
● 100% open source.
Hello World - Service
Hello World - Main
Ballerina - Key Concepts
Components Overview
Ballerina - Key Concepts
Service and Resource
● A service comprises of a homogeneous collection of network accessible entry
points; ‘resources’.
● A ‘resource’ contains the set of statements which are executed sequentially.
Ballerina - Key Concepts
Workers
● Worker is a thread of execution that can be programmed independently.
● A resource or a function contains the default worker that where you
sequentially configure the ballerina programming logic.
Ballerina - Key Concepts
Server Connectors
● Services are protocol agnostic.
● You can bind a ‘Server Connector’ to any service to receive messages from
respective the network protocol.
● Are defined as platform extensions – not written in Ballerina
● May offer of utility functions to access info in the message
● Can be configured via annotations that bind a service to a server connector.
Ballerina - Key Concepts
Connectors and Actions
● Ballerina is all about integrating with other systems using connectors
● “Other systems” are represented by a (client) “connector” that defines a set of
“actions” that you can do with that system
● The client connectors represent an external system that is accessible through
the network such as HTTP service, Database or any SaaS application.
● Graphically, the connector is represented as an actor in the sequence diagram
(i.e. a vertical line) and actions are boxes that go into a worker with lines going
to the actor.
Ballerina - Key Concepts
Functions
● Represent the reusable integration scenarios/code.
Ballerina Demo
Code is located at :
https://github.com/kasun04/rnd/tree/master/ballerina_use_cases
Ballerina knows main() and services
● Run as a command line program
● Run as a network service.
Ballerina knows JSON, XML and SQL data
● All part of Ballerina type system
● Deeply unified and integrated both syntactically and semantically
● Data transformation across all of these graphically and textually
● Transactional data management
Ballerina knows network protocols
● HTTP, WebSockets, JMS, FTP, Files, ...
● Popular APIs: Facebook, Twitter, Gmail, LinkedIn, …
● Extensible authentication / policy support
Ballerina knows Swagger
● Ballerina services’ interface is Swagger and Ballerina syntax, Swagger YAML
syntax and graphical syntaxes are interchangeable
● Reduces pains of interface-first design
Ballerina is naturally parallel
● Sequence diagram approach makes parallelism innate
● Think parallel first, not sequential first
Ballerina supports safety & resiliency
● Highly structured error and exception handling
● Taint tracking of network delivered data
● Stability Patterns : Supports Timeout, Circuit Breaker
● Failover, Load balancing, Reliable delivery.
High Performance and Container-native runtime
● Performance
○ Extremely lightweight and high performant runtime.
○ Minimal Startup time(< 1s), low resource consumption.
● Container-native
○ Built in ability to create Docker image with executable Ballerina program package
○ Run on any container management platform
Ballerina is Open Source!
● Implementation released under Apache License v2.0
○ Fork me on GitHub: https://github.com/ballerinalang/
● Community
○ Developers: ballerina-dev@googlegroups.com
○ Slack: #ballerinalang
○ Twitter: @ballerinalang
○ StackOverflow: #ballerinalang
Ballerina - Future
● Why yet another language?
○ Make it easier to consume and produce networked services and applications.
○ Ballerina has been influenced by Java, Go, C, Node, Javascript, Maven, Tomcat, and a variety of
other awesome tools.
● When should I use Ballerina?
○ Write integration microservices/miniservices: 80-20 rule
■ If 80% of your service is about integrating with other services, data and APIs then use
Ballerina.
■ If just 20% is integration then use Java / Node / Go / PHP / XYZ
○ Re-compose existing services to be API backends
○ Write integration scripts
■ Replacement for shell scripts that use curl a lot
Ballerina - Try it!
● DOWNLOAD v0.87 and twirl away:
○ http://ballerinalang.org/
● Source Code : https://github.com/ballerinalang/
● NOTE: Still work-in-progress. New releases every two weeks with major
features still coming along. Missing docs. A (few) bugs. Etc.!
● Integration Microservices plays a key part of MSA.
● Understanding service granularities.
● Technologies for building integration microservices.
Summary
Thank You!
● kasun@wso2.com
● https://twitter.com/kasunindrasiri

More Related Content

PPTX
Microservice vs. Monolithic Architecture
Paul Mooney
 
PPSX
Docker Kubernetes Istio
Araf Karsh Hamid
 
PDF
Microservice Architecture
Nguyen Tung
 
PPTX
Microservices Architecture - Bangkok 2018
Araf Karsh Hamid
 
PPTX
Domain Driven Design
Hannah Farrugia
 
PPTX
API Management Part 1 - An Introduction to Azure API Management
BizTalk360
 
PDF
Docker Introduction
Sparkbit
 
PPSX
Microservices Architecture - Cloud Native Apps
Araf Karsh Hamid
 
Microservice vs. Monolithic Architecture
Paul Mooney
 
Docker Kubernetes Istio
Araf Karsh Hamid
 
Microservice Architecture
Nguyen Tung
 
Microservices Architecture - Bangkok 2018
Araf Karsh Hamid
 
Domain Driven Design
Hannah Farrugia
 
API Management Part 1 - An Introduction to Azure API Management
BizTalk360
 
Docker Introduction
Sparkbit
 
Microservices Architecture - Cloud Native Apps
Araf Karsh Hamid
 

What's hot (20)

PPSX
Microservices, Containers, Kubernetes, Kafka, Kanban
Araf Karsh Hamid
 
PDF
Hexagonal architecture: how, why and when
Xoubaman
 
PPTX
Introduction to Docker
Pubudu Jayawardana
 
PDF
Keycloak SSO basics
Juan Vicente Herrera Ruiz de Alejo
 
PPTX
Microsoft Azure Technical Overview
gjuljo
 
PDF
An Introduction to Kubernetes
Imesh Gunaratne
 
PDF
Docker 101: Introduction to Docker
Docker, Inc.
 
PDF
Microservices architecture
Abdelghani Azri
 
PDF
Kubernetes extensibility: CRDs & Operators
SIGHUP
 
PDF
Highlights of WSO2 API Manager 4.0.0
WSO2
 
PDF
An intro to Kubernetes operators
J On The Beach
 
PDF
Google Kubernetes Engine (GKE) deep dive
Akash Agrawal
 
PPTX
Domain Driven Design - Strategic Patterns and Microservices
Radosław Maziarka
 
PPTX
Washington DC MuleSoft Meetup: CI/CD Pipeline with MuleSoft and Azure DevOps
Big Compass
 
PDF
Kubernetes Interview Questions And Answers | Kubernetes Tutorial | Kubernetes...
Edureka!
 
PDF
Kubernetes - A Comprehensive Overview
Bob Killen
 
PDF
Basic Kong API Gateway
SukoomPornsuksiri1
 
PDF
Microservice Architecture Patterns, by Richard Langlois P. Eng.
Richard Langlois P. Eng.
 
PPTX
Monoliths and Microservices
Bozhidar Bozhanov
 
PPTX
Docker: From Zero to Hero
fazalraja
 
Microservices, Containers, Kubernetes, Kafka, Kanban
Araf Karsh Hamid
 
Hexagonal architecture: how, why and when
Xoubaman
 
Introduction to Docker
Pubudu Jayawardana
 
Microsoft Azure Technical Overview
gjuljo
 
An Introduction to Kubernetes
Imesh Gunaratne
 
Docker 101: Introduction to Docker
Docker, Inc.
 
Microservices architecture
Abdelghani Azri
 
Kubernetes extensibility: CRDs & Operators
SIGHUP
 
Highlights of WSO2 API Manager 4.0.0
WSO2
 
An intro to Kubernetes operators
J On The Beach
 
Google Kubernetes Engine (GKE) deep dive
Akash Agrawal
 
Domain Driven Design - Strategic Patterns and Microservices
Radosław Maziarka
 
Washington DC MuleSoft Meetup: CI/CD Pipeline with MuleSoft and Azure DevOps
Big Compass
 
Kubernetes Interview Questions And Answers | Kubernetes Tutorial | Kubernetes...
Edureka!
 
Kubernetes - A Comprehensive Overview
Bob Killen
 
Basic Kong API Gateway
SukoomPornsuksiri1
 
Microservice Architecture Patterns, by Richard Langlois P. Eng.
Richard Langlois P. Eng.
 
Monoliths and Microservices
Bozhidar Bozhanov
 
Docker: From Zero to Hero
fazalraja
 
Ad

Similar to Integration Microservices (20)

PDF
Bridging Microservices, APIs and Integration
Kasun Indrasiri
 
PDF
The Role of Integration in Microservice Architecture (MSA)
Asanka Abeysinghe
 
PDF
[WSO2 API Day Toronto 2019] Cloud-native Integration for the Enterprise
WSO2
 
PDF
[WSO2 Summit Americas 2020] Creating Smart Endpoints Using Integration Micros...
WSO2
 
PDF
Reference architectures shows a microservices deployed to Kubernetes
Rakesh Gujjarlapudi
 
PPTX
Role of integration in Digital Transformation
WSO2
 
PPTX
WSO2 Auckland Workshop 2017
Dassana Wijesekara
 
PPTX
Dirigible powered by Orion for Cloud Development (EclipseCon EU 2015)
Nedelcho Delchev
 
PDF
The Fn Project: A Quick Introduction (December 2017)
Oracle Developers
 
PDF
SoC Keynote:The State of the Art in Integration Technology
Srinath Perera
 
PDF
All About Microservices and OpenSource Microservice Frameworks
Mohammad Asif Siddiqui
 
PPTX
The Role of Enterprise Integration in Digital Transformation
Kasun Indrasiri
 
PDF
WSO2Con USA 2017: The Role of Enterprise Integration in Digital Transformation
WSO2
 
PDF
Cloud Native Application Integration With APIs
Nirmal Fernando
 
PDF
Agile Integration Workshop
Judy Breedlove
 
PDF
[WSO2 Summit APAC 2020} Creating Smart Endpoints Using Integration Microservices
WSO2
 
PDF
[WSO2 Summit EMEA 2020] Creating Smart Endpoints Using Integration Microservices
WSO2
 
PDF
KnativeCon 2022 - Knative Functions
Mauricio (Salaboy) Salatino
 
PPTX
MuleSoft London Community October 2017 - Hybrid and SAP Integration
Pace Integration
 
PDF
GlueCon 2015 - How REST APIs can glue all types of devices together
Restlet
 
Bridging Microservices, APIs and Integration
Kasun Indrasiri
 
The Role of Integration in Microservice Architecture (MSA)
Asanka Abeysinghe
 
[WSO2 API Day Toronto 2019] Cloud-native Integration for the Enterprise
WSO2
 
[WSO2 Summit Americas 2020] Creating Smart Endpoints Using Integration Micros...
WSO2
 
Reference architectures shows a microservices deployed to Kubernetes
Rakesh Gujjarlapudi
 
Role of integration in Digital Transformation
WSO2
 
WSO2 Auckland Workshop 2017
Dassana Wijesekara
 
Dirigible powered by Orion for Cloud Development (EclipseCon EU 2015)
Nedelcho Delchev
 
The Fn Project: A Quick Introduction (December 2017)
Oracle Developers
 
SoC Keynote:The State of the Art in Integration Technology
Srinath Perera
 
All About Microservices and OpenSource Microservice Frameworks
Mohammad Asif Siddiqui
 
The Role of Enterprise Integration in Digital Transformation
Kasun Indrasiri
 
WSO2Con USA 2017: The Role of Enterprise Integration in Digital Transformation
WSO2
 
Cloud Native Application Integration With APIs
Nirmal Fernando
 
Agile Integration Workshop
Judy Breedlove
 
[WSO2 Summit APAC 2020} Creating Smart Endpoints Using Integration Microservices
WSO2
 
[WSO2 Summit EMEA 2020] Creating Smart Endpoints Using Integration Microservices
WSO2
 
KnativeCon 2022 - Knative Functions
Mauricio (Salaboy) Salatino
 
MuleSoft London Community October 2017 - Hybrid and SAP Integration
Pace Integration
 
GlueCon 2015 - How REST APIs can glue all types of devices together
Restlet
 
Ad

More from Kasun Indrasiri (15)

PDF
Microservices Integration Patterns with Kafka
Kasun Indrasiri
 
PPTX
Adaptive and Iterative Integration for Microservices and Cloud Native Archite...
Kasun Indrasiri
 
PDF
Microservices for Enterprises
Kasun Indrasiri
 
PDF
Deep-dive into WSO2 ESB 5.0
Kasun Indrasiri
 
PDF
Microintegration
Kasun Indrasiri
 
PDF
Microservices in Practice
Kasun Indrasiri
 
PPTX
Reactive Programming in Java 8 with Rx-Java
Kasun Indrasiri
 
PPT
WSO2-ESB - The backbone of Enterprise Integration
Kasun Indrasiri
 
PPTX
Introduction to WSO2 Integration Platform
Kasun Indrasiri
 
PPTX
WSO2 Gateway
Kasun Indrasiri
 
PPTX
The Middleware technology that connects the enterprise
Kasun Indrasiri
 
PDF
API, Integration, and SOA Convergence
Kasun Indrasiri
 
PDF
The Past, Present and Future of Enterprise Integration
Kasun Indrasiri
 
PPTX
WSO2 ESB - The Backbone of Integration
Kasun Indrasiri
 
PPTX
Connected Retail
Kasun Indrasiri
 
Microservices Integration Patterns with Kafka
Kasun Indrasiri
 
Adaptive and Iterative Integration for Microservices and Cloud Native Archite...
Kasun Indrasiri
 
Microservices for Enterprises
Kasun Indrasiri
 
Deep-dive into WSO2 ESB 5.0
Kasun Indrasiri
 
Microintegration
Kasun Indrasiri
 
Microservices in Practice
Kasun Indrasiri
 
Reactive Programming in Java 8 with Rx-Java
Kasun Indrasiri
 
WSO2-ESB - The backbone of Enterprise Integration
Kasun Indrasiri
 
Introduction to WSO2 Integration Platform
Kasun Indrasiri
 
WSO2 Gateway
Kasun Indrasiri
 
The Middleware technology that connects the enterprise
Kasun Indrasiri
 
API, Integration, and SOA Convergence
Kasun Indrasiri
 
The Past, Present and Future of Enterprise Integration
Kasun Indrasiri
 
WSO2 ESB - The Backbone of Integration
Kasun Indrasiri
 
Connected Retail
Kasun Indrasiri
 

Recently uploaded (20)

PDF
How to Seamlessly Integrate Salesforce Data Cloud with Marketing Cloud.pdf
NSIQINFOTECH
 
PDF
The Role of Automation and AI in EHS Management for Data Centers.pdf
TECH EHS Solution
 
PPTX
Save Business Costs with CRM Software for Insurance Agents
Insurance Tech Services
 
PPTX
10 Hidden App Development Costs That Can Sink Your Startup.pptx
Lunar Web Solution
 
PDF
Bandai Playdia The Book - David Glotz
BluePanther6
 
PPTX
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
PPTX
Materi-Enum-and-Record-Data-Type (1).pptx
RanuFajar1
 
PDF
What to consider before purchasing Microsoft 365 Business Premium_PDF.pdf
Q-Advise
 
PDF
Become an Agentblazer Champion Challenge Kickoff
Dele Amefo
 
PPTX
introduction to dart --- Section one .pptx
marknaiem92
 
DOCX
The Future of Smart Factories Why Embedded Analytics Leads the Way
Varsha Nayak
 
PDF
Jenkins: An open-source automation server powering CI/CD Automation
SaikatBasu37
 
PPTX
Presentation of Computer CLASS 2 .pptx
darshilchaudhary558
 
PDF
Community & News Update Q2 Meet Up 2025
VictoriaMetrics
 
PPTX
Benefits of DCCM for Genesys Contact Center
pointel ivr
 
PPT
Overview of Oracle Receivables Process.ppt
nbvreddy229
 
PDF
Multi-factor Authentication (MFA) requirement for Microsoft 365 Admin Center_...
Q-Advise
 
PPTX
Why Use Open Source Reporting Tools for Business Intelligence.pptx
Varsha Nayak
 
PDF
Winning Business in a Slowing Economy, How CPQ helps Manufacturers Protect Ma...
systemscincom
 
PPTX
Visualising Data with Scatterplots in IBM SPSS Statistics.pptx
Version 1 Analytics
 
How to Seamlessly Integrate Salesforce Data Cloud with Marketing Cloud.pdf
NSIQINFOTECH
 
The Role of Automation and AI in EHS Management for Data Centers.pdf
TECH EHS Solution
 
Save Business Costs with CRM Software for Insurance Agents
Insurance Tech Services
 
10 Hidden App Development Costs That Can Sink Your Startup.pptx
Lunar Web Solution
 
Bandai Playdia The Book - David Glotz
BluePanther6
 
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
Materi-Enum-and-Record-Data-Type (1).pptx
RanuFajar1
 
What to consider before purchasing Microsoft 365 Business Premium_PDF.pdf
Q-Advise
 
Become an Agentblazer Champion Challenge Kickoff
Dele Amefo
 
introduction to dart --- Section one .pptx
marknaiem92
 
The Future of Smart Factories Why Embedded Analytics Leads the Way
Varsha Nayak
 
Jenkins: An open-source automation server powering CI/CD Automation
SaikatBasu37
 
Presentation of Computer CLASS 2 .pptx
darshilchaudhary558
 
Community & News Update Q2 Meet Up 2025
VictoriaMetrics
 
Benefits of DCCM for Genesys Contact Center
pointel ivr
 
Overview of Oracle Receivables Process.ppt
nbvreddy229
 
Multi-factor Authentication (MFA) requirement for Microsoft 365 Admin Center_...
Q-Advise
 
Why Use Open Source Reporting Tools for Business Intelligence.pptx
Varsha Nayak
 
Winning Business in a Slowing Economy, How CPQ helps Manufacturers Protect Ma...
systemscincom
 
Visualising Data with Scatterplots in IBM SPSS Statistics.pptx
Version 1 Analytics
 

Integration Microservices

  • 1. Integration Microservices Bridging Microservices, Integration, and APIs SF Microservices - June Meetup 2017 Kasun Indrasiri Director-Integration Architecture at WSO2
  • 2. About Me ● Director - Integration Architecture at WSO2 ● Author ‘Beginning WSO2 ESB’, several microservices articles ● Committer/PMC Apache Synapse WSO2 ● Open source middleware company ● API Management, Integration, IAM and IOT platforms.
  • 3. Microservices Architecture in a nutshell Monolithic Applications
  • 5. Microservices Architecture in a nutshell SOA with APIs
  • 6. Microservices Architecture in a nutshell Microservices
  • 7. Why Microservices Compositions? ● Too many fine-grained microservices. ● Business functionalities often require to interact with more than one (micro)service. ● Microservices typically don't publish their APIs for direct invocation. ● Brown-field Reality requires ‘Integration’ ○ Green fields enterprises don’t exists. ○ Hybrid usage of Microservices and monolithic architecture is quite common. ○ Need to integrate with existing legacy systems, proprietary systems, databases and SaaS.
  • 8. Microservices and ESB - Facts and Myths ● How to Integrate Microservices/How to create microservice compositions? ● From ESB to ‘Smart endpoints and dumb pipes’ ○ Routing logic or business logic that resides at the central ESB layer has to be segregated and distributed among the (smart) clients and (micro) services. (source : YOW! 2016 — Microservices by Martin Fowler)
  • 9. Microservices and ESB - Myths and Facts Point to Point Interactions ● Strict, dogmatic adherence to ‘smart-endpoint and dumb pipes’ results Point-to-point(P2P) connectivity between your services and consumers. ● P2P approach is not scalable and exponentially increases the complexity of the service interactions.  ‘Smart-endpoint and dumb pipes’ in practice (source : Microservices in Practice)
  • 10. Glimpse of existing Microservice Implementations ● How do the existing microservice implementations handle the service compositions/service orchestration?
  • 11. Microservice - Compositions Netflix ● The Netflix API is the “front door” to the Netflix ecosystem of microservices. ● API provides the logic of composing calls to all services that are required to construct a response. ● The Netflix API is an orchestration service that exposes coarse grained APIs by composing fined grained functionality provided by the microservices. ● Orchestration logic is built with Java, RxJava
  • 12. Microservice - Compositions Uber ● ‘Edge Services’ which are exposed to the external client/mobile applications and the service orchestration logic is burnt into the edge service. ● Edge services are primarily implemented on top of Node.js
  • 13. Microservice - Compositions Paypal ● The API façade layer exposes Paypal business functionalities to various internal and external client applications ● The orchestration logic resides in the API façade layer and its implemented using Groovy.
  • 14. Miniservices “A miniservice is a coarse-grained, independently deployable and independently scalable application component.” ● “Innovation Insight for Miniservices” : Published: 21 February 2017 ○ https://www.gartner.com/doc/3615120/innovation-insight-miniservices
  • 15. Pragmatic Microservices Architecture ● Microservices types with different granularities
  • 16. Integration Microservices ● Composing microservices and create a new service ● Similar to the ‘Miniservice’ concept wrt to the granularity ● Integrate web APIs/SaaS, legacy systems and microservices ● API services/Edge service is also an integration microservice with some API gateway capabilities.
  • 17. Technologies for building Integration Microservices ● Frameworks based on general purpose lang. : Java, Node.js, Groovy - e.g.: SpringBoot, Dropwizard ○ Not designed with suitable abstractions for integration/network interactions ○ Compositions cannot be illustrated graphically. ● Apache Camel and other ESBs. ○ Bulky traditional ESB architecture -> Not fully compatible with MSA principles. ○ High level DSLs with a lot of tweaks to make it a powerful programming lang. (e.g. expression languages, properties) ● Ballerina - ballerinalang.org.
  • 18. Ballerina (ballerinalang.org) ● Ballerina is a new parallel programming language that is designed and optimized for integration. ● Graphical and textual syntax which is built on top of the sequence diagram metaphor. ● Designed for network interactions with JSON/XML/SQL/MIME and HTTP/JMS/File/WebSockets ● Lightweight, high-performance and container native Integration runtime ● 100% open source.
  • 19. Hello World - Service
  • 21. Ballerina - Key Concepts Components Overview
  • 22. Ballerina - Key Concepts Service and Resource ● A service comprises of a homogeneous collection of network accessible entry points; ‘resources’. ● A ‘resource’ contains the set of statements which are executed sequentially.
  • 23. Ballerina - Key Concepts Workers ● Worker is a thread of execution that can be programmed independently. ● A resource or a function contains the default worker that where you sequentially configure the ballerina programming logic.
  • 24. Ballerina - Key Concepts Server Connectors ● Services are protocol agnostic. ● You can bind a ‘Server Connector’ to any service to receive messages from respective the network protocol. ● Are defined as platform extensions – not written in Ballerina ● May offer of utility functions to access info in the message ● Can be configured via annotations that bind a service to a server connector.
  • 25. Ballerina - Key Concepts Connectors and Actions ● Ballerina is all about integrating with other systems using connectors ● “Other systems” are represented by a (client) “connector” that defines a set of “actions” that you can do with that system ● The client connectors represent an external system that is accessible through the network such as HTTP service, Database or any SaaS application. ● Graphically, the connector is represented as an actor in the sequence diagram (i.e. a vertical line) and actions are boxes that go into a worker with lines going to the actor.
  • 26. Ballerina - Key Concepts Functions ● Represent the reusable integration scenarios/code.
  • 27. Ballerina Demo Code is located at : https://github.com/kasun04/rnd/tree/master/ballerina_use_cases
  • 28. Ballerina knows main() and services ● Run as a command line program ● Run as a network service.
  • 29. Ballerina knows JSON, XML and SQL data ● All part of Ballerina type system ● Deeply unified and integrated both syntactically and semantically ● Data transformation across all of these graphically and textually ● Transactional data management
  • 30. Ballerina knows network protocols ● HTTP, WebSockets, JMS, FTP, Files, ... ● Popular APIs: Facebook, Twitter, Gmail, LinkedIn, … ● Extensible authentication / policy support
  • 31. Ballerina knows Swagger ● Ballerina services’ interface is Swagger and Ballerina syntax, Swagger YAML syntax and graphical syntaxes are interchangeable ● Reduces pains of interface-first design
  • 32. Ballerina is naturally parallel ● Sequence diagram approach makes parallelism innate ● Think parallel first, not sequential first
  • 33. Ballerina supports safety & resiliency ● Highly structured error and exception handling ● Taint tracking of network delivered data ● Stability Patterns : Supports Timeout, Circuit Breaker ● Failover, Load balancing, Reliable delivery.
  • 34. High Performance and Container-native runtime ● Performance ○ Extremely lightweight and high performant runtime. ○ Minimal Startup time(< 1s), low resource consumption. ● Container-native ○ Built in ability to create Docker image with executable Ballerina program package ○ Run on any container management platform
  • 35. Ballerina is Open Source! ● Implementation released under Apache License v2.0 ○ Fork me on GitHub: https://github.com/ballerinalang/ ● Community ○ Developers: [email protected] ○ Slack: #ballerinalang ○ Twitter: @ballerinalang ○ StackOverflow: #ballerinalang
  • 36. Ballerina - Future ● Why yet another language? ○ Make it easier to consume and produce networked services and applications. ○ Ballerina has been influenced by Java, Go, C, Node, Javascript, Maven, Tomcat, and a variety of other awesome tools. ● When should I use Ballerina? ○ Write integration microservices/miniservices: 80-20 rule ■ If 80% of your service is about integrating with other services, data and APIs then use Ballerina. ■ If just 20% is integration then use Java / Node / Go / PHP / XYZ ○ Re-compose existing services to be API backends ○ Write integration scripts ■ Replacement for shell scripts that use curl a lot
  • 37. Ballerina - Try it! ● DOWNLOAD v0.87 and twirl away: ○ http://ballerinalang.org/ ● Source Code : https://github.com/ballerinalang/ ● NOTE: Still work-in-progress. New releases every two weeks with major features still coming along. Missing docs. A (few) bugs. Etc.!
  • 38. ● Integration Microservices plays a key part of MSA. ● Understanding service granularities. ● Technologies for building integration microservices. Summary
  • 39. Thank You! ● [email protected] https://twitter.com/kasunindrasiri