Use Case – One of our clients wants to integrate their cloud and on premise applications in real time without exposing any of their on premise APIs. They have their own data center and follow strict security policies outlined below:
- Data Center is connected with Intranet applications. Data Center is not published in cloud.
- No web API is exposed to outside to access their on premise Data.
The diagram below illustrates the use case:
Create a Hybrid Solution using Mulesoft
Mulesoft has both an on premise and a cloud runtime engine that we can leverage the hybrid features of to address the above use case. In order to ensure that we avoid any API calls from outside the organization we can use any cloud hosted message broker. This message broker will play the important role for communications.
These components need to be developed:
- A Mulesoft Application hosted in Mulesoft Cloud to interact with other cloud applications. This will be the gateway for client to communicate outside of their organization.
- A Cloud Message broker will be in place to publish, consume and listen messages from different source including above cloud and on premise.
- A Mulesoft Application hosted in the client’s on premise environment. The application will run using on premise mule run time.
Communication between web applications, mule application hosted in different environment and on premises applications
- As per the use case the order of the related application will ask for order specific material data as well as the price from the gateway mule application hosted in the cloud.
- The Mule Cloud application will expose a secure REST API for the outside communication and the order related application will ask for relevant data through this API.
- After getting the request from the web application the Mule soft cloud application will send a message to the Message broker to process the request.
- The on premise mule application will always listen to the Message Broker queue and it will process the message as soon as it gets any new message in the queue. During message processing the on premise mule application will contact other on premise applications to retrieve relevant material related to the data request. Once the on premise mule application gets the relevant data it will send the data through the message broker.
- The Cloud Mule application will also always listen to the new response messages from the on premise application. When it receives any new message through the message queue it will dispatch the message and transform the incoming message into a response to order web applications.
Simulation through a Proof of Concept ( POC)
Using Mule AMQP connector and Rabbit MQ cloud instance our POC shows that the calculated average response time is only 0.20 seconds more if we compare with a straight HTTP call with another application hosted in Cloud.
To get maximum performance we can tune our application by following below steps:
- Utilize an advanced message broker like Rabbit MQ.
- Tune the application code utilizing best practices.
- Minimize request – response time when gathering information from on premise application.
Using above publish-consume methodology in hybrid framework we can expose the desired REST API through cloud Mule instance and at the same time we can protect client’s on premises data following its strict security policy.
For more information on Apps Associates services, check out our integration page.
Rajib Mandal has over 20 years of IT experience in the areas of software solution development in .Net C# ,Web Services, VC++ and middle layer integration tools like Mulesoft, Boomi & Tibco. His current role at Apps Associates is to provide integration solutions to various clients.