In store Internet of Things (IoT) analytics is a key area for retail organisations. The nature of retail stores and the importance of maximising investment of staff and retail space makes this one of the leading areas in the IOT space. However, getting started can seem daunting for many IT teams: “What equipment do we need?” , “How do we collate the IoT data streams?”, “What should we measure?”. This post introduces a Microsoft Cloud (Azure) based GitHub IoT project which acts as an end to end example of an IoT in store analytics implementation as well as demonstrating how Azure PaaS (Platform as a Service) Services can be used to quickly implement Enterprise class IoT solutions.
If you want to get straight into the project it’s available on GitHub as “Azure PaaS Implementation using Lambda Architecture of Cisco Meraki In-Store Location Analytics“. The project is fully documented and self contained.
Overview of Solution
Almost any public place can become a “smart building“, retail stores, universities, hospitals can all benefit from implementing IoT devices & sensors. This particular solution solves a common retail IoT problem which can be expressed as:
“Provide a chart of customer footfall in real time across selected areas in store”
However, although that specific issue is addressed this solution more broadly demonstrates the art of the possible in IoT Analytics on Azure. The implementation can be extended to apply to any building equipped with WAPs (Wireless Access Points) and a number of analytics objectives including:
- Staff Optimisation
- Store Layout Optimisation
- Product Recommendation
As well as many other advanced use cases. The project delivers an end to end Azure based solution for IoT analytics from initial capture of events via the in store WAPs, real time analysis of the event stream, archiving of events onto a persistent storage layer and finally visualization of the real time & historical combined results. Throughout, Azure PaaS services (in conjunction with Cisco Meraki Cloud) are used to provide a scalable, robust, extensible IoT analytics platform.The outcome of the solution is the result shown below, a foot fall chart operating in real time:
Note: Azure PaaS & Cisco Meraki Cloud – Azure PaaS and Cisco Meraki cloud are the 2 main technology stacks used in this solution. Cisco Meraki Location Analytics displays real-time location statistics to improve customer engagement and loyalty across sites, and is built in to Cisco Meraki Access Points with no additional cost or complexity.
Cisco Meraki does offer some insights out of the Box, however, this approach extends more in-depth analysis by having the flexibility to correlate other data sources on top of events data for richer / deeper actionable insights. Also, this solution can be extended to in-corporate other Vendors similar to Cisco Meraki in similar fashion.
Azure PaaS Services are part of the Microsoft Azure cloud platform. They offer robust and extensible capabilities which are cloud first in design, meaning they are scalable, serverless (no patching or maintenance of VMs is required) and typically operate on a “pay as you go” model.
The diagram below gives the high level architecture for the approach, which follows the established Lambda Architecture. Briefly, this architecture approach divides data processing into “speed” (near real time) and “batch” (historical, cleansed, aggregated) layers. This design is well established and is a relatively common implementation pattern on Azure.The general workflow is as follows:
Note: This solution comes prepackaged with sample Cisco Meraki event data which is sufficient for end to end testing & evaluation. However the solution can easily be integrated into a working Meraki installation.
Cisco Meraki tracks events as customers/visitors move around the building – each customer will lose one Wireless Access Point & acquire another and this loss/acquisition translates into movement around the building. These events are passed in real time (1) to Azure and collated using an Azure Event Hub instance (2). In turn, the event hub forwards the events to Azure Stream Analytics, the azure real time event processing engine which can operate on individual events or aggregated events over a rolling time window. Stream Analytics workflow
Following the Lambda architecture the Stream Analytics engine now routes its output to the “speed” (5) & “batch” (4) processing streams. In the “batch” stream events are captured for historical analysis on both Blob storage and an Azure SQL Database instance – from here, events can be cleansed, merged with other data or aggregated for further analysis.Meanwhile the output of the real time analytic processes is also forwarded directly to a Power BI Dashboard. Here it be displayed as a real time data stream however it can also be combined with data from the historical store (6).As mentioned above, the outcome is a real time chart showing footfall for the selected area in the building.
Deployment & Outcome
As mentioned the GitHub solution is fully self contained and documented. It includes all necessary code, sample “real time” Meraki Cloud data and provides step by step deployment guidance.
The upfront requirements (Azure subscription, Power BI etc) are listed in the documentation. At the end of the deployment (which should only take a few hours) you’ll have a full end to end Lambda compliant Azure Cloud based IoT solution. You’ll also have worked with some of the key event & IoT processing engines within Azure as well as the Power BI visualization tool. Together this should provide a solid foundation to build richer and more complex IoT analytics as outlined in the introduction.