IoT Edge Module to Module commuincation using API calls

Dhanavath Vishnu 366 Reputation points
2022-12-11T15:05:16.067+00:00

Hi Community,

we are developing an IoT edge device, which is having multiple modules run, in that one-off is Backend API module(module1) and another one is front end angular module (module2). The Backend API module host multiple API's , those will be query by the front-end module. What is the best messaging routing mechanism, I can use in this scenario on IoT Edge runtime?

However, I have tried API call by module name from module 2 to module 1 Ex: http://module1:80/api, but I am not getting the expected output, the frontend module showing empty output data.

Is this the right method to do so? any suggestions are welcome, thanks your valuable time.

Azure IoT Edge
Azure IoT Edge
An Azure service that is used to deploy cloud workloads to run on internet of things (IoT) edge devices via standard containers.
598 questions
Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,271 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sander van de Velde | MVP 36,756 Reputation points MVP Volunteer Moderator
    2022-12-11T23:23:23.893+00:00

    Hello @Dhanavath Vishnu ,

    I understand you want to communicate from the non-azure-iot-edge module (running an angular website) to another module being part of the regular Azure IoT edge routing mechanism.

    Instead of trying to connect to these inputs (being secured using TLS communication and only trusting known modules), I suggest a number of solutions that are easier to manage and simpler from architecture:

    • Expose an eg. SignalR / Websocket endpoint on the angular module and let the IoT edge custom module connect as a client and act as bridge
    • Let the iot edge custom module expose an eg. signal-R / WebSockets / MQTT / HTTP / UDP protocol server and let it act as bridge
      • Try to build your Angular website module and create a Module client based on one of the Azure IoT Edge SDKs and route directly (you do not need a second module)
      • Your angular module could behave like a child Azure IoT device.

    Using these possible solutions, you bridge two worlds (separation of concerns) and you are in full control of the security needed for this.


    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.