Understanding Azure Logic Apps
- Azure Logic Apps is a managed service that is based on Azure Serverless architecture and provides a very simple way to integrate various cloud/on-premises applications, going from Azure and Microsoft services over SaaS applications, and social media to LOB Systems.
- Logic Apps are based on Serverless architecture. That means no server planning is required.
- It comes with drag & drop developer experience.
- It comes with around 175+ connectors for expansion. This includes everything from receiving an email to monitoring a Twitter Feed to monitoring a Facebook Feed to sending a text message.
- Logic Apps also gives you rich monitoring and logging functionalities out of the box.
- No additional coding is needed in order to track inbound and outbound messages.
- Logic Apps also integrate seamlessly with other Azure features such as Hybrid connections, Azure Service Bus and API Management.
- By using multiple connectors in your Logic App and integrating it with other Azure features, you can build a very powerful solution.
- As we mentioned, a Logic App is built on top of a serverless architecture that means when we are designing the Logic Apps we do not have to plan for the capacity of servers on which those solutions are going to run. We simply deploy the solution and the platform will make sure there are enough resources to execute our solution given our load.
- Again, as per serverless architecture, our Azure Logic App will have auto-scale based on demand, as we have mentioned before there is no capacity to plan, it also means that scaling is done automatically based on demand. As our load increases, Azure will automatically add additional resources to our solution to ensure that solution ioperates as expected.
- The serverless architecture also provides high availability. That means we also don’t need to plan for fault tolerance in our solution because the platform itself will take care of us.
- Also, we would be charged for the consumption of the resources that we actually use. So, if we deploy our Azure Logic App and only send one message or one notification in the month, we are only charged a few cents for actually processing and sending that message.
Roles of Logic Apps
- Logic Apps can be used for connecting cloud-based systems. If you have multiple vendors which are running in the cloud and you want them to integrate with each other, Logic App would be the most useful technology. There would be actually no need to bring in data back to your data center and simply send it back out again.
- Logic Apps can also be used to bridge connections from on-prem resources to cloud resources.
- Logic Apps also provide Enterprise grade connectors for IBM MQ and SAP. They also have business-to-business support in the form of AS2, x12, and EDIFACT.
Designing and Deploying of Azure Logic Apps Two designer options available to get started with Azure Logic Apps. Web-based Designer,
- It is a rich, graphical interface hosted inside Microsoft Azure portal.
- Using web-based designer, you have easy access to building all your Logic Apps plus you have easy access to your API connectors and all other Azure resources since you’re already there inside the portal.
- On saving the Logic app, we have access to go back and see past version of the Logic app and at any time promote a new Logic app to be the current Logic app.
- You can also easily clone the Logic app and move them to new subscriptions.
Drawbacks
Your code lives inside the Azure portal. It is possible to download the Logic app file and check it into source control, this can be a tedious process using the web-based designer.
Also migrating from environment to environment, ensuring username and passwords are entered correctly for your connections can be challenging.
The second designer option is Visual Studio 2015 & 2017 Plug-In.
- The plugin is available for both Visual Studio 2015 and 2017.
- This is the most popular choice as it is closer to enterprise standards in terms of development.
- You have full access to be able to check your Logic Apps into your source control tool.
- You can also easily deploy your Logic app directly from Visual Studio. This is most useful and beneficial while doing development and testing.
Drawback
The Visual Studio plug-in tends to lag behind the features of the web-based designer by one or two weeks. So, if there is a new feature which is recently released chances are there will be a delay before that’s available in the Visual Studio designer.
Deployment
- We have a few different options for deployment.
- The First one is promotion using the web designer: The Web designer allows you to clone your Logic app and move it from one subscription to another. So, you can move it from dev to test and then into prod. Once you move your Logic app you will have to go to individual subscription and must manually update connection string and other resources. – a bit tedious.
- The second option is to use Azure Resource Management templates (ARM). This is used in combination with PowerShell to have an automated deployment process. This can be done very easily if you’re using Visual Studio for your development. This is because the Logic Apps already exist inside of an ARM template. All you have to do is simply create the PowerShell script for the deployment. Visual Studio designer will also have a parameter file where you can easily set username and passwords and set up different parameter files for different environments. This gives you a consistent repeatable deployment option that isn’t available using web designer.
Building Blocks of Logic Apps Connectors
Connectors are pre-built wrappers around systems to simplify interaction with those systems. Basically, the connector is just a front-end which encapsulates other APIs that make interaction with those systems as simple as simply entering a username, password and defining the data you will expect to come in and out of that call. The Logic app at that point becomes a connection point for tying many different connectors together in order to achieve your desired solution. There are over 175+ connectors that cover monitoring features in Azure to Google Calendar or Google contacts. You can build your own connector also. In addition to the out-of-the-box connectors, there are some premium business-to-business connectors that become available when you start working with integration accounts. These are connections to IBM MQ and to SAP systems. If you need connections to either of these, there is an additional charge for using the integration account to get access to these connectors.
Triggers
Triggers are used to initiate a Logic app. There are two main types of triggers. Reactive and Proactive. In addition to having reactive and proactive triggers, there are four main types of triggers.
- Recurrence Trigger
This is a time-based trigger that is set to execute Logic app on a specific time interval.
- Polling Trigger
This is the case where you would set up a trigger to pull a certain endpoint at a given time interval. An example of this is if want to monitor salesforce.com for changes to data on their system, you would set up a polling trigger using the Salesforce connector to accomplish this.
- Event-based Trigger
Logic Apps can be triggered by events that occur in Azure, such as a message being written to the Service Bus queue.
- Webhook
You can expose Logic app as a webhook and allow them to be called by HTTP endpoints.
Actions
Actions are the building blocks of a Logic app. Most actions are also connectors. Action can be thought of as a next step in the Logic app. The Action can be comprised of one of the 175 connectors or it can simply be internal function calls or other flow control Logic for your workflow.