SoftwareOne logo

Azure cloud apps - How to build a delivery tracking platform

SoftwareOne blog editorial team
Blog Editorial Team
An aerial view of a snowy road with cars driving on it.

Getting an exact asset location can help organisations determine their plan of action, prepare for the delivery to arrive and spot bottlenecks on the way that can be avoided in the future.Using Azure cloud services, we managed to build a simple tracking platform that will collect data and display the shipment position in real time. In this article, we will explain how to do this.

Why build a delivery tracking app in the cloud?

A platform for tracking assets in real time can be useful for businesses operating in a number of different sectors. We can only imagine how many companies would benefit from that solution.One example would be monitoring shipments. Let’s take a logistics company that urgently needs to verify the current location of a container that has to be transported from one country to another. With an asset tracking platform, they could check the location in a split second.A construction company is another example. With multiple buildings under construction, it would be much easier for them if they could track the current position of trucks with materials they are waiting for.In this article, we are going to talk about Azure cloud services that you can use to build a simple yet effective tracking platform for your assets.Additionally, we will go through a real-life business case.

Which Azure cloud services can help you track assets in real time?

When we think of a platform for live data exchange and collection, we imagine a challenging and time-consuming process. We can go through it more smoothly with the help of Azure cloud services. Here are the components we used.

Azure Event Hub

As you have probably guessed, tracking the location of shipments involves the collection of huge amounts of data.If we want to monitor data that is collected by a mobile application, we have to use the right event ingestion service. And this is where Azure Event Hub comes into play. This service makes it possible to receive and process millions of events per second.We can also use Event Hub in device telemetry streaming, application logging, or live dashboarding.As Azure Event Hub provides integration with other Azure services, collected data can be processed and used for further analysis.

Azure IoT Hub

Another service that can be of help when collecting data from IoT devices is Azure IoT Hub. We can use it to integrate with IoT devices that are responsible for collecting data from different parameters like location or temperature.

So, what is the difference between Azure IoT Hub and Event Hub?

When it comes to Azure IoT Hub, it acts as a central message hub for bi-directional communication between IoT applications and the devices it manages. Event Hub, on the other hand, does not allow you to communicate back to the source device.Azure IoT Hub also provides integration with Azure services, so we can process and use the collected data for further analysis.

Azure Functions

Another service that you can use to build your tracking platform is Azure Functions. They are very useful in creating automatic triggers for specific tasks. For example, calling another Azure service when a file in an Azure Storage Account is deleted.Azure Functions can also be a good idea when you want to integrate with Azure IoT Hub to process data in real time and to pass it to the Azure services.

Azure SignalR Service

Azure SignalR Service allows you to push content updates to connected clients, such as a single web page or mobile application.This service can be used for any application type that requires real-time content updates.You can use SignalR for real-time IoT metrics, live chat rooms, or transportation status updates.

Azure Maps

As we have raised the topic of location data, we should not forget to mention how you can display them on a map. You may like to use Azure Maps to achieve that.This Azure service provides a collection of geospatial services and SDKs that use fresh mapping data to provide geographic context to web and mobile applications.You can also use Azure Maps service for a number of different purposes like displaying real-time traffic information, creating and rendering maps based on private indoor map data, or locating addresses and other places of interest around the world.

Azure Web App

For hosting web applications and web APIs, Azure provides a great service called Azure Web Apps.It provides an easy and secure way to host modern web applications as well as web portals.The service offers support for multiple languages and frameworks like ASP .NET Core or Angular.

Let's build our application!

Now we can discuss a practical example in which Azure services can be used for asset tracking.We did a Proof of Concept (PoC) for one of our clients to provide a real-time location of trucks with materials destined to different places.Before we explain how we managed to do this, let’s look at the map below. It shows how the platform identifies and displays the truck position:

How to connect these services to build an Azure-based real-time tracking app?

As every driver has a mobile device, the best option for our client was to use a mobile application to send live location data. This way we also reduced the potential costs of buying dedicated IoT devices to collect information about the location.Then, we installed an Android application for collecting the required data. To make it even more efficient, we made use of the Xamarin platform that enables the implementation of mobile apps using a shared code base.To gather data from the app, we used Event Hub. Thanks to this service, we made it possible for the solution to ingest a big amount of location data. We easily integrated it into the application, as Event Hub provides .NET C# SDK for that purpose.Our goal was to display real-time location data in a web portal. We managed to do this with the help of Azure Functions and Azure SignalR Service which pass the data from the Event Hub to the web application.Then, we used Azure Web Apps to host a web portal. The service provides a flexible way to deploy and manage web applications.In order to secure access to the platform, we used the Azure Active Directory identity service and Azure Application Insights. This way, our client can quickly detect and mitigate potential issues.The diagram below presents the solution we created:

Summary

Now you know that checking the real-time location of your assets requires just a few services. The benefits are definitely worth a try. After all, technology makes anything possible!The platform we built has a simple structure, and we based it on Azure services. This pattern can be recreated and adapted to any other business. Feel free to contact us if you are about to build up your own platform and need some advice. We will be happy to give you some guidance!

Author

SoftwareOne blog editorial team

Blog Editorial Team

We analyse the latest IT trends and industry-relevant innovations to keep you up-to-date with the latest technology.