[standards-jig] JEP-0060 PubSub: Subscribing to list of available nodes? (i.e. Please don't make me poll with disco...)

Bob Wyman bob at wyman.us
Wed Mar 26 22:53:07 UTC 2003

	In many PubSub systems, a potentially large number of Topics
will be made available each of which carries data on some distinct
subject. For instance, in a system that is distributing information such
as RSS feed data, one might find that each RSS site is allocated a
distinct node. In such a system, users are very interested in knowing
what nodes exist.
	Given the current specifications in JEP-0060, it appears that
the only way for someone to keep up-to-date on which nodes are available
is to periodically poll the system using disco to retrieve a list of
nodes and then compare this to a previously cached list. Because polling
is expensive, users will certainly be encouraged to reduce the frequency
with which they poll. This will result in potentially significant delays
between the creation of a new node and the discovery of that node by the
system's users. i.e. we'll have precisely the sort of situation that
PubSub servers are typically intended to eliminate...
	Ideally, clients would be able to discover immediately that a
node of interest to them has been created on a server. This is best
done, I think, by allowing users to subscribe to a node that publishes
information describing newly created or modified nodes.
	If subscribing to the list of nodes was possible and if I was
connected to a server that used PubSub to distribute RSS feeds, then I
would expect to receive a message whenever a new node was created to
handle a new RSS feed. This would give me a much more dynamic view of
the node list than I would get from regularly polling using disco.
	Given that this ability to subscribe to a list of new or
modified nodes would be useful in many contexts, I think it makes sense
to try to define a common name for this particular node. The idea is
that I should be able to find this node supported on all, or at least
most, servers that support PubSub. Also, since there are likely to be
other situations where it is likely to be useful to have a specific node
have the same name on all machines, I'd like to suggest that a
"namespace" be created to allow the definition of "well-known" or common
node names. Thus, I suggest that the node which would carry metadata
concerning new and modified nodes would be called "pubsub/nodes" and
that in general, the "pubsub" node-name prefix should be reserved to the
registered "well-known" node names that are defined to be standard
across servers.
	Given this scheme, I would expect to subscribe to a list of
notices concerning new and changed nodes using something like the
following on most, if not all, servers that support PubSub:

<iq type="set" from="bob at foo.com/home" to="pubsub.jabber.org" id="sub1">
  <pubsub xmlns="http://jabber.org/protocol/pubsub">
    <subscribe node="pubsub/nodes" jid="bob at foo.com"/>

		bob wyman

More information about the Standards mailing list