Integration was treated as old-school technology when microservice architecture (MSA) was introduced. However, when theory became practice, the technologist who designed and implemented MSA identified the important role integration plays in this modern architecture paradigm. An architecture layer that connects many microservices and builds composite services, requests dispatching and service routing, connects microservices with legacy services and cloud providers are among common integration use cases across most enterprises.
During this session, Asanka will discuss how integration fits into MSA and technologies that can be used to implement integration microservices.
7. Microservice architecture (MSA) is a
pattern for building and delivering
service-oriented applications with two
primary objectives: agility of delivery
and flexibility of deployment.
Source: Gartner
8. MSA is not based on all-new
architectural principles; it combines SOA
best practices with modern application
delivery tooling and organizational
disciplines.
Source: Gartner
9. "Micro" is a concept of scope rather than
size.
Source: Gartner
10. A microservice must have a single
purpose and be loosely coupled in design
and deployed independently of other
microservices.
Source: Gartner
15. 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: Microservices by Martin Fowler
16. Point to point connections
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. Source: Microservices in Practice
18. • 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
19. • ‘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
20. • 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.
26. container-native
rapid start < 1-2 seconds
single function
immutable
non-long running, no GC , use and kill
no request dispatching
27. Technology options;
• 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/CN principles
◦ High level DSL with messy expression langs
• Ballerına - ballerinalang.org.
28. A parallel programming language for microservices integration
Textual and graphical syntax with sequence diagram metaphor
Strongly & statically typed with powerful type system
Designed for the network with json/xml/sql/mime & http/...
33. Ballerina knows main() and service
• Run as a command line program
• Run as a network service
34. Ballerina knows JSON, XML and SQL-D
• 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
36. Ballerina knows Swagger
• Ballerina services’ interface is Swagger and Ballerina
syntax, Swagger YAML syntax and graphic syntaxes are
interchangeable
• Reduces pains of interface-first design
37. Ballerina is naturally parellel
• Sequence diagram approach makes parallelism innate
• Think parallel first, not sequential first
38. Ballerina supports safety and resilience
• Highly structured error and exception handling
• Taint tracking of network delivered data
• Built-in retrying, failover, load balancing and more to
make programs more resilient to network failures
39. Ballerina knows Docker
• Built in ability to create Docker image with executable
Ballerina program package
• Run on any container management platform
40. Ballerina is open source
• Patent pending technology
• Implementation released under Apache License v2.0
◦ Fork me on GitHub: https://github.com/ballerinalang/
• Community
◦ Slack: #ballerinalang
◦ Twitter: @ballerinalang
◦ StackOverflow: #ballerinalang
◦ Developers: ballerina-dev@googlegroups.com
41. Ballerina is more than a language
• Graphical composer in browser / as IDE
• IDE plugins - Intellij IDEA, Visual Code, Atom, Eclipse, ...
• Testerina - testing and mocking tool
• Docerina - API doc generation tool
• Packerina - library and package management tool
43. 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.
44. When should I use Ballerina ?
• Write integration microservices: 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