pnoltes commented on code in PR #495:
URL: https://github.com/apache/celix/pull/495#discussion_r1139224606
##########
bundles/remote_services/rsa_spi/include/remote_constants.h:
##########
@@ -36,4 +36,6 @@ static const char * const OSGI_RSA_SERVICE_IMPORTED_CONFIGS =
"service.imported.
static const char * const OSGI_RSA_SERVICE_EXPORTED_CONFIGS =
"service.exported.configs";
static const char * const OSGI_RSA_SERVICE_LOCATION = "service.location";
+static const char * const RSA_DISCOVERY_ZEROCONF_SERVICE_ANNOUNCED_IF_INDEX =
"RSA_DZC_IF_INDEX";
Review Comment:
Yeah this is a difficult one.
For PubSub this is also an issue and for now PubSub only really works -
together with discovery - using a single network interface.
For the different pubsub implementation the `PSA_IP` and `PSA_INTERFACE` is
used to configure the PubSub Admins, but not directly the discovery
implementations.
A option maybe could be to define a config property that is used by both the
remote service admin implementations (dfi) and discovery (etcd,mdns) which
configures which interface to use and which IP address for those interfaces.
Something like:
```
//celix_remote_service_constants.h from Celix::rsa_spi
/**
* Config property to configure network interfaces for remote services.
* A comma separated list of CIDR notation to configure which network
interfaces to use for remote services
* If "" is configured the loopback interface will be used.
*
* The subnets are used by the remote service admins to retrieve the remote
service reachable IP address so
* that this can be set in the remote endpoints properties.
* The subnets are also used by the discovery admins to decide which network
interfaces to use for announcing
* the remote endpoints. (NOTE: I am not sure if this really works and if
not, maybe it is better to extend the
* discovery listeners so that they accept a network interface argument.
Anyhow I think the network interface
* is not needed in the remote endpoint properties)
*
* Default is "".
*
* This is global config used for all remote service admins and discovery
admins. Specific implementation
* can opt-in to allow implementation specific overrides of this. Ideally
this is done in the following scheme:
* CELIX_REMOTE_SERVICES_(RSA|DISCOVERY)_<TECH>_SUBNETS
* e.g. CELIX_REMOTE_SERVICES_DISCOVERY_MDNS_SUBNETS
*/
#define CELIX_REMOTE_SERVICES_SUBNETS "CELIX_REMOTE_SERVICES_SUBNETS"
/**
* Config property to configure which public ip should be used for certain
network interface names.
* A comma separated list if "<interface_name>=<PUBLIC IP>" entries.
*
* If configured the remote service admins should use this info to decide
which IP addresses to use
* for certain network interaces. If entry with the configured interface
name is not present, the IP of the network interfaces will be used.
*
* Default is ""
*/
#define CELIX_REMOTE_SERVICES_IFNAME_TO_PUBLIC_IP_MAPPING
"CELIX_REMOTE_SERVICES_IFNAME_TO_PUBLIC_IP_MAPPING"
```
Just an idea and I think this needs (quite) some more thoughts/tweaking.
I am a bit rusty on the Remote Service Admin specification, but I would like
to look into the spec and see
if this issue is already tackled there.
But I need some time for this, hopefully somewhere next week.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]