Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Â
Bridging Microservices, APIs and Integration
1. Bridging Microservices, APIs and Integration
Microservices and Cloud Native Apps - SF Bay Area
Cloud Field Day Edition, Santa Clara
July 2017
Kasun Indrasiri
Director-Integration Architecture at WSO2
2. About Me
â Director - Integration Architecture at WSO2
â Committer/PMC Apache Synapse, an architect of WSO2 ESB
â Author âBeginning WSO2 ESBâ, several microservices articles/white papers
WSO2
â Open source middleware company
â API Management, Integration, IAM and IOT platforms.
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. Glimpse of existing Microservice Implementations
â How do the existing microservice implementations handle the service
compositions/service orchestration?
9. 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
10. 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
11. 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.
12. Miniservices
âA miniservice is a coarse-grained, independently deployable and independently
scalable application component.â
â âInnovation Insight for Miniservicesâ : Published: February 2017
â https://www.gartner.com/doc/3615120/innovation-insight-miniservices
13. The ânewâ monolithâŠ
API Gateway
â A central gateway with heavy composition
logic is becoming an anti-pattern.
â https://medium.com/netflix-techblog/engineering-trade-offs-and-
the-netflix-api-re-architecture-64f122b277dd
â Ability to develop, deploy and scale APIs
independently -> Micro-API Gateways
15. Integration/Composite Microservices
â A composite microservice with multiple network interactions
â Create composite microservices by integrating web APIs/SaaS, legacy
systems and microservices
â API services/Edge service is also an integration microservice with some API
gateway capabilities.
â Similar to the âMiniserviceâ concept wrt to the granularity
16. Technologies for building Composite/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 - Open source microservice composition
framework
â Service mesh frameworks - for Inter-service communication
17. 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.
20. Ballerina - Features
â Network Protocols
â HTTP/HTTP2, WebSockets, JMS, File/FTP, Databases
â SaaS Integration - Salesforce, Twitter, Gmail, etc.
â Proprietary and legacy connectors
â Service definition and implementation
â Swagger, Jax-RS like service annotations
â Data Types
â Native support for JSON, XML and SQL data
â Graphical Type mapping
â High performance and container native
â One of the fastest HTTP transport based on Netty
â Minimal Startup time(< 1s), low resource consumption.
â Built-in ability to create Docker image with executable Ballerina program package
â Run on any container management platform
21. Ballerina - Future
â Ballerina 1.0 release on 2017 Q4
â 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
23. Ballerina - Try it!
â DOWNLOAD v0.91 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.!
24. â Managing a network of microservices and inter-service communications
â Not really a composite microservice development technology.
â Eg: Istio - https://istio.io, Linkered https://linkerd.io/
Service Mesh Solutions
25. â Understanding service granularities.
â Technologies for building integration microservices.
Summary