Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] network discovery and distribution questions related to RFC 119 impl

Hi Scott,

Your obvervation is correct. I don't think RFC 119 defines which
remote services should be discovered when more than one matches. I
think the default behaviour should be 'all', this is very much in line
with the ordinary OSGi services model where more than one entity
providing the service is absolutely fine. Whether 'all' makes sense
for you really depends on your use-cases. In some cases it may exactly
be what you want, in others you may have different requirements.

If you need to refine the scope, there are a number of tools that you can use:
1. First and foremost, the service lookup filter. You may be able to
specify more conditions that your service needs to satisfy. This could
extend to any custom properties you may have set on the original
service instance that is remoted. The filter controls what Discovery
selects and registers in the local service registry.
2. The discovery implementation could have its own additional
configuration which describes how services are discovered. RFC 119
doesn't really say much about this, but a discovery implementation can
have any additional configuration.
3. The set of services visible to a consumer can also be controlled
with the RFC 126 Service Registry Hooks. These hooks operate on
services in the OSGi Service Registry and are realised by registering
additional Hook services. The implementation of these hooks is
independent of RFC 119 or the consuming bundle. This will give you a
lot of flexibility, the only potential slight drawback could be that
they operate on the Service Registry, so they won't prevent the
additional remote services from being registered in the service
registry, which might have an associated cost.

Best regards,

David Bosschaert


Back to the top