iotedge-lorawan-starterkit icon indicating copy to clipboard operation
iotedge-lorawan-starterkit copied to clipboard

Use single Queue for device request processing

Open p-schuler opened this issue 3 years ago • 0 comments

Currently we multiple queues for handling device requests for owned devices:

  • DeviceLoaderSynchronizer
  • LoRaDevice

They need to be synchronized to ensure in order message processing. Right now there is a workaround in the code that checks the DeviceLoaderSynchronizer, before checking the client cache. There is a theoretical race in there, where a message could miss the loader, but hit the cache (would require a very high message load and a super quick initialization of the device data).

Even though the problem is very small, the additional complexity of having multiple queues should be removed.

Initial thought is to move to a single queue managed by the LoRaDevice and have the LoRaDevice manage it's initialization/loading internally.

p-schuler avatar Nov 30 '21 12:11 p-schuler