You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Dieter Wimberger <di...@wimpi.net> on 2008/07/01 21:14:23 UTC

Re: Distributed OSGi/Network Service Discovery

Hi all:

Thanks for the answers.

I have been working on the isolated problem of Network Service  
Discovery and what happened is that I went from
jmdns to jslp and then I decided to write my own.

However, in doing so, I realized that if I bound my code to a specific  
API, I had to rewrite it everytime I changed to another
protocol package.

The two solutions I came up with were basically:
1) to have a protocol agnostic API that defines network service  
discovery (for a properties based lookup)
[moderate coupling]
2) to have a mechanism that uses a single interface (as type) and the  
service registry, and adds or removes the references with properties  
at the SD protocol level.
[very loose coupling]

A pro of 1 is that there is a clear specification and it could be  
easier to ensure constraints on properties (i.e. because of the OO  
model approach).
It could actually be combined with 2 using a glue bundle. A con of 1  
is that you need an API that is flexible and generic enough to cover  
what may be out there in SD protocols (i.e. needs to be a good  
abstraction).

A pro of 2 is the loose coupling, but it could be also seen as con, if  
the only specification is about the registration of certain properties  
(with implicit constraints).

Hopefully this makes sense, my intention was to get some feedback and  
thoughts on the topic.

I have actually tried to model 1 (and implement it), so if you are  
interested in the details, I have dropped the API here:
http://www.karanet.at/~wimpi/sd-api/
I think it should be flexible enough to allow for example  
implementations that are based on jmdns and jslp.

Marcel:
I have read those references, but I think that service discovery alone  
is kind of a foundation for what they are proposing when it comes to  
distributed OSGi (also, I think that it's valid by itself, sometimes  
you just need some auto-configuration or want to bind in heterogenous  
components; i.e. such that aren't implemented in OSGi or Java at all).

Craig:
I have checked out Newton; I think it is also larger scale.

Didier:
Maybe my description above makes a better point about what I was  
trying to discuss. Logically, a valid point of view would be to go for  
mDNS as a standard and that's it.

Regards,
Dieter