dapr / components-contrib

Community driven, reusable components for distributed apps
Apache License 2.0
548 stars 480 forks source link

Areas that Dapr may be able to serve the IoT community/market (which is growing fast). #3611

Open georgestevens99 opened 16 hours ago

georgestevens99 commented 16 hours ago

After a deep dive into the Azure IoT realm last fall and winter consisting of lots of reading, I'd like to show you areas where Dapr may fit into the Azure suite of IoT services.

The Azure Well Architected Framework has an excellent set of articles on IoT best practices at https://learn.microsoft.com/en-us/azure/well-architected/iot/iot-overview. There is a must read list of the Azure Technologies involved a few pages into that article sketched below. As you will no doubt discover, Dapr could play a key role here without massive amounts of work. This market is quite big, which is why Microsoft has invested heavily in it, creating a bunch of technology which is fairly mature by now!

o Here is a great diagram of how Azure IoT Technologies fit together as "architecture layers": https://learn.microsoft.com/en-us/azure/well-architected/iot/iot-overview#iot-architecture-layers.

o Here is a list of the various services in the Azure IoT Suite: https://learn.microsoft.com/en-us/azure/well-architected/iot/iot-overview#core-layers-and-services. Here are key quotes from that link.

"The IoT core layers and services identify whether a solution is an IoT solution. The core layers of an IoT workload are:

Azure IoT Hub Azure IoT device SDKs Azure IoT Edge IoT Hub Device Provisioning Service (DPS) Azure Digital Twins Azure Sphere."

Also of interest is Azure Stream Analytics, which uses an SQL like language to perform on-the-fly analyses of event streams in the Azure Event Hub (one of which is provided with the Azure IoT Hub). https://learn.microsoft.com/en-us/azure/stream-analytics/stream-analytics-introduction.

Here is my current view on places that Dapr could possibly fit in to the above Azure IoT Suite.

  1. Enhance the current capabilities of Dapr subscribing to events in the Event Hub that is provided by the IoT Hub. We need to fully support that, including message headers re Issue #3570. And it would be useful to have a code sample of this.
  2. Can Dapr be used by an App running on the Edge on on-prem to publish Device-to-Cloud messages to the IoT Hub, or any other messages supported by the IoT hub? This would likely be an app running on an Edge server in the field that talks to the IoT hub.
  3. Does it make sense for Dapr in a cloud app to be able to send Cloud-to-Device messages to a device through the IoT Hub? This is kind of like Service Invocation, but aimed at a device via the IoT Hub.
  4. Note that Dapr is able to receive messages from Azure Stream Analytics (ASA) in the form of numbers analyzed by ASA from the Event Streams in the IoT Hub's Event Hub. ASA can publish to the Azure Event Grid and Service Bus, to which Dapr can subscribe. It would be useful to have a code sample of this.
  5. Is there a role that Dapr can play on the IoT Edge? IoT Edge is a runtime package that runs containers to control devices and also communicate with the IoT Hub. The IoT Hub and IoT Edge are designed as collaborators. Does Dapr fit into IoT Edge anywhere? IoT Edge has a "Bring your own code" capability" at https://learn.microsoft.com/en-us/azure/iot-edge/about-iot-edge?view=iotedge-1.5#bring-your-own-code.
  6. Also note that IoT Edge runtime can be installed on K8s (AKS) as of May 2024! https://learn.microsoft.com/en-us/azure/iot-edge/how-to-install-iot-edge-kubernetes?view=iotedge-1.5 Is there a role that Dapr can play here, since Dapr is so well adapted to K8s. Again, a code sample would be helpful to those exploring this area for the first time.
  7. I do not see an immediate role for Dapr in Device Provisioning Service or Azure Sphere.
  8. Finally, Digital Twins and Time Series Databases are being rather heavily used in the Smart Buildings area (which is a strong growth area), as well as other Smart Things. This is an area for some one to research to see if Dapr fits in here.

The key question is how much is it worth to the Dapr community to support the above kinds of scenarios for IoT. Taking on a new partner or two that are already working in the IoT realm would help a lot in many ways.

In any event, at least now the Dapr community has a list of areas to get started in exploring the Azure IoT realm. HTH.

georgestevens99 commented 3 hours ago

Please keep in mind that in the broad area of IoT (both heavy industrial (OPC UA & Azure IoT Operations) and industrial (Azure IoT Hub/IoT Edge)) the elephants in the room are the Gartner Magic Quadrant Leaders. For 2024 they are AWS, Azure and Software AG in that order. You can search for this phrase on google to see the exact rankings.

georgestevens99 commented 3 hours ago

Do I need to move this issue to dapr/dapr? Please let me know.