We're considering AWS IoT for an upcoming project featuring devices with unreliable network connections. One requirement is to send commands to devices. The commands must be reliably delivered (ack'd) and the devices should also signal success/failure when the commands are completed later. It seems that just publishing commands to an MQTT topic won't ensure the message gets delivered, given that AWS don't support persistent sessions - is this right?
We've been speculating about poking the command into an array of commands inside the device shadow's 'desired' state. The device could then ack receipt of the command by replicating the command in the shadow's 'reported' state, and report success/failure by setting an outcome field within the command in the 'reported' state.
Given our lack of experience with AWS IoT, does this seem like a sane approach? Or can anyone see anything neater? One nasty thing about this is that the shadow accumulates completed commands, which presumably means that I will eventually need some kind of housekeeping to remove the completed commands to keep the shadow to a reasonable size.
Finally, does anyone know how clever the bandwidth use is - if my server adds an element to an array of one hundred elements nested deeply inside the 'desired' state, how much data actually flows over the wire? And similarly when my device moves the element into the 'reported' state.