[Gossip-dev] "id" account param and property

Martyn Russell martyn at imendio.com
Thu Jan 11 19:59:49 CET 2007


Xavier Claessens wrote:
> Martyn said on bug #391284:
> 
> > OK we can resolve this on the dev list. I need to think about it some 
> > more before I respond, it is difficult. For Jabber, do we use "account" 
> > or "id" for the jid (just out of interest)? I want to resolve a plan of
> > action here before we commit the merge patch (i.e. I want to make a 
> > decision on the dev list about if this should be fixed before we merge 
> > or after and fix it up later). 
> 
> Currently gossip HEAD uses a "id" property and don't have the "id"
> parameter. What I suggest is to make a difference between 2 concepts:
> 
> 1) The "account" parameter that doesn't exists in gossip HEAD yet but is
> introduced by my merge patch. This is the jid, if we use normal gossip
> (with my patch applied) or gossip-telepathy with a gabble account. It's
> used to connect the account. This param doesn't exists with certain
> special protocols (link-local) and is not unique (with IRC the "account"
> param is the nickname that can be reused in multiple accounts).
> 
> 2) The "id" property that is currently used in gossip HEAD for
> connection jabber accounts and identify accounts. So the "id" property
> has to be unique. For jabber protocols the jid is unique so we can use
> it for the account "id" property (so "account" param and "id" property
> have the same value). For other protocols like link-local or IRC the
> "id" property should take another value than just the "account" param
> (because it doesn't exists or isn't unique), telepathy spec has a way to
> request a unique name for each protocol once the account is connected.
> So the "id" property is set to that value once the account is connected.
> 
> We have 2 concepts here, a "account" parameter when required to connect
> the account and a "id" property to identify an account uniquely. They
> can have the same value, up to the backend to manage that. I know gossip
> still mix that a bit, but I think my merge patch fix the confusion.
> 
> I can understand it's a bit confusing if we only look at the normal
> gossip that only support jabber protocol to have a param and a property
> with the same value in the end... but with multi-protocol in head I
> think there are really 2 different concepts here even if for jabber
> protocol the jid can be used for both.

Hi Xavier,

OK. I understand the concept, and I am not too worried about undertaking
it, but first I want a few questions explained.

1. Why do we need to have an "account" parameter at all if for IRC we
just use "name", "nickname" and "server"? The "id" property could simply
be a combination of those (for example, <name>@<server> for something
unique).

2. For link local, we currently have a NULL "id" property until we are
connected right? Is there an "account" parameter used here at all? If so
what does it mean?

3. Really what I am saying in points 1. and 2. is, why do we need an
"account" parameter at all for any protocol if the information is
readily available from another parameter? It seems to me that "account"
is just there for making a general case parameter for all protocol types.

4. If we have an "id" property, are there any protocols that need to use
an "id" parameter? In fact, if the "id" property is the thing that
uniquely identifies the account, then really we should keep the "id"
property and not need the "id" parameter (which I know is back tracking
from what I may have said in the bug report, but that is what seems
logically to me, unless you can show me that we need an "id" parameter).

Thanks,

-- 
Regards,
Martyn


More information about the Gossip-dev mailing list