Blog

Let your applications simply communicate with each other: Azure Functions and Azure Service Bus explained

How to simply make applications communicate and exchange data with each other? In this article, we will take you through Azure Integration Services that could potentially help you when you want to get your applications to communicate with each other. We will do this by diving into Azure Functions and Azure Service Bus, which we will discuss below.   

Published: 12 January 2024

Azure Integration Services  

First, a little background. For what exactly does Azure Integration Services entail?

Azure Integration Services is a collection of services for connecting cloud-based applications and on-premises applications.  These services enable synchronous and asynchronous communication between applications, as well as support for workflows. There are several solutions for this, in which Azure Integration Service offers a variety of possibilities.   

  

Azure Service Bus is a reliable messaging service within Azure. With it, applications can be decoupled from each other, and scalable architectures can be realized.   

Azure Functions is a serverless computing platform within Azure. The focus with serverless is on writing the code, Azure provides fast and scalable execution. Azure Functions can easily interface with Azure Service Bus and respond to new messages coming in.   

  

Processing asynchronous messages  

Cloud Adventures is a fictional company that sells trips to the moon and beyond. These trips are operated by a third party. Therefore, the Cloud Adventures webshop has an integration with this party and while buying a trip, the booked trip is forwarded. When this is done successfully, the user receives an e-mail confirming his booking. To send this e-mail, integration with a third party is also needed.  

Overview of relevant Azure Resources 

 

Using Azure Service Bus and Azure Functions, the integrations with the third-party providers are achieved. With each booked trip, a message is placed on a queue in the Service Bus with all relevant information about the trip. The date of departure, how many people are going along, and which provider was chosen.   

  

The messages on the Service Bus are handled asynchronously by an Azure Function. When the volume of messages grows and the handler cannot keep up with it, more instances of the Azure Function will be started to collectively handle the messages. In this way, the solution scales automatically, according to set guidelines.  

  

When handling the message, an API of the third party is called. All communication with this party thus takes place in one place in the application. Something desirable from an architectural point of view. When the call to the api has been successful, a new message is placed on a second queue in the Service Bus. There is a second Azure Function that reads this message and emails confirmation of the booking to the user. For this, it communicates with the third party that takes care of sending the email.  

 

Costs 

In addition to the benefits of decoupled integration with third parties, using serverless solutions also has a cost advantage. There is only payment for actual usage. So if your code is not executed, because there are no messages to handle, then you will not be charged either. By the way, several models of hosting are possible here. 

 

Disadvantages  

There are also challenges to using Azure Functions and Azure Service Bus. For example, using several smaller services makes it more challenging to maintain visibility into operation. When errors occur, finding the cause is more complex. So, as always with Cloud Native software, building for Observability is something to consider from the get-go.  

 

Conclusion  

In this article, we have taken you through the question: ‘How to make your applications communicate with each other’. By using Azure Integration Services, it is possible to simply connect applications to each other. Whether these applications run in the Cloud or on-premises, fairly it doesn’t matter. We showed that Azure Functions and Azure Service Bus is a powerful and scalable solution for asynchronous communication with api's. 

Benieuwd wat we voor u kunnen betekenen?

Have you become curious?

Are you ready to take the step to the Cloud or accelerate on the Cloud? Then schedule an appointment or contact us.