[standards-jig] JEP-0060 Pubsub: 6.1.5 Configure Subscription Options

Bob Wyman bob at wyman.us
Sat Feb 15 08:23:12 UTC 2003


    Given that the latest draft provides for passing both node creation
and node configuration information in the same XML stanza, I think it
would make sense (for symetry alone) to permit both subscription
creation and configuration information to be passed in a single XML
stanza. The justification for this is very much the same as that used
for node creation. i.e. there can be "race conditions" that may result
in undesired effects during the period between subscription creation and
subscription configuration if the two must be in separate calls. This
problem of the delay between the creation and the opportunity to
configure is, of course, much more severe than the similar problem with
node creation since the subscription creation can be delayed for an
arbitrarily long time while the subscription awaits approval. It should
also be noted that in some cases, subscription configuration data may be
useful to those who are ruling on a subscription request. For instance,
some might decide that a "statement of justification" explaining in
prose why the subscription request should be granted should be reviewed
prior to accepting a subscription request. Such a justification would be
easily passed as a field in the subscription configuration data and
exposed to the approvers of the subscription.
    If I implement PubSub on a low-capability device, like a hand held
device or a cell phone, I may wish to take advantage of a hypothetical
feature of my PubSub server that allows me to limit the size of messages
sent to my device. Thus, given a max-bytes configuration item, I might
say that I wish to receive notifications (not payloads) for any messages
larger than 1KB. Ideally, I would be able to say this at the same time I
create or request the subscription rather than having to wait until
after the subscription is granted and then quickly issue the
configuration data before any excessively large messages are published
to my device. In such a situation, being able to create and configure in
one operation would be very, very useful.

	A subscription request such as the following should be
supported:

<iq type="set" from="sub1 at foo.com/home" to="pubsub.jabber.org"
id="sub1">
  <pubsub xmlns="http://jabber.org/protocol/pubsub">
    <subscribe node="generic/pgm-mp3-player" jid="sub1 at foo.com"/>
    <options node="generic/pgm-mp3-player">
        <x xmlns="jabber:x:data">
          <field var="max-bytes"
type="text-single"><value>1024</value></field>
        </x>
     </options>  </pubsub>
</iq>

		bob wyman




More information about the Standards mailing list