dora-rs / dora

DORA (Dataflow-Oriented Robotic Architecture) is middleware designed to streamline and simplify the creation of AI-based robotic applications. It offers low latency, composable, and distributed dataflow capabilities. Applications are modeled as directed graphs, also referred to as pipelines.
https://dora-rs.ai
Apache License 2.0
1.5k stars 79 forks source link

Add a `--listen-addr` flag to `dora coordinator` command #521

Closed XxChang closed 3 months ago

XxChang commented 4 months ago

add an optional --listen-port flags to dora coordinator command. If user sets this flag, coordinator will open an external control port as same as inner control port. However, every ControlRequest will be convert to ExternalControlEvent different than ControlEvent .

Separate external ControlRequest from ControlEvent for security.

phil-opp commented 4 months ago

Thanks for the PR! Could you explain the motivation behind this feature in some more detail? It looks like the start command is not allowed on the new port, otherwise it seems to behave the same. What is the security advantage of this?

As a general note, I don't think that a mix of "local" and "external" commands will be common. Instead, I expect the following two setups:

XxChang commented 4 months ago

In order to reuse the ControlRequest::Start in remote machine, Coordinator should know where the local_working_dir are located in, either external or inner working_dir. I haven't figured out how to handle external working_dir, so I leave it alone.

That is we can reuse the same ControlRequest in two different manners according to the source of request.

In addition, dora-cli should work in both remote device and local device (cloud instance). Identify where the dora-cli request comes from is useful to filter out unauthorized request.

All these are the future features, I'm leaving that blank now, so it behave the same currently but not future.