What is Azure Integration Service
In modern technology, it has been becoming a common requirement to have integration between various business processes (services or applications). Often times Solution providers give solutions by embedding integration within the code like C#, Java etc. Developers have to ensure that besides integrations, there should be some kind of communication between services, monitoring and security. A good example could be that an ERP or Order System may be integrated with one of the vendor application.
This entire process looks very simple to develop, though it may not be that simple to implement as developing a solution from scratch need planning, coding, triage, testing and eventually time and money.
Many of the application vendors now days expose APIs for data and services, hence making it available to integrate their business processes for data and service utilization. The purpose of Integration Service is to take advantage of APIs and integrate processes.
Azure Integration service does exactly the same thing. With Azure Integration, APIs (Rest\SOAP), Service Buses (Messaging Queue) or Events can be utilized to setup Business Workflow using Logic Apps, hence integrating applications. The process and implementation can be broken down to following technologies:
- Logic Apps
- APIs Management
- Service Bus
- Event Grid
- Data Gateway
- On-Premises Application
Logic Apps are required to implement the business process or you may call it process work flow with series of actions. Think of CRM system, with any update in CRM you may want to send an email or you may want to access on-premises SQL Server and update it. You may define system to system process, user to system process, etc. Please note that Logic App is server-less implementation (platform) i.e. you don’t need to have VM (infrastructure).
Most of the modern application vendors expose few of their APIs externally (REST and SOAP) so that external applications can utilize its data or services through these APIs. These APIs can be made available though API Management extension in Azure Portal.
Service Bus is a trigger and important part of application integration. One way to setup communication between applications is APIs, also called Synchronous method of communication and in cases where APIs cannot made available asynchronous approach may be required. This asynchronous way of communication is called Service Bus. Service Bus essentially an MSMQ type of service.
Event GridEvent Grid is also a trigger. Instead of setting up polling for application to check whether any new message has been received, can be not too useful. Rather receiver can be notified via an event. An event can be setup to monitor the queue and if a message is arrived then event can invoke event handler.
Data Gateway is a tool installed on individual host on-premises to connect on-premises service or application with Azure Integration Service, also called hybrid solution.
On-Premises Application is part of the business process that needs to be integrated, it could be BizTalk server connecting to other sources on Azure using Logic App.
Picture below shows high level architecture of Azure Integration Services
There can be different scenarios where APIs, Events Or Service Buses can be used to integrate. I would like to give a quick demo on how Azure and SQL Database can be integrated. The purpose of the Demo is to create Logic App that continuously monitors if a new file gets added to Drop Box, an entry should be made into Azure SQL Database.
This demo would require following prerequisites:
- A Drop Box Account
- Azure SQL Database
- Connection String of Azure SQL Database
First create a Drop Box Account if you don't have already.
This is common scenario hence I am skipping demo of creating Drop Box Account.
Create Azure SQL Database
- If you already have Azure SQL Database then you can skip this step
- Login to portal.azure.com
- Click on create resource, search for SQL Database resource
- After selecting SQL Database resource, click on Create
- Enter SQL Database Details and click on create to submit deployment request
Modify Firewall Settings from Azure SQL Database
- Once Database gets created, you need to modify database firewall and add client IP of your network so that you could connect to database using SSMS on your machine.
Get Connection Details of SQL Database and create table to save new file record
- Now get the connection details of newly created database. For this go to resources and select Database resource, it should open properties and from there you can get Connection details.
- Once you connect to this database from SSMS, create table in this database with following specs
- At this time you will have to start creating the Logic App. Select Logic App resource from resources and click on create.
- Enter basic details of Logic App like Name, Subscription, Group and Location and submit the deployment request
- This should open Logic App Designer. From Designer under choose action, search for DropBox and under Triggers, select When a file is created
- It should ask you to authenticate your dropbox account and also select the root folder.
- After completing dropbox configuration, add new step for SQL Server
- Add SQL Server connection details
- Next select the table name that was created earlier
- Next, select parameters FileName and Date.
- Enter parameter details
- It should be all set, finally review all configurations
- Add a file to root folder
- Execute the Logic App manually, it should execute anyways as per schedule as well
- Now if you go back to SQL and look at the table content it should have new file names and date new file was observed as per UTC time.
This is all, you now have Azure Logic App monitoring your drop box and adding an entry in SQL if there is a new file found.