Open
Conversation
Contributor
Author
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.