Skip to content
Code samples that show best practices for building IoT solutions.
C# Scala PowerShell XSLT HTML CSS Other
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src normalize parameters in readme (#6) Feb 12, 2019
.gitignore Initial commit Jan 25, 2019
LICENSE Initial commit Jan 25, 2019
LICENSE.txt Initial commit Jan 25, 2019
README.md Initial commit Jan 25, 2019
architecture.png Initial commit Jan 25, 2019

README.md

Introduction

To explore the challenges of building an IoT application, we created a reference implementation called the Drone Delivery application.

Here is the scenario:

Fabrikam, Inc. runs a drone delivery service. The company manages a fleet of drone aircraft, and customers can request a drone to pick up goods for delivery. The drones send two types of telemetry:

  • Flight data: Latitude, longitude, altitude, velocity, and acceleration. Each drone sends this data once every 5 seconds.
  • Operating status: Engine temperature and battery level. Each drone sends this data once every 20 seconds.

We assume the drones support IP protocol and MQTT, and that the drones are are mostly-connected devices. That is, they send a constant stream of data while in flight, rather than batching data at intervals.

The following diagram shows the design of the application:

Diagram of the architecture

The architecture includes several data streaming paths that perform different functions:

  • Hot path. The hot path monitores the drones' operating status to detect anomalies in the engine temperature. It uses Azure Stream Analytics to compute the average engine temperature of each drone over a 2-minute window. Anomolous readings are stored in Cosmos DB and also trigger an alert. The sample application includes stub code for the alerts. You could replace this with code to send an SMS message or a push notification to a mobile app.

  • Warm path. The warm path uses an Azure Function to write the latest position data for each drone to Cosmos DB. The data can then be queried using geo-spatial queries. For example, you can query for all drones within a given area.

  • Cold path. The cold path captures all of the raw telemetry and then processes it using HDInsight. The sample application includes a Hive query that summarizes the pickup and dropoff times for each delivery, based on the location data from the drones. You can then use Power BI to explore and visualize the results.

Getting Started

TODO: Guide users through getting your code up and running on their own system. In this section you can talk about:

  1. Installation process
  2. Software dependencies
  3. Latest releases
  4. API references

Build and Test

TODO: Describe and show how to build your code and run the tests.

Provision and Deploy

Deploy the IoT Hub

On src/CloudGateway/IoTHubDeployment/azuredeploy.parameters.json edit iothub_name parameter value to specify the name of the IoT Hub.

cd src/CloudGateway/IoTHubDeployment

az group create -n <resource-group> -l <location>

az group deployment create --name <deployment-name> \
  -g <resource-group> --template-file azuredeploy.json \
  --parameters azuredeploy.parameters.json

Contribute

TODO: Explain how other users and developers can contribute to make your code better.

If you want to learn more about creating good readme files then refer the following guidelines. You can also seek inspiration from the below readme files:

You can’t perform that action at this time.