[standards-jig] LAST CALL: Service Discovery (JEP-0030)

Joe Hildebrand JHildebrand at jabber.com
Tue Dec 10 21:03:13 UTC 2002


hildjj:
> > Once there is a way to address those services, *then*
> > there needs to be a way to discover them, and their
> > children.  I guess the question is, do we need to pause
> > disco development while we solve the addressing issue?

stpeter:
> Yow, I hope not. The addressing issue is a fairly large
> can of worms, and AFAICS disco should be able to handle
> whatever addressing we come up with.

It doesn't necessarily have to be.

How about this?

<iq 
    type='get' 
    from='romeo at montague.net/orchard' 
    to='shakespeare.lit' 
    id='items1'>
  <query xmlns='http://jabber.org/protocol/disco#items'/>
</iq>

<iq 
    type='result'
    from='shakespeare.lit' 
    to='romeo at montague.net/orchard' 
    id='items1'>
  <query xmlns='http://jabber.org/protocol/disco#items'>
    <item 
        jid='shakespeare.lit' 
        node='people'
        name='Directory of Characters'/>
    <item 
        jid='shakespeare.lit' 
        node='plays'
        name='Play-Specific Chatrooms'/>
  </query>
</iq>


and then, when I want to disco plays, I can do:

<iq 
    type='get' 
    from='romeo at montague.net/orchard' 
    to='shakespeare.lit' 
    id='items2'>
  <query xmlns='http://jabber.org/protocol/disco#items' node='plays'/>
</iq>

and get back

<iq 
    type='result'
    from='shakespeare.lit' 
    to='romeo at montague.net/orchard' 
    id='items2'>
  <query xmlns='http://jabber.org/protocol/disco#items' node='plays'>
    <item 
        jid='shakespeare.lit' 
        node='plays/merchant-venice'
        name='Merchant of Venice'/>
    <item 
        jid='shakespeare.lit' 
        node='plays/as-you-like'
        name='As You Like It'/>
  </query>
</iq>

So, you could redirect to another JID, or you could redirect to a
sub-service of the same jid.  The node/sub-service names don't have any
semantic meaning to the recipient, but the sender could choose to encode
information in them as it saw fit.

So for example:

<iq 
    type='result'
    from='nntp.jabber.org' 
    to='romeo at montague.net/orchard' 
    id='items3'>
  <query xmlns='http://jabber.org/protocol/disco#items' node='comp'>
<!-- NOTE REDIRECTS to a fictional jabber/google-groups gateway -->
    <item 
 
jid='google.jabber.org/groups.google.com/groups?hl=en&lr=&ie=UTF-8&group=com
p.database' 
        node='comp.database'
        name='Databases'/>
    <item 
 
jid='google.jabber.org/groups.google.com/groups?hl=en&lr=&ie=UTF-8&group=com
p.lang' 
        node='comp.lang'
        name='Computer Languages'/>
<!-- ... -->
  </query>
</iq>

or:

<iq 
    type='result'
    from='hildjj at jabber.com/Work' 
    to='romeo at montague.net/orchard' 
    id='items3'>
  <query xmlns='http://jabber.org/protocol/disco#items'
node='REGISTRY/HKEY_LOCAL_MACHINE/SOFTWARE'>
    <item 
        jid='hildjj at jabber.com/Work' 
        node='REGISTRY/HKEY_LOCAL_MACHINE/SOFTWARE/Jabber'/>
<!-- ... -->
  </query>
</iq>

-- 
Joe Hildebrand



More information about the Standards mailing list