How to build a simple IoT Edge Version 2 Heartbeat Module


Recently, the Microsoft Azure IoT Edge platform was updated with more features, better documentation and lots of goodies.

Yes, the learning curve of this new version is steep, especially if you are new (like me) to Docker. But once you just have started building your own Edge solution, things seem to fall into place.

A logical flow seems to be described in the Microsoft documentation:

  1. Simulate an IoT Edge device in Windows
  2. Simulate an IoT Edge device in Linux
  3. Develop and deploy a C# module
  4. Deploy Azure Stream Analytics as a module
  5. Deploy Azure Machine Learning as a module
  6. Deploy Azure Functions as a module

Looks easy, doesn't it?

But reading the comments, people are still confused.


Version one is based on one executable (gw.exe) which injects classes from DLL's (a configuration file has to be supplied). Modules are just classes in the DLL's.

Version two is based on Docker Containers, each module is a separate container and therefore each module is a separate executable. These modules share the same logic to connect to a message bus which provides the routing. This 'runtime' has to be installed on the Edge machine, next to/outside the Docker containers.

Note: the good thing is that the architecture still stands, multiple modules on top of a messagebus and messages are routed. The better thing is that the routing is now far more intelligent. And Microsoft has provided some guidance for migration

After that, work your way through the documentation provided above, and check out my recent blogs:

OK, I know, the learning curve is still steep. How about a full example of a simple module?


The full article can be found here

The source code of this module is available on Github

The module is available for download as a Docker image

0 Replies