[Standards-JIG] pubsub: transient+notification

Ralph Meijer jabber.org at ralphm.ik.nu
Wed Feb 15 09:31:31 UTC 2006


On Tue, Feb 14, 2006 at 02:32:27PM -0700, Peter Saint-Andre wrote:
> JEP-0060 lists as one of the possible node types "transient +
> notification" -- i.e., the node sends out no payloads but instead sends
> out only notification with no ItemIDs. The use case for this is quite
> unclear to me, since subscribers would get things like this:
> 
> <message from='pubsub.shakespeare.lit' to='francisco at denmark.lit'>
>   <event xmlns='http://jabber.org/protocol/pubsub#event'/>
> </message>
> 
> To me, that's the equivalent of telling the subscriber "hey, something
> happened, but I can't tell you what it is nor can I give you a way to
> find out what it is, since there's no payload or item associated with
> this event". Which strikes me as pretty useless.

This is really the most basic publish/subscribe use case. The usage of
data in the notifications or having persistence are enhancements on the
basic concept.

What you say here is that a subscriber wants to be notified when some
event has taken place. What kind of event, its meaning really, is
application specific. Example:

One could imagine a node representing that your doorbell button has
been pushed. It doesn't matter for how long, or when the doorbell
button was unpushed, so no data is required. Also, you don't want to
have a history of doorbell pushes, so no persistence is required. You
only want to be notified if and when the doorbell button has been
pushed.

The confusion may arise from your flawed example event, because it
must always have a <items/> element when notifying a publish:


  <message from='pubsub.shakespeare.lit' to='francisco at denmark.lit'>
    <event xmlns='http://jabber.org/protocol/pubsub#event'>
      <items node='generic/doorbell'/>
    </event>
  </message>

By the way, for removing items (in the persistent node case), I noticed
that the <retract/> child of <items/> is not mentioned in the schema.

-- 
Groetjes,

ralphm



More information about the Standards mailing list