What The Hack - Traffic Control with Dapr

Introduction

This hack contains several hands-on challenges that will introduce you to Dapr. You will start with a simple ASP.NET Core application that is composed of several microservices. In each challenge, you’ll enhance the application by adding Dapr building blocks and components. At the same time, you’ll configure the application to consume Azure-based backing services. When complete, you’ll have implemented the following Dapr building blocks:

As Dapr can run on a variety of hosts, you’ll start by running Dapr in self-hosted mode on your computer. Then, you’ll deploy the Dapr application to run in Azure Kubernetes Service.

Learning Objectives

The challenges implement a traffic-control camera system that are commonly found on Dutch highways. Here’s how the simulation works:

Speeding cameras

There’s 1 entry-camera and 1 exit-camera per lane. When a car passes an entry-camera, a photo of the license plate is taken and the car and the timestamp is registered.

When the car passes an exit-camera, another photo and timestamp are registered. The system then calculates the average speed of the car based on the entry-cam timestamp and exit-cam timestamp. If a speeding violation is detected, a message is sent to the Central Fine Collection Agency (or CJIB in Dutch). The system retrieves the vehicle information and the vehicle owner is sent a notice for a fine.

Challenges

Repository Contents

Contributors