Integration Use Cases
The Ballerina Integrator is the first code-centric approach to programming integrations directly into applications and microservices. It can be used to easily implement the use cases listed in this page and this is demonstrated using tutorials. Tutorials showcase how to build different types of integrations using a complete development lifecycle including IDE configuration, modules, dependencies, coding, and unit testing. Furthermore, each of these tutorials can be deployed as a project of its own via Docker and Kubernetes and setup for easy observability.
SaaS offering is a common software distribution model followed by many vendors today. When building an application, connecting those systems would be one of the main requirements in your organization. The Ballerina Integrator offers a rich set of SaaS connectors such as Salesforce, SAP, Gmail, Google Spreadsheet, Amazon S3, Amazon SQS, etc. You can securely connect to any of those systems easily and build your integration seamlessly.
|Using the Gmail connector Use the Gmail connector to interact with the Gmail REST API||Working with Amazon S3 Bucket Service Use Amazon S3 connector to interact with Amazon S3 bucket service||Notifying Fire Alarm Using SQS Use Amazon SQS Connector to notify alerts|
|Working with Amazon S3 Object Service Use Amazon S3 connector to interact with Amazon S3 object service||Working with Salesforce Client Use Salesforce client to performa a variety of CRUD operations||Salesforce to MySQL Database Use batch processing to synchronize Salesforce data with a MySQL database|
|Import Contacts into Salesforce Using FTP Import contacts from a CSV file into Salesforce using FTP||Backup CSV Files using GoogleSpreadsheets Backup contents from a CSV file into GoogleSheets and read the backed-up data|
The messaging system supports loosely coupled asynchronous data to move from one application to another. There are popular messaging standard protocols and vendors. The JMS connector can be used to connect to any JMS-based message broker. Ballerina language has standard libraries for connecting with RabbitMQ, Kafka, and NATS. You can write the integration for guaranteed delivery with popular store forward enterprise integration pattern using the store forward connector.
|Sending JSON data to an ActiveMQ Queue Tranform JSON message to a text message and send to an ActiveMQ queue||Reliable Delivery Use store forward connector to achieve reliable message delivery||Messaging with Kafka Use Kafka connector to publish and consume messages to a Kafka Topic|
Data storing in the database is a common approach in many application designs. It is not easy when you want to integrate your data store with other systems securely. The Ballerina integrator offers connectors to connect to your DBMS system whether it is a SQL such as MySQL or NoSQL such as MongoDB. You can perform all DB related operation with minimal lines of code and use them for building your integration.
|Data-backed Service Build a database-backed RESTful service||Managing Database Transactions Manage database transactions using Ballerina||Querying MySQL Database Expose MySQL database as a service and do a select query|
Most of the legacy systems use the file as a data transfer mechanism. It is a tedious task connecting to a file server and read files or upload files. There are different types of file formats and extensions that you have to consider reading or writing data. The Ballerina integrator supports connecting your file server with different protocols such as FTP, SFTP, SMB. The file connector act as a listener trigger an event of WatchEvent type, when new files are added to or deleted from the directory. The file connector act as the client supports the generic FTP operations; get, delete, put, append, mkdir, rmdir, isDirectory, rename, size, and list.
|File Integration Using FTP Use the FTP Connector to create an FTP listener service||File Integration Using Samba Use the SMB Connector to create a Samba listener service|
Integration Patterns and SOA¶
Service-oriented architecture (SOA) patterns provide structure and clarity, enabling architects to establish their SOA efforts across the enterprise. Moreover, these SOA patterns also help to link SOA and business requirements in an effective and efficient way. SOA solves the challenge of Enterprise Application Integration (EAI) by reducing the complexity of making enterprise applications work together and helping them evolve faster. It covers common integration patterns like Content-Based Routing, Scatter and Gather Messaging, Service Orchestration, Pass-through Messaging, etc. This section includes only a limited set of patterns, which provides a base, while Ballerina Integrator is capable of implementing almost all integration patterns of this nature.
|Content-based Routing Implement content-based routing||Pass-through Messaging Implement pass-through messaging||Scatter-Gather Flow Control Implement scatter-gather flow where two files are read simultaneously and aggregated|
|Service Composition Implement a service composition||Service Orchestration A service invokes two other services to do some functions||Converting JSON to XML and Upload to FTP Convert a JSON message to XML and upload it to FTP|
|REST to SOAP Accept a REST request and convert it to a SOAP request||Backend for Frontend Apply the BFF design pattern|