diff --git a/xep-0163.xml b/xep-0163.xml index 09965761..3e0b08e2 100644 --- a/xep-0163.xml +++ b/xep-0163.xml @@ -31,6 +31,12 @@ kevin@kismith.co.uk kevdadrum@jabber.ex.ac.uk + + 1.1pre1 + in progress, last updated 2006-12-12 + psa +

Replaced hardcoded NodeIDs (one node per namespace) with server-side namespace matching; more fully specified use of PEP for private data storage.

+
1.0 2006-09-20 @@ -147,11 +153,10 @@ -

Personal eventing via pubsub ("PEP") is based on six principles:

+

Personal eventing via pubsub ("PEP") is based on the following five principles:

  1. Every account a pubsub service.
  2. One publisher per node.
  3. -
  4. One node per namespace.
  5. Use presence.
  6. Notifications are filtered based on expressed interests.
  7. Smart defaults.
  8. @@ -163,24 +168,21 @@

    There is no need for multiple publishers to a PEP service, since by definition the service generates information associated with only one entity. The owner-publisher for every node is the bare JID of the account owner.

    - -

    There is only one publish-subscribe node associated with any given payload type (XML namespace) for the account owner (e.g., there is one pubsub node for geolocation events, one node for tune events, and one node for mood events). This simplifies node creation, discovery, publishing, and subscribing.

    -

    Although generic publish-subscribe services do not necessarily have access to presence information about subscribers, PEP services are integrated with presence in the following ways:

    • Each messaging and presence account simply is a virtual publish-subscribe service.
    • The default access model is "presence".
    • A contact's subscription to an account owner's personal eventing data is normally handled via the existence of an XMPP presence subscription.
    • -
    • Services take account of subscriber presence in the generation of notifications. This works only if the subscription state is "both" (see RFC 3921).
    • +
    • Services take account of subscriber presence in the generation of notifications. (Note: This works only if the subscription state is "both" as explained in RFC 3921.)

    These uses of presence simplify the task of developing compliant clients (cf. &xep0134;).

    -

    By default, the existence of an XMPP presence subscription is used to establish a PEP subscription to the account owner's personal eventing data. In order to filter which notifications are sent by the PEP service, the contact's client includes extended &xep0115; information in the presence notifications it sends to the account owner, and the PEP service sends only those notifications that match the contact's expressed notification preferences.

    +

    By default, the existence of an XMPP presence subscription is used to establish a PEP subscription to the account owner's personal eventing data. In order to filter which notifications are sent by the PEP service, the contact's client includes extended &xep0115; information in the presence notifications it sends to the account owner. The PEP service then sends only those notifications that match the contact's expressed notification preferences, based on the "pubsub#type" of the nodes that match.

    -

    Most pubsub configuration options and metadata are not needed for personal eventing. Instead, PEP services offer smart defaults to simplify node creation and management.

    +

    Most pubsub configuration options and metadata are not needed for personal eventing. Instead, PEP services offer smart defaults to simplify node creation and management. The only required configuration options are the access model and the pubsub type (payload namespace).

    @@ -247,7 +249,7 @@ - + @@ -256,6 +258,9 @@ + + + @@ -263,19 +268,23 @@ ]]> - - - - - - - - My nurse's birthday! - - - + + + + + http://jabber.org/protocol/pubsub#node_config + + + + + + + + + @@ -284,7 +293,7 @@ - + @@ -296,6 +305,9 @@ + + + @@ -306,7 +318,7 @@ - + @@ -315,6 +327,9 @@ + + + @@ -324,109 +339,8 @@ ]]> - -

    A contact MAY send service discovery requests to the account owner's bare JID (&BAREJID;). Although this is not necessary in order to subscribe to the account owner's personal eventing data (as explained in the following section), it is shown here to further illustrate the role of access models.

    -

    First, benvolio@montague.net sends a disco#info request to juliet@capulet.com:

    - - - - ]]> -

    If Juliet's server supports PEP (thereby making juliet@capulet.com a virtual pubsub service), it MUST return an identity of "pubsub/pep":

    - - - - - ... - - - ]]> -

    Second, benvolio@montague.net sends a disco#items request to juliet@capulet.com:

    - - - - ]]> -

    The account owner's server MUST check the access model for each of the account owner's PEP nodes and MUST return as service discovery items only those nodes to which the contact is allowed to subscribe or from which the contact is allowed to retrieve items without first subscribing.

    -

    Therefore, in this case, the server would return only the "http://jabber.org/protocol/tune" node (since it has an open access model and the contact does not have a presence subscription to the account owner's presence):

    - - - - - - ]]> -

    Next, nurse@capulet.com sends a disco#items request to juliet@capulet.com:

    - - - - ]]> -

    However, in this case, the server would return the "http://jabber.org/protocol/tune" node (open access model) and the "http://jabber.org/protocol/activity" node (presence access model):

    - - - - - - - ]]> -

    Finally, romeo@montague.net sends a disco#items request to juliet@capulet.com:

    - - - - ]]> -

    In this case, the server would return the "http://jabber.org/protocol/tune" node (open access model) and the "http://jabber.org/protocol/activity" node (presence access model) and the "http://jabber.org/protocol/geoloc" node (roster access model):

    - - - - - - - - ]]> -
    - -

    If an entity is not subscribed to the account owner's presence, it MUST subscribe to a node using the protocol defined in XEP-0060. For instance, here is how benvolio@montague.net would subscribe Juliet's tune information:

    - - - - - - ]]> -

    However, when a contact is affiliated with the account owner through a presence subscription, PEP greatly simplifies the subscription process. This is done by associating the presence subscription with a pubsub subscription to the account owner's root collection node (i.e., bare JID), with a subscription_type of "items" and a subscription_depth of "all".

    +

    If an entity is not subscribed to the account owner's presence, it MUST discover and then subscribe to a node using the protocol defined in XEP-0060. However, when a contact and account owner are subscribed to each other's presence, PEP greatly simplifies the subscription process. This is done by associating the presence subscription with a pubsub subscription to the account owner's root collection node (i.e., bare JID), with a subscription_type of "items" and a subscription_depth of "all".

    Consider the following presence subscription exchange:

    @@ -467,7 +381,7 @@ - + Gerald Finzi @@ -490,7 +404,7 @@ type='headline' id='foo'> - + Gerald Finzi @@ -509,7 +423,7 @@ type='headline' id='foo'> - + Gerald Finzi @@ -531,7 +445,7 @@ type='headline' id='foo'> - + Gerald Finzi @@ -568,7 +482,7 @@ ]]>

    Note: In XEP-0115, the "ext" values are opaque strings with no semantic meaning.

    -

    It is the responsibility of the account owner's server to cache XEP-0115 information (including "ext" values and their associated namespaces). When the server receives presence from a contact, it MUST check that presence information for entity capabilities data and correlate that data with the desired namespaces for the contact's client. The server MUST NOT send notifications related to any data formats that the contact's client has not asked for via the relevant "namespace+notify" disco#info feature. This enables a client to turn off all notifications (e.g., because of bandwidth restrictions) and to easily receive all desired data formats simply by adding support for the appropriate "namespace+notify" combination in its disco#info results and client capabililies. However, it also implies that a client can request notifications only on a global basis and cannot request, say, mood information only from certain contacts in the user's roster. Community consensus is that this is an acceptable tradeoff. Also, note that this works only if the account owner has a presence subscription to the contact and the contact has a presence subscription to the account owner.

    +

    It is the responsibility of the account owner's server to cache XEP-0115 information (including "ext" values and their associated namespaces). When a PEP-enabled server receives presence from a contact, it MUST check that presence information for entity capabilities data and correlate that data with the desired namespaces for the contact's client. The server MUST NOT send notifications related to any data formats that the contact's client has not asked for via the relevant "namespace+notify" disco#info feature. This enables a client to turn off all notifications (e.g., because of bandwidth restrictions) and to easily receive all desired data formats simply by adding support for the appropriate "namespace+notify" combination in its disco#info results and client capabililies. However, it also implies that a client can request notifications only on a global basis and cannot request, say, mood information only from certain contacts in the user's roster. Community consensus is that this is an acceptable tradeoff. Also, note that this works only if the account owner has a presence subscription to the contact and the contact has a presence subscription to the account owner.

    Some examples may help to illustrate the concept of notification filtering. Here we show presence generated by two of the contacts listed above (benvolio@montague.net does have any presence subscriptions to or from juliet@capulet.com and therefore is not involved in these protocol flows).

    @@ -634,9 +548,9 @@ ]]>

    Now we revisit account owner publication and server generation of notifications, with filtering enabled because the server has caps information:

      -
    • If Juliet publishes a tune item to the open-access "http://jabber.org/protocol/tune" node, her server will send notifications to <benvolio@montague.net> (bare JID) and to <nurse@capulet.com/chamber> (full JID) but not to <romeo@montague.net/orchard>.

    • -
    • If Juliet publishes an activity item to the presence-access "http://jabber.org/protocol/activity" node, her server will send notifications only to <nurse@capulet.com/chamber>.

    • -
    • If Juliet publishes a geolocation item to the roster-access "http://jabber.org/protocol/geoloc" node, her server will send notifications only to <romeo@montague.net/orchard>.

    • +
    • If Juliet publishes a tune item to the open-access "mytunes" node (pubsub type "http://jabber.org/protocol/tune" node, her server will send notifications to <benvolio@montague.net> (bare JID) and to <nurse@capulet.com/chamber> (full JID) but not to <romeo@montague.net/orchard>.

    • +
    • If Juliet publishes an activity item to the presence-access "whatimdiong" node (pubsub type "http://jabber.org/protocol/activity"), her server will send notifications only to <nurse@capulet.com/chamber>.

    • +
    • If Juliet publishes a geolocation item to the roster-access "whereiam" node (pubsub type "http://jabber.org/protocol/geoloc"), her server will send notifications only to <romeo@montague.net/orchard>.

    @@ -681,7 +595,7 @@ type='headline' id='foo'> - + Gerald Finzi @@ -699,7 +613,13 @@ -

    As noted, PEP services may be used to implement private data storage, such as defined in &xep0049;. A future version of this document will specify this usage in more detail.

    +

    As noted, PEP services can be used to implement so-called "private data storage", similar in functionality to the dedicated protocol described in &xep0049; (which is often used for storing client preferences, user bookmarks, and the like). In essence, a private node is a pubsub node whose access model is "whitelist", where there are no entities in the whitelist (the account owner is automatically granted access to the node and therefore receives all node events and can retrieve items from the node at will). This results in the following functionality:

    +
      +
    • The account owner is able to create as many private data nodes as desired (e.g., for client preferences, bookmarks, public keys, etc.).
    • +
    • The account owner is able to create any number of privata data nodes per payload namespace (e.g., different sets of bookmarks).
    • +
    • The account owner is able to add and delete private data in a granular fashion (not by updating the entire data store for the relevant namespace as in XEP-0049).
    • +
    • Each of the account owner's resources will receive notifications related to data updates (based on PEP's dynamic namespace matching).
    • +
    @@ -764,4 +684,8 @@

    The authors wish to thank the participants in the XMPP Interoperability Testing Event held July 24 and 25, 2006, who provided valuable feedback that resulted in radical simplification of the protocol.

    + +

    Version 1.0 included the principle that "there is only one publish-subscribe node associated with any given payload type (XML namespace) for the account owner (e.g., there is one pubsub node for geolocation events, one node for tune events, and one node for mood events)." The rationale for this principle was simplification of node creation, discovery, publishing, and subscribing. However, node discovery and subscribing are already simplified through the use of presence extensions. In addition, hardcoding NodeIDs in this way violates the core pubsub principle that NodeIDs shall be opaque. Therefore the "one node per namespace" principle was removed in version 1.1 of this specification.

    +
    +