You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Michael Jakl <ja...@gmail.com> on 2009/05/15 10:34:24 UTC
[Vysper] Whole Server as Pubsub service
Hi!
I've started with the disco(very) implementation yesterday. There seem
to be two possible ways of implementing disco, and the pubsub
extension at large.
The Pubsub Module is a subclass of DefaultDiscoAwareModule, which
provides three method-stubs to deal with disco:
- addInfoRequestListeners
- addServerInfoRequestListeners
- addItemRequestListeners
The ServerInfoRequest is for server-features. The Pubsub module could
identify the server addtionally as pubsub service. Meaning we have an
additional "identity" and "feature" element (see XEP-0030 3.1[1] and
XEP-0060 5.1[2]).
The InfoRequest returns the disco information for a particular node.
The Pubsub module could be addressable by its own JID inside the
server. "pubsub.vysper.org" or something.
The difference between ServerInfoRequest and InfoRequest is, that the
server has either no "to" JID or no node associated (and the
server-entity matches the to address).
The ItemRequest (for completeness) returns either the associated nodes
(service) or all items (node).
The question thus is, should I "enhance" the server with the pubsub
service, or provide an additional entity within the server? I tend
towards the first option, but I'm not quite sure. What would you
suggest?
Cheers,
Michael
1: http://xmpp.org/extensions/xep-0030.html#info-basic
2: http://xmpp.org/extensions/tmp/xep-0060-1.13.html#entity-features
Re: [Vysper] Whole Server as Pubsub service
Posted by Bernd Fondermann <bf...@brainlounge.de>.
Michael Jakl wrote:
> Hi!
>
> On Fri, May 15, 2009 at 14:26, Bernd Fondermann <bf...@brainlounge.de> wrote:
>> Michael Jakl wrote:
>>> The InfoRequest returns the disco information for a particular node.
>>> The Pubsub module could be addressable by its own JID inside the
>>> server. "pubsub.vysper.org" or something.
>> Not quite. 'pubsub.vysper.org' is a completely different /domain/ than
>> 'vysper.org'! There is no inclusion relationship defined for xmpp
>> domains related to domain names. so the "pubsub.shakespeare.lit" in the
>> spec is equivalent to 'vysper.org'.
Seems I was wrong. See XEP0030/4.1/Example 12.
The answers comes from 'shakespeare.lit' but announces items at
'people|plays.shakespeare.lit'.
<iq type='result'
from='shakespeare.lit'
to='romeo@montague.net/orchard'
id='items1'>
<query xmlns='http://jabber.org/protocol/disco#items'>
<item jid='people.shakespeare.lit'
name='Directory of Characters'/>
<item jid='plays.shakespeare.lit'
name='Play-Specific Chatrooms'/> ...
>
> The pubsub service can also be addressed as pubsub@shakespeare.lit
> instead of pubsub.shakespeare.lit.
Initial discovery can only happen on the 'server node', like
'vysper.org', can't it? Otherwise, the client would have to guess.
So, now rereading some of XEP 30 + 60, the client would need to send a
info request to all nodes *.shakeskpeare.lit, to inspect if any has the
pubsub feature. If the domain itself announces pubsub as a feature,
maybe this will yield problems later, maybe not.
For now, I would go on with making it configurable which entity it
announces pubsub on (vysper.org, ${pubsub_identifier}.vysper.org or
${pubsub_identifier}@vysper.org). Don't know if we need more than one
announcement (for different or same pubsub service).
> Hence I thought about a "virtual"
> service within the vysper server. Using this addressing scheme
> (pubsub@shakespeare.lit), the server info request would be
> problematic, wouldn't it?
Not as long as it'd yield an item 'pubsub@shakespeare.lit'.
>
> In my understanding, the server would have to report the virtual
> pubsub service as node of category "pubsub" and type "service" during
> discovery.
+1
> I think it's up to us how we implement it, and since we agree, it will
> be a feature of the server (hence, not a virtual service).
>
>> Is that answering your question?
>
> Yes, thank you,
> Michael
>
Bernd
Re: [Vysper] Whole Server as Pubsub service
Posted by Michael Jakl <ja...@gmail.com>.
Hi!
On Fri, May 15, 2009 at 14:26, Bernd Fondermann <bf...@brainlounge.de> wrote:
> Michael Jakl wrote:
>> The InfoRequest returns the disco information for a particular node.
>> The Pubsub module could be addressable by its own JID inside the
>> server. "pubsub.vysper.org" or something.
>
> Not quite. 'pubsub.vysper.org' is a completely different /domain/ than
> 'vysper.org'! There is no inclusion relationship defined for xmpp
> domains related to domain names. so the "pubsub.shakespeare.lit" in the
> spec is equivalent to 'vysper.org'.
The pubsub service can also be addressed as pubsub@shakespeare.lit
instead of pubsub.shakespeare.lit. Hence I thought about a "virtual"
service within the vysper server. Using this addressing scheme
(pubsub@shakespeare.lit), the server info request would be
problematic, wouldn't it?
In my understanding, the server would have to report the virtual
pubsub service as node of category "pubsub" and type "service" during
discovery.
I think it's up to us how we implement it, and since we agree, it will
be a feature of the server (hence, not a virtual service).
> Is that answering your question?
Yes, thank you,
Michael
Re: [Vysper] Whole Server as Pubsub service
Posted by Bernd Fondermann <bf...@brainlounge.de>.
Michael Jakl wrote:
> Hi!
>
> I've started with the disco(very) implementation yesterday. There seem
> to be two possible ways of implementing disco, and the pubsub
> extension at large.
>
> The Pubsub Module is a subclass of DefaultDiscoAwareModule, which
> provides three method-stubs to deal with disco:
> - addInfoRequestListeners
> - addServerInfoRequestListeners
> - addItemRequestListeners
>
> The ServerInfoRequest is for server-features. The Pubsub module could
> identify the server addtionally as pubsub service. Meaning we have an
> additional "identity" and "feature" element (see XEP-0030 3.1[1] and
> XEP-0060 5.1[2]).
This is the way to go.
> The InfoRequest returns the disco information for a particular node.
> The Pubsub module could be addressable by its own JID inside the
> server. "pubsub.vysper.org" or something.
Not quite. 'pubsub.vysper.org' is a completely different /domain/ than
'vysper.org'! There is no inclusion relationship defined for xmpp
domains related to domain names. so the "pubsub.shakespeare.lit" in the
spec is equivalent to 'vysper.org'.
> The difference between ServerInfoRequest and InfoRequest is, that the
> server has either no "to" JID or no node associated (and the
> server-entity matches the to address).
>
> The ItemRequest (for completeness) returns either the associated nodes
> (service) or all items (node).
>
> The question thus is, should I "enhance" the server with the pubsub
> service, or provide an additional entity within the server? I tend
> towards the first option, but I'm not quite sure. What would you
> suggest?
How would implementing the second option make the pubsub feature
discoverable? There'd have to be a kind of redirect from vysper.org to
pubsub.vysper.org, which doesn't exist, AFAIK.
Is that answering your question?
Bernd