Replies: 6 comments 1 reply
-
There is nothing stopping you from communicating directly to the device service (it exposes a HTTP api on SERVICE_HOST:port), though the preferred approach is to use core-command. Moreover, the "/core-command" URL above suggests that you are communicating with the API gateway instead of the core-command service directly (core-command also exposes a HTTP api on SERVICE_HOST:port). So the flow you are exercising is API-GATEWAY -> CORE-COMMAND -> DEVICE-SERVICE. (The API gateway listens on the external network interface.) I would start working backwards to see where the problem is -- can you connect directly to the device service and issue your command? Then connect directly to core-command services and issue the command (without /core-command prefix), then go through API gateway. I suggest network connectivity is broken at some point in the flow. The purpose of the API gateway in the reference design is that the API gateway separates the external/off-box callers from the internal/on-box callers. If the caller is already sitting on the internal network, then there is no need to use the API gateway; rather, it should call the service it wants to communicate with directly. The out-of-the box scripts for EdgeX only support single-node operation. (There is also an example helm chart in edgex-examples that supports local cluster operation, and also an example that uses an SSH tunnel to remote a single device service.) But these are examples. In general, if you want to distribute EdgeX device services arbitrarily, designing a secure network to be able to distribute EdgeX components is the adopter's responsiblity. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your answer. I'm not sure we talk about the same case. I want to build a smart device as proof that we can use this platform in production. This is not a complex device. It will have 2 sensors and one activator. But located it will be in the office network. So they are no access from outside. This is a private network and it will be protected by a firewall. At the same time, the rest of the services will be in the cloud outside our network. So they are no way how we can make HTTP calls from the cloud to the device directly. Do you have another way how the device can receive commands from the platform? For example MQTT, ZM, nats Redis, etc? I mean cases when the device will initialize connection first and use it as a transport. |
Beta Was this translation helpful? Give feedback.
-
Perhaps you could write a proxy device service to run on the cloud side that did some kind of protocol translation that will allow you to cross the arrow labeled "transport"? |
Beta Was this translation helpful? Give feedback.
-
What about version 3? Do you have mentioned this use case in a new version? |
Beta Was this translation helpful? Give feedback.
-
One additional question to this topic. The "core-command-go" service has the status "Public archive" and the last contribution was in 2018. But at the same time, I see that it is in use. Is this mean that his responsibilities will be transferred to another service? What plans in this direction? |
Beta Was this translation helpful? Give feedback.
-
Thanks for your answers. I need some time for the investigation source code of "monorepo". |
Beta Was this translation helpful? Give feedback.
-
First of all, I want to say that I am happy that you build such a service on Golang. I will happy to come as a contributor in the future.
I started investigating EdgeX about a week ago. I planned to adopt this tool in our company. And currently, the main blocker for me is clear documentation.
For example, I stuck with the next problem. I want to use all services except my device on the cloud. When I try to make call
GET /core-command/api/v2/device/name/Demo/GetCameraMetaData
I see 500 status error asService.Host == "localhost"
on my device. So for me obviously that should be an alternative solution instead of a direct HTTP call but I can't find it.So my question: How I can set or read properties on my device in a private network?
Beta Was this translation helpful? Give feedback.
All reactions