Hybrid Integration Using Azure Logic Apps and Azure Functions
If you're using a hybrid cloud environment, read on to see what benefits Azure Logic Apps and Azure functions can bring to your dev environment.
Join the DZone community and get the full member experience.Join For Free
The Need for Hybrid Cloud Integration
With cloud being embraced actively by organizations, the need for hybrid integration has evolved.
As part of a cloud-first strategy, customers have started consuming more of SaaS/PaaS applications that would require integration with enterprise applications.
We might have to connect to a number of applications, which do not provide an API-based interface. To integrate such enterprise applications with SaaS applications as well as other cloud applications/services which are not on-premises, connector capabilities can be leveraged.
There is a need for hybrid integration platforms which allow enterprises to better integrate services and applications in hybrid environments (on-premise and cloud).
The platform should support hybrid integration scenarios like communication between SaaS and on-premise applications, on-premise and public cloud environments, etc.
Key Features Include:
- Supports multiple communication protocols like AS2, HTTP, etc.
- Core integration engine-orchestration, routing, transformation, validation.
- Provides connectors for SaaS, on-premise, and cloud services and other applications/services.
- Highly available, scalable, reliable, and secure.
- Provides the ability to expose and consume microservices.
- Ability to handle real-time application integration.
- API lifecycle management.
- Monitoring and management.
Azure Logic Apps
Azure Logic Apps helps build mission-critical integration workflows to integrate applications and data across on-premise and cloud, and to orchestrate microservices/workflows. It provides a host of connectors that help connect with on-premise systems, cloud systems, Cognitive Services, the Azure IoT Suite, Azure Storage Blob, Office 365, SalesForce, Azure Event Grid, etc. It provides support for industry-standard protocols like AS2, X12, EDIFACT, etc., as well as the capability to process XML messages, flat files, and the like.
It provides an easy to use visual designer interface, which supports the easy creation of workflows. Logic Apps can be coupled with Azure Functions to include custom code if required.
Azure Logic Apps provides a host of connectors that include standard connectors for connecting to:
Azure Blob Storage
On-premise connectors such as :
Integration account connectors which provide support for transforming and validating XML, decoding, supporting standard formats like X12, and enterprise connectors for connecting to SAP, MQ, etc.
A logic app consists of actions, triggers, workflows, and flow controls.
Logic Apps applications are good for asynchronous integration.
- A message is received by the IoT Hub when an event is triggered, such as when the temperature is greater than a certain threshold. The message triggers the logic app, which is listening to the queue on which the message is sent. The logic app sends an alert notification to the concerned party.
- The user writes feedback using any of the social networking tools, which triggers a logic app flow. The workflow performs sentiment analysis using Cortana Text Analytics and ranks it based on the sentiment analysis. It then stores the feedback data in the MS Dynamics CRM.
Azure Functions help in building functions in the cloud using serverless architecture that provides on-demand scalability and pay-per consumption.
This model lets the developer focus on the functionality rather than on infrastructure provisioning and maintenance. More integrated and efficient DevOps processes help in building features faster and creating a reduced time to market. It provides per action/resources consumed billing, resulting in better pricing as well.
Azure Functions are a great fit for scenarios where data needs to be processed, images need to be processed, event-based processing is performed, integration with other systems is performed, you expose your products as microservices, and you need tasks like batch jobs that run on a schedule, using backend applications for mobile application and web applications, IoT Event Processing, etc.
Azure Functions include triggers, and input/output bindings. Azure Functions include built-in triggers for HTTP Requests, batch jobs (timer), and processing messages when it gets added to a storage queue.
It provides integration with a number of Azure services in addition to third-party services like Azure Event Hub, Azure Event Grid, Azure CosmosDB, Azure Notification Hubs, Azure Service Bus, Azure Storage, etc.
Use Case Examples:
- IoT backend: Messages from devices are sent to Stream Analytics, which in turn invokes an Azure Function. This function can further process the message and store the output in a database.
- SaaS-based application activity: A data file uploaded in OneDrive can trigger an Azure Function which can add additional analysis to the file.
- Backend for web applications and mobile applications: Azure Functions can be invoked to do a lot of backend processing for mobile and web applications.
Some Sample Use Case Scenarios That Use Azure Functions and Azure Logic Apps Together
- Logic Apps applications invoke Azure Functions to process complex data processing requirements.
- An Azure Function that listens to a queue can invoke a logic app.
- Azure Functions can be used to execute custom code which can be invoked from Logic Apps workflows.
Opinions expressed by DZone contributors are their own.