[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
| [ecf-dev] [Discovery] Remove create IServiceID by String (was Re: Questions about ECF discovery with jSLP provider) | 
Markus Alexander Kuppe wrote:
  1. To specify the service type, I have to follow the syntax
            _service._something ._protocol ._ scope ._ naming authority
      Is it some kind of convention I have to follow? if so, it would 
be great if someone can point me to it? Because when I try to register 
the ServiceInfo created from the service ID using the string 
"service:test:slp", I got the exception 
"org.eclipse.ecf.core.identity.IDCreateException: ServiceTypeID cannot 
be parsed"
ECF discovery tries to be discovery protocols agnostic. A client isn't 
supposed to see SLP, Zeroconf/Bonjour etc. Thus we've created this kind 
of "convention" which works for the moment. And as always, the code is 
the documentation. :-o
An enhancement might be to let clients also use the protocol specific 
service syntax if they choose to expose the specific protocol/provider 
to the client. But than one might argue why not use the specific 
protocol/provider directly without using ECF discovery (for the current 
incarnation of jSLP you'll certainly loose asynchronous discovery though).
Hi,
what do people think about dropping create IServiceTypeID and IServiceID 
by String completely? Basically this means removing 
org.eclipse.ecf.discovery.identity.IServiceIDFactory.
Main reasons are:
* Makes the code overly complex because of string mangling (which is 
also error prone)
* Current ECF String rep is arbitrary and non-standard
* Current ECF String rep might mismatch with new providers
* Creating objects by ctor/setters is more OOish and thus easier for the 
consumer to use.
While we certainly won't be able to do this in 2.0, it is doable in 2.1 
or 3.0 depending what's next.
Cheers
Markus