Thursday, October 17, 2019

Dynamic, real-time, predictable testing of Amazon Greengrass

Efficient testing of Amazon IoT Greengrass with lots of devices is difficult to
achieve, unless you use simulation techniques as everywhere else in

We setup a lab of 100 simulated sensors in MIMIC MQTT Simulator
publishing telemetry in real-time to one instance of Greengrass, simulating
an IoT edge scenario where telemetry is processed at the edge, without
needing to go to the cloud. Most of the telemetry is uninteresting, unless an
anomaly occurs, such as a temperature value above a certain threshold.

In this 2-minute Youtube video 10 of those sensors are started, and monitored
by a subscriber application based on NODE-RED. You can see how it
tracks the temperature and light values of the sensors. We dynamically
and predictably create the anomaly in a matter of seconds.

Then we expanded the number of active sensors to 100, but the NODE-RED
application would not easily show the number of sensors on the graph
(even 10 cannot be definitively shown, and 100 hung the app).

So, we wrote a small Python MQTT subscriber client, which monitors each
sensor reported at the Greengrass local shadow, and displays the number
of sensors detected, and whether any of them exceeds the arbitrary
threshold (our anomaly).

This 2-minute Youtube video shows the interesting parts of the setup,
and the successful completion of the test.

When testing with Greengrass, make sure to use MQTT simulation to
verify your application.

No comments: