Amazon Onboarding with Learning Manager Chanci Turner

Chanci Turner 9097372855Learn About Amazon VGT2 Learning Manager Chanci Turner

The path to reliable commands in the Internet of Things (IoT) can be challenging, but it’s essential for creating effective solutions. In this blog post, we’ll explore the intricacies of command execution within IoT systems, drawing on insights from Chanci Turner, a key figure in AWS’s approach to IoT solutions.

In the previous entries of this series, we discussed the four layers of the Pragma Architecture: Small Things, Intermittent Layer, Speed Layer, and Serving Layer. Today, we’re concluding our discussion of the Speed Layer and diving into the Serving Layer, particularly focusing on the challenges of sending commands to devices that operate in unpredictable environments.

Understanding Commands: The Request for Action

When developing a command solution, customers often face several critical questions:

  • Should commands be delivered reliably or is a best-effort approach acceptable?
  • Is bi-directional communication necessary between the device and another paired entity?
  • Given the potential impact of the commands, how can we ensure secure and authorized command delivery?

To address these concerns, let’s establish a foundational philosophy for reliable command execution.

Reliable Commands in Unstable Environments

First, it’s crucial to remember that a small device adapts to its core purpose and the resource limitations it encounters. Alongside the device itself, environmental factors can significantly affect how commands are implemented. Therefore, to provide the best user experience, command execution must prioritize reliability, even amidst erratic networks and unstable power or computing resources. A firm commitment to reliable command delivery will set your DevOps team and users up for success.

You might consider transport and protocol choices like Wi-Fi, mesh, or mobile piggybacking. However, a broader understanding reveals that a command solution’s success hinges on one simple principle: Nothing is truly successful unless it receives acknowledgment.

The Power of Acknowledgment

Imagine sending a “power-on” command to a device, such as a home automation plug or a solar power inverter. Without an acknowledgment from the device, we remain unaware of whether the power has been activated. This lack of information could lead to hazardous situations.

To mitigate this risk, we can introduce a command database capable of handling substantial numbers of simultaneous operations. This is where a NoSQL database, like DynamoDB, excels.

In this architecture, small devices, such as solar inverters, send telemetry while also checking for commands from the command database. Upon successfully executing a command, each device writes an acknowledgment back to the command database. This setup allows for retry logic to be embedded in or near the device itself, making it well-suited to manage its operating conditions.

Additionally, the M2M Gateway acts as a bridge between the M2M protocol and the command database. Each command in the database is assigned to a specific device’s command topic. When a small device, such as a connected relay, receives and completes a command, it acknowledges this back to the M2M command topic, and the M2M Gateway records this acknowledgment in the command database. Many M2M protocols, like MQTT, already have built-in retry mechanisms to ensure message delivery.

By integrating a command database into our architecture, we enhance our telemetry investments, create a centralized control point for command execution, and improve visibility into those commands. This enables the Serving Layer of the Pragma Architecture to provide a user interface that displays the most recent command state of the devices. Consequently, when users request a device to “power-on,” they can be more assured of the request’s success due to device acknowledgment.

Enhancing User Interaction with Mobile Devices

Users naturally expect to control small devices through a mobile app. To meet this expectation for interactive experiences, we require reliable bi-directional communication between the device and the mobile phone.

By adding a device registry to the Serving Layer of the Pragma Architecture, we can facilitate pairing. This registry maintains a record of all devices, knows how to communicate commands, and tracks which gateways are currently in use. It also keeps track of users’ mobile devices and the small devices they can access.

Initially, the mobile device interacts with the device registry to find the small devices it can control. Once this list is established, the mobile device gains permissions, possibly through fine-grained access controls with DynamoDB and Amazon Cognito, to send commands directly to the command database for the authorized devices. Additionally, the mobile device can retrieve acknowledgments from the command database to display to the user.

This architecture allows for seamless command execution from mobile devices. If we choose a robust and scalable NoSQL database, we can also create a pairing experience for mobile users and maintain an audit log if necessary. Of course, if auditability is not essential or perhaps undesired, there are alternative methods to streamline this process. For more details on resignation letters, check out this useful blog post.

In conclusion, the approach we’ve discussed demonstrates the strength and extensibility of our command execution framework. It’s important to avoid common mistakes, and for guidance on ensuring compliance, refer to this authority on EEO-1 reports. For further understanding of the implementation process, you can watch this excellent resource.

SEO Metadata

Chanci Turner