{"id":27301472,"url":"https://github.com/eprosima/discovery-server","last_synced_at":"2025-04-12T01:46:11.183Z","repository":{"id":42998914,"uuid":"183609932","full_name":"eProsima/Discovery-Server","owner":"eProsima","description":"Tests for Fast DDS Discovery Server. Looking for commercial support? Contact info@eprosima.com","archived":false,"fork":false,"pushed_at":"2025-04-07T13:32:01.000Z","size":1223,"stargazers_count":26,"open_issues_count":4,"forks_count":7,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-07T14:22:47.189Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eProsima.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license/LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-26T10:34:09.000Z","updated_at":"2025-04-07T13:31:52.000Z","dependencies_parsed_at":"2023-01-27T15:16:34.837Z","dependency_job_id":"aedca4b9-6d07-4ee5-961e-82c76fc92f13","html_url":"https://github.com/eProsima/Discovery-Server","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eProsima%2FDiscovery-Server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eProsima%2FDiscovery-Server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eProsima%2FDiscovery-Server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eProsima%2FDiscovery-Server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eProsima","download_url":"https://codeload.github.com/eProsima/Discovery-Server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248505949,"owners_count":21115354,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-12T01:46:10.572Z","updated_at":"2025-04-12T01:46:11.168Z","avatar_url":"https://github.com/eProsima.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eProsima Discovery Server\n\nThe [RTPS standard](http://www.omg.org/spec/DDSI-RTPS/2.3) specifies in section 8.5 a non-centralized, distributed,\nsimple discovery mechanism. This mechanism was devised to allow interoperability between independent\nvendor-specific implementations but it is not expected to be optimal in every environment.\n\n## Commercial support\n\nLooking for commercial support? Write us to info@eprosima.com\n\nFind more about us at [eProsima’s webpage](https://eprosima.com/).\n\n## Overview\n\nThere are several scenarios where the simple discovery mechanism is unsuitable, or it just simply cannot be\napplied:\n\n- A high number of endpoint entities are continuously entering and exiting a large network.\n- Networks without multicasting capabilities.\n- WiFi-based communication networks.\n\nIn order to cope with the aforementioned issues, the *eProsima Fast DDS* discovery mechanisms are extended with a new\nDiscovery Server discovery paradigm.\nThis is based on a client-server architecture, i.e. the metatraffic (message exchange among\nDDS DomainParticipants to identify each other) is managed by one or several server DomainParticipants (right figure), as\nopposed to simple discovery (left figure), where metatraffic is exchanged using a message broadcast mechanism like an\nIP multicast protocol.\nPlease, refer to\n[Fast DDS documentation](https://fast-dds.docs.eprosima.com/en/latest/fastdds/discovery/server_client.html) for\nfurther information about the Discovery Server discovery mechanism.\n\n![discovery diagrams][diagrams]\n\n[diagrams]: resources/images/ds_uml.png\n\nThe Discovery Server tool is developed to ease Discovery Server discovery mechanism setup and testing.\nThe **Discovery Server tool documentation** can be found\n[here](https://eprosima-discovery-server.readthedocs.io/en/latest/).\n\n-   [Supported platforms](#supported-platforms)\n-   [Installation Guide](#installation-guide)\n-   [Usage](#usage)\n-   [Example application](#example-application)\n-   [Testing](#testing)\n-   [Documentation](#documentation)\n-   [Getting Help](#getting-help)\n\n## Supported platforms\n\n* Linux\n* Windows\n\n\n## Installation Guide\n\nIn order to use the Discovery Server tool, it is necessary to have a compatible version of\n[eProsima Fast DDS](https://fast-dds.docs.eprosima.com/en/latest/) installed (over release 3.0.0).\n*Fast DDS* dependencies as tinyxml must be accessible, either because *Fast DDS* was build-installed defining\n`THIRDPARTY=ON|FORCE` or because those libraries have been specifically installed.\nThe well known cross-platform tool [colcon](https://colcon.readthedocs.io/en/released/) was chosen to simplify the\ninstallation of the several mutually dependent [CMake](https://cmake.org/cmake/help/latest/) projects. In order to use\ncolcon, [Python3](https://www.python.org/) and [CMake](https://cmake.org/cmake/help/latest/) must be first installed.\nDetailed instructions on how to install the required dependencies can be found in the\n[Discovery Server documentation](https://eprosima-discovery-server.readthedocs.io/en/latest/).\n\nTo execute the tests that verify the proper operation of the Discovery Server discovery mechanism, it is necessary\nto install some Python3 modules. These can be installed using `pip`.\n\n```bash\npip3 install jsondiff==1.2.0 xmltodict==0.12.0 pandas==1.1.2\n```\n\nA [discovery-server.repos](https://raw.githubusercontent.com/eProsima/Discovery-Server/master/discovery-server.repos)\nfile is available in order to profit from [vcstool](https://github.com/dirk-thomas/vcstool) capabilities to download\nthe needed repositories.\n\n### Linux\n\n1.  Create a Discovery Server workspace and download the repos file that will be used to install the Discovery Server\n    tool and its dependencies:\n\n    ```bash\n    $ mkdir -p discovery-server-ws/src \u0026\u0026 cd discovery-server-ws\n    $ wget https://raw.githubusercontent.com/eProsima/Discovery-Server/master/discovery-server.repos\n    $ vcs import src \u003c discovery-server.repos\n    ```\n\n1.  Finally, use colcon to compile all software.\n    Choose the build configuration by declaring ``CMAKE_BUILD_TYPE`` as Debug or Release.\n    For this example, the Debug option has been chosen, which would be the choice of advanced users for debugging purposes.\n\n    ```bash\n    $ colcon build --base-paths src\n            \\ --packages-up-to discovery-server\n            \\ --cmake-args -DTHIRDPARTY=ON -DLOG_LEVEL_INFO=ON -DCOMPILE_EXAMPLES=ON -DINTERNALDEBUG=ON -DCMAKE_BUILD_TYPE=Debug\n    ```\n\n1.  If you installed the Discovery Server tool following the steps outlined above, you can try the\n    *HelloWorldExampleDS*.\n    To run the example navigate to the following directory\n\n    ``\u003cpath/to/discovery-server-ws\u003e/discovery-server-ws/install/discovery-server/examples/HelloWorldExampleDS``\n\n    and run\n\n    ```bash\n    $ ./HelloWorldExampleDS-d --help\n    ```\n\n    to display the example usage instructions.\n\n    In order to test the *HelloWorldExampleDS* open three terminals and run the above command.\n    Then run the following command in each terminal:\n    -   Terminal 1:\n        ```bash\n        $ cd \u003cpath/to/discovery-server-ws\u003e/discovery-server-ws/install/discovery-server/examples/HelloWorldExampleDS\n        $ ./HelloWorldExampleDS publisher\n        ```\n    -   Terminal 2:\n        ```bash\n        $ cd \u003cpath/to/discovery-server-ws\u003e/discovery-server-ws/install/discovery-server/examples/HelloWorldExampleDS\n        $ ./HelloWorldExampleDS subscriber\n        ```\n    -   Terminal 3:\n        ```bash\n        $ cd \u003cpath/to/discovery-server-ws\u003e/discovery-server-ws/install/discovery-server/examples/HelloWorldExampleDS\n        $ ./HelloWorldExampleDS server\n        ```\n\n### Windows\n\n1.  Create a Discovery Server workspace and download the repos file that will be used to install the Discovery Server\n    tool and its dependencies:\n\n    ```bat\n    \u003e mkdir discovery-server-ws\n    \u003e cd discovery-server-ws\n    \u003e mkdir src\n    \u003e wget https://raw.githubusercontent.com/eProsima/Discovery-Server/master/discovery-server.repos\n    \u003e vcs import src \u003c discovery-server.repos\n    ```\n\n1.  If the generator (compiler) of choice is Visual Studio, launch colcon from a visual studio console.\n    Any console can be setup into a visual studio one by executing a batch file.\n    For example, in VS2017 is usually ``C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\Common7\\Tools\\VsDevCmd.bat``\n\n1.  Finally, use colcon to compile all software.\n    Choose the build configuration by declaring ``CMAKE_BUILD_TYPE`` as Debug or Release.\n    For this example, the Debug option has been chosen, which would be the choice of advanced users for debugging purposes.\n    If using a multi-configuration generator like Visual Studio we recommend to build both in debug and release modes\n\n    ```bat\n    \u003e colcon build --base-paths src\n            \\ --packages-up-to discovery-server\n            \\ --cmake-args -DTHIRDPARTY=ON -DLOG_LEVEL_INFO=ON -DCOMPILE_EXAMPLES=ON -DINTERNALDEBUG=ON -DCMAKE_BUILD_TYPE=Debug\n    \u003e colcon build --base-paths src\n            \\ --packages-up-to discovery-server\n            \\ --cmake-args -DTHIRDPARTY=ON -DCOMPILE_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Release\n    ```\n\n1. If you installed the Discovery Server tool following the steps outlined above, you can try the\n    *HelloWorldExampleDS*.\n    To run the example navigate to the following directory\n\n    ``\u003cpath/to/discovery-server-ws\u003e/discovery-server-ws/install/discovery-server/examples/HelloWorldExampleDS``\n\n    and run\n\n    ```bash\n    \u003e HelloWorldExampleDS --help\n    ```\n\n    to display the example usage instructions.\n\n    In order to test the *HelloWorldExampleDS* open three terminals and run the above command.\n    Then run the following command in each terminal:\n    -   Terminal 1:\n        ```bash\n        \u003e cd \u003cpath/to/discovery-server-ws\u003e/discovery-server-ws/install/discovery-server/examples/HelloWorldExampleDS\n        \u003e HelloWorldExampleDS publisher\n        ```\n    -   Terminal 2:\n        ```bash\n        \u003e cd \u003cpath/to/discovery-server-ws\u003e/discovery-server-ws/install/discovery-server/examples/HelloWorldExampleDS\n        \u003e HelloWorldExampleDS subscriber\n        ```\n    -   Terminal 3:\n        ```bash\n        \u003e cd \u003cpath/to/discovery-server-ws\u003e/discovery-server-ws/install/discovery-server/examples/HelloWorldExampleDS\n        \u003e HelloWorldExampleDS server\n\n---\n**NOTE**\n\nIn order to avoid using *vcstool*, the following repositories should be downloaded from github into\nthe `discovery-server-ws/src` directory:\n\n|            PACKAGE                 |                              URL                        |    BRANCH   |\n|:-----------------------------------|:--------------------------------------------------------|:-----------:|\n| fastcdr:                           | https://github.com/eProsima/Fast-CDR.git                |    master   |\n| fastdds:                           | https://github.com/eProsima/Fast-DDS.git                |    master   |\n| discovery_server:                  | https://github.com/eProsima/Discovery-Server.git        |    master   |\n| foonathan_memory_vendor:           | https://github.com/eProsima/foonathan_memory_vendor.git |    master   |\n| leethomason/tinyxml2:              | https://github.com/leethomason/tinyxml2.git             |    master   |\n\n---\n\n## Usage\n\n### XML profiles\n\nEach setting in *Fast DDS* can be configured through XML profiles. XML profiles allows to avoid tiresome\nhard-coded settings within applications sources using XML configuration files.\nThe *Fast DDS* XML schema was duly updated to accommodate the new Discovery Server tool settings.\n\n-   The participant profile ``\u003cbuiltin\u003e`` tag contains a ``\u003cdiscovery_config\u003e`` tag where all discovery-related info is\n    gathered. This new tag contains the following new XML child elements:\n\t- ``\u003cdiscoveryProtocol\u003e``: specifies the discovery type through the ``DiscoveryProtocol`` enumeration.\n\t- ``\u003cdiscoveryServersList\u003e``: specifies the server or servers to which a Client/Server connects.\n\t- ``\u003cclientAnnouncementPeriod\u003e``: specifies the time span between PDP metatraffic exchange.\n\nAn example of XML profiles for a client and a server is shown below.\n\n```xml\n\u003cparticipant profile_name=\"UDP_client\" \u003e\n  \u003crtps\u003e\n\t\u003cbuiltin\u003e\n\t\t\u003cdiscovery_config\u003e\n\t\t  \u003cdiscoveryProtocol\u003eCLIENT\u003c/discoveryProtocol\u003e\n\t\t  \u003cdiscoveryServersList\u003e\n\t\t\t\u003cRemoteServer prefix=\"4d.49.47.55.45.4c.5f.42.41.52.52.4f\"\u003e\n\t\t\t  \u003cmetatrafficUnicastLocatorList\u003e\n\t\t\t\t\u003clocator\u003e\n\t\t\t\t  \u003cudpv4\u003e\n\t\t\t\t\t\u003caddress\u003e192.168.1.113\u003c/address\u003e\n\t\t\t\t\t\u003cport\u003e64863\u003c/port\u003e\n\t\t\t\t  \u003c/udpv4\u003e\n\t\t\t\t\u003c/locator\u003e\n\t\t\t  \u003c/metatrafficUnicastLocatorList\u003e\n\t\t\t\u003c/RemoteServer\u003e\n\t\t  \u003c/discoveryServersList\u003e\n\t\t\u003c/discovery_config\u003e\n\t\u003c/builtin\u003e\n  \u003c/rtps\u003e\n\u003c/participant\u003e\n\n\u003cparticipant profile_name=\"UDP_server\"\u003e\n  \u003crtps\u003e\n\t\u003cprefix\u003e4d.49.47.55.45.4c.5f.42.41.52.52.4f\u003c/prefix\u003e\n\t\u003cbuiltin\u003e\n\t\t\u003cdiscovery_config\u003e\n\t\t  \u003cdiscoveryProtocol\u003eSERVER\u003c/discoveryProtocol\u003e\n\t\t\u003c/discovery_config\u003e\n\t\t\u003cmetatrafficUnicastLocatorList\u003e\n\t\t\t\u003clocator\u003e\n\t\t\t\t\u003cudpv4\u003e\n\t\t\t\t\t\u003caddress\u003e192.168.1.113\u003c/address\u003e\n\t\t\t\t\t\u003cport\u003e64863\u003c/port\u003e\n\t\t\t\t\u003c/udpv4\u003e\n\t\t\t\u003c/locator\u003e\n\t\t\u003c/metatrafficUnicastLocatorList\u003e\n\t\u003c/builtin\u003e\n  \u003c/rtps\u003e\n\u003c/participant\u003e\n```\n\n### Discovery Server executable\n\nThe discovery server binary (named after the pattern ``discovery-server-X.X.X(d)`` where ``X.X.X`` is the version\nnumber and the optional *d* denotes a debug build) is set up from one XML profiles files passed as command-line\narguments.\nTo have the tool accessible in the terminal session it is necessary to source the setup file.\n\n-   Linux\n    ```bash\n    $ source \u003cpath/to/discovery-server-ws\u003e/discovery-server-ws/install/setup.bash\n    $ discovery-server-X.X.X(d) -c config_file.xml\n    ```\n\n-   Windows\n\n    ```bat\n    \u003e . \u003cpath/to/discovery-server-ws\u003e/discovery-server-ws/install/setup.bat\n    \u003e discovery-server-X.X.X(d).exe config_file.xml\n    ```\n\n## Documentation\n\nYou can access the documentation online, which is hosted on\n[Read the Docs](https://eprosima-discovery-server.readthedocs.io/en/latest/).\n\n\u003c!-- * [Start Page](https://eprosima-discovery-server.readthedocs.io/en/latest/)\n* [Installation manual](https://eprosima-discovery-server.readthedocs.io/en/latest/installation.html)\n* [User manual](https://eprosima-discovery-server.readthedocs.io/en/latest/command_line.html)\n* [Examples](https://eprosima-discovery-server.readthedocs.io/en/latest/HelloWorldExample.html)\n* [Tests](https://eprosima-discovery-server.readthedocs.io/en/latest/tests.html)\n* [Release notes](https://eprosima-discovery-server.readthedocs.io/en/latest/notes.html) --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feprosima%2Fdiscovery-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feprosima%2Fdiscovery-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feprosima%2Fdiscovery-server/lists"}