Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eCAL TCP Layer, attempt to resolve .local instead of just hostname [Link-local connection] #1531

Open
1 of 3 tasks
FlorianReimold opened this issue Apr 16, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@FlorianReimold
Copy link
Member

FlorianReimold commented Apr 16, 2024

I understand that in the current TCP mode, in order to use eCAL properly, we have to manually key in the hostname-IP mapping on the subscriber machine. This is pretty inconvenient for deployment to customers' machine.

I have tested on both Windows and Ubuntu Linux hosts. There is a good workaround potentially to make the TCP mode work without config.

The trick is that, althought hostnames are not resolved direclty, espically when there is not present of a router (e.g. direct ethernet cable connect of the host and edge machine), by adding the ".local" domain, the mDNS mechanism kicks and systems are able to resolve the hostname.

My suggestion is then:

  1. Make changes to the TCP pubsub behaviour, or at least make as a config setting, to fallback to .local domain, if the direct hostname could not be resolved
  2. This is actually the behaviour of "ping" command in Windows. Which is pretty neat.

Originally posted by @chengguizi in #1521

Roadmap

  • Add .local support for eCAL Services
  • Add .local support for FTP Uploads in eCAL rec client
  • Add .local support in tcp_pubsub
@FlorianReimold FlorianReimold added the enhancement New feature or request label Apr 16, 2024
@FlorianReimold
Copy link
Member Author

I started taking a look at this and implemented a first draft for eCAL Services. I didn't want to implicitely append '.local' from within the service lib, so I created an API that would not only get 1 possible endpoint but a list of them. If the first one wouldn't respond, the next one would be tried.

Unfortunately I cannot really test this at the moment due to technical reasons.

The current status can be compiled as follows:

git clone https://github.com/eclipse-ecal/ecal.git
cd ecal
git checkout feature/service_backup_domain 

git submodule init
git submodule update

cd ecal/service
mkdir build
cd build

cmake .. -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=../../cmake/submodule_dependencies.cmake -DECAL_CORE_BUILD_SAMPLES=ON -DCMAKE_BUILD_TYPE=Debug

cmake -build . --config=Debug
  • Start server: ./service_sample_server --port 1588
  • Start client: ./service_sample_client HOSTNAME:1588 HOSTNAME.local:1588
    This will make it first try to connect to HOSTNAME and then to HOSTNAME.local

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant