You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@celix.apache.org by "xuzhenbao (via GitHub)" <gi...@apache.org> on 2026/03/17 10:56:06 UTC
[PR] Add remote service ranking (celix)
xuzhenbao opened a new pull request, #839:
URL: https://github.com/apache/celix/pull/839
The PR is used to resolve the issue #776. However, there are some adjustments to the implementation.
I have defined a configuration property `CELIX_RSA_IMPORTED_SERVICE_RANKING_OFFSETS`. This property is used to specify the offset values for the imported service ranking. The value of this property is a comma-separated list of `<config type>=<ranking offset>`. It allows user to configure the ranking of imported services based on the configuration type of service. For example, if the user wants to set a higher ranking for imported services with the configuration type "celix.remote.admin.shm" than the imported services with the configuration type "celix.remote.admin.http", and the imported services rankings are lower than the local services(The default ranking of local service is 0.), you can set the property as follows:"celix.remote.admin.shm=-1,celix.remote.admin.http=-2".
In addition, in order to ensure that the imported services that are being called can complete their operations before they are removed, when the import registration is closed, I used the synchronous method to unregister the imported service. The relevant modification can be found in `rsa_json_rpc_proxy_impl.c`.
--
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: dev-unsubscribe@celix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add remote service ranking (celix)
Posted by "xuzhenbao (via GitHub)" <gi...@apache.org>.
xuzhenbao merged PR #839:
URL: https://github.com/apache/celix/pull/839
--
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: dev-unsubscribe@celix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add remote service ranking (celix)
Posted by "pnoltes (via GitHub)" <gi...@apache.org>.
pnoltes commented on code in PR #839:
URL: https://github.com/apache/celix/pull/839#discussion_r3047166111
##########
bundles/remote_services/topology_manager/src/topology_manager.c:
##########
@@ -47,14 +48,17 @@
#include "service_reference.h"
#include "service_registration.h"
#include "celix_log_helper.h"
-#include "topology_manager.h"
#include "scope.h"
#include "hash_map.h"
#include "celix_array_list.h"
+#include "celix_string_hash_map.h"
+#include "celix_convert_utils.h"
//The prefix of the config property which is used to store the interfaces of a port. e.g. CELIX_RSA_INTERFACES_OF_PORT_8080. The value is a comma-separated list of interface names.
#define CELIX_RSA_INTERFACES_OF_PORT_PREFIX "CELIX_RSA_INTERFACES_OF_PORT_"
+//The config property for the ranking offset of imported services. The value is a comma-separated list of <config type>=<ranking offset>. e.g. CELIX_RSA_IMPORTED_SERVICE_RANKING_OFFSETS="celix.remote.admin.shm=-1,org.amdatu.remote.admin.http=-2". The ranking offset will be added to the original service ranking of the imported service. This allows the user to configure the ranking of imported services based on different configuration types.
Review Comment:
nitpick: split up the comment over multiple lines (ColumnLimit in .clang-format is 120).
--
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: dev-unsubscribe@celix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add remote service ranking (celix)
Posted by "xuzhenbao (via GitHub)" <gi...@apache.org>.
xuzhenbao commented on PR #839:
URL: https://github.com/apache/celix/pull/839#issuecomment-4162690925
> In the current implementation, if the same service is imported by multiple Remote Service Admins (RSA), I will remove the imported service with the lower ranking. Is this redundant? Because the ranking is a property of the service, and the service consumer can get the service with the higher ranking as needed. I think I should remove this part of the logic.
I have revised the code implementation, retaining all the imported services. And the service ranking of imported services is set according to the configuration property `CELIX_RSA_IMPORTED_SERVICE_RANKING_OFFSETS`.
--
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: dev-unsubscribe@celix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add remote service ranking (celix)
Posted by "xuzhenbao (via GitHub)" <gi...@apache.org>.
xuzhenbao commented on PR #839:
URL: https://github.com/apache/celix/pull/839#issuecomment-4090189484
In the current implementation, if the same service is imported by multiple Remote Service Admins (RSA), I will remove the imported service with the lower ranking. Is this redundant? Because the ranking is a property of the service, and the service consumer can get the service with the higher ranking as needed.
I think I should remove this part of the logic.
--
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: dev-unsubscribe@celix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org