[standards-jig] pubsub usability for avatars and similar stuff

Jacek Konieczny jajcus at bnet.pl
Fri Jul 18 10:34:45 UTC 2003


Hello,

I agree, that pubsub is the right way to do avatars. But currently
it lacks one feature which is needed to make them usable for regular
user.

Retrieving avatars is simple - there is a protocol defined in
JEP-84 to query for the location (pubsub JID and node) of user's avatar.
But to publish avata user needs to give not only the avatar image, but
also JID of pubsub component and node name where it will be published.

Discovering JID of the pubsub component is not a big problem - just
disco the server for items. If it returns any pubsub component - use
that. Of course if it has more then one such component one will have to
guess.

But which node publish to. Users will usually not be able to publish to
any nodes. Only to some part of locally defined node hierarchy or even
only to single nodes. There should be a way for server to inform clients
which nodes should be used for things like avatars.

I think some kind of disco request to the server, which would return
base of user-writable nodes, should be used.

Eg.:
Client asks:
<iq type="get" id="1">
	<query
		xmlns="http://www.jabber.org/protocol/disco#items"
		xmlns="http://www.jabber.org/protocol/private_pubsub"/>
</iq>

Server returns:
<iq type="result" id="1">
	<query
		xmlns="http://www.jabber.org/protocol/disco#items"
		xmlns="http://www.jabber.org/protocol/private_pubsub">
		<item jid="pubsub.domain" node="users/user_jid/"/>
	</query>
</iq>

Then client know it can write nodes on "pubsub.domain" named like:
	users/user_jid/avatar_info
	users/user_jid/avatar_data
	etc.

Of course this space could be used not only for avatars but for any
public or even private storage.

This assumes some hierarchy in the pubsub component, but it may be flat
(base node is just concatenate with custom name), and this assumption
is only for this purpose (doesn't change anything in pubsub when used 
for other purposed).

What do you think?

Greets,
	Jacek



More information about the Standards mailing list