On 11/8/2009 5:26 PM, Peter Saint-Andre wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

My apologies for the delayed reply.

On 10/2/09 12:46 AM, Brett Zamir wrote:
While attributes are being added to<item/>, would there also be some
way to add meta-data about the node to the event as well, e.g.,
pubsub#num_subscribers (the number of subscribers to the node) or
pubsub#title (human-readable node name)? I know it can be retrieved
separately, but this seems it could be useful to be able to get back
together...
I don't see the logic of this -- you want to include meta-data about the
node in an element that has information about a specific item?

I don't think it makes sense as a part of <item/> (nor as part of the payload within <item/>) but a sibling of the <event/> in the <message/> that delivers the item. It is, for example, wasteful to have to make a separate query to know the number of subscribers for the node that just delivered the item (our client would like to indicate this), but a delivery of a news item would be an opportune time to be given an update on the sending leaf node's variable meta-data (or possibly also meta-data on the collection node containing the leaf node for which the item was delivered)--maybe something like this:

<message>
<event><items>...</items></event>
<node type="leaf" xmlns="http://jabber.org/protocol/pubsub#meta-data";><field var="pubsub#num_subscribers"><value>121</value></field></node> <node type="collection" xmlns="http://jabber.org/protocol/pubsub#meta-data";><field var="pubsub#num_subscribers"><value>345</value></field></node>
</message>

Some meta-data I think would make sense to deliver exclusively at the time of a successful subscription (e.g., the value of pubsub#creation_date delivered inside a <subscription/> element from either an IQ response or as part of a subscription approval message where approval was required), but other information like #num_subscribers would be of potential use to update more frequently (it is to us at least).

I suggested elsewhere in the thread that a (list-multi) option could be added to subscription options which could provide choices of which meta-data would be delivered in events, so not every subscriber/client would need to get this information, but the delivery of meta-data could have default values so a generic application would know which information was typically shared to clients.

Brett

Reply via email to