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 2024/10/17 04:14:40 UTC

[I] How to arrange the priority of services in RSA (celix)

xuzhenbao opened a new issue, #776:
URL: https://github.com/apache/celix/issues/776

   This issue is used to discuss the following issues:
   If there are multiple remote service instances and local service instances that match the requirements, how to arrange these service instances so that users can select the best service instance.
   
   
   Currently, I plan to solve this problem based on the following two points:
   
   1. If there are multiple `Remote Service Admin Service` instances, how to facilitate users to select the best remote service?
   
      If there are multiple `Remote Service Admin Service` instances in the same framework instance, the `topology manager` selects the best `Remote Service Admin Service` for importing services based on the [`Service Ranking Order`](https://docs.osgi.org/specification/osgi.core/7.0.0/framework.service.html#framework.service.servicerankingorder), the same service (with the same `endpoint.service.id` and `endpoint.framework.uuid` property values) is only imported by the best `Remote Service Admin Service`.
   
   
   3. If there are local service instances and remote service instances that match the requirements at the same time in the same framework instance, how to facilitate users to prefer to use local services or remote services?
   
      To solve this problem, I plan to add a `conan` option `remote_service_ranking_weight` to specify the priority weight of remote services. When importing services, the `topology manager` sets the 'service.ranking' property of the remote service to `remote service ranking weight + service.ranking`. If `remote service ranking weight` is a negative number, the priority of local services is higher, otherwise the priority of remote services is higher.


-- 
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.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] How to arrange the priority of services in RSA (celix)

Posted by "xuzhenbao (via GitHub)" <gi...@apache.org>.
xuzhenbao closed issue #776: How to arrange the priority of services in RSA
URL: https://github.com/apache/celix/issues/776


-- 
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: [I] How to arrange the priority of services in RSA (celix)

Posted by "pnoltes (via GitHub)" <gi...@apache.org>.
pnoltes commented on issue #776:
URL: https://github.com/apache/celix/issues/776#issuecomment-2429890347

   Hi,
   
   For 1. I agree with the approach; Use the RSA service ranking.
   
   For 2. I would prefer a small adjustment: Instead of a conan option, use a config property based on the RSA name. Something like `CELIX_RSA_MYRSA_IMPORT_SERVICE_RANKING_OFFSET`  and use  the (negative or positive) value to adjust the provided export service ranking. I prefer something like `offset` of `weight`, because weight for me implies multiplication not addition/subtraction. 
   


-- 
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