Answer for the item removals in the middle. - Ville

On Thu, Nov 19, 2009 at 3:01 PM, Dirk Meyer <[email protected]> wrote:

> Hi,
>
> catching up with the discussion now that I have more free time again.
> The ver attribute looks like what I need for XEP-0189 and stoarge in
> general.
>
> Peter Saint-Andre wrote:
> > I've added text about the 'ver' attribute to XEP-0060. It's perhaps a
> > bit underspecified right now. Feedback welcome. See also:
> >
> > http://xmpp.org/extensions/tmp/xep-0060-1.13.html
> >
> > ######
> >
> > 7.1.2.4 Item Versioning
> >
> > If configured to do so (via the "pubsub#versioning" configuration
> > field), the service can include the "version" of the published data when
> > it generates notifications.
> >
> > Example 105. Service Notifies Subscribers
> >
> > <message from='pubsub.shakespeare.lit' to='[email protected]'
> id='foo'>
> >   <event xmlns='http://jabber.org/protocol/pubsub#event'>
> >     <items node='princely_musings'
> >            ver='some-version-string'>
> >       <item id='ae890ac52d0df67ed7cfdf51b644e901'
> >             publisher='[email protected]'>
> >         [ ... ENTRY ... ]
> >       </item>
> >     </items>
> >   </event>
> > </message>
> >
> >
> > Definition: The 'ver' attribute is a string that identifies a particular
> > version of the data published at a node. The value MUST be generated
> > only by the server and MUST be treated by the client as opaque. The
> > server can use any appropriate method for generating the version ID,
> > such as a hash of the published data (e.g., of all the current items
> > cached at the node) or a strictly-increasing sequence number.
>
> Sounds good to me
>
> > 6.5.9 Requesting All Items Since a Given Version
> >
> > The subscriber can request all items published since a particular
> > version of the published data by specifying the Node ID and 'ver'
> > attribute (about which see Item Versioning).
> >
> > Example 87. Subscriber requests items since a given version
> >
> > <iq type='get'
> >     from='[email protected]/barracks'
> >     to='pubsub.shakespeare.lit'
> >     id='items3'>
> >   <pubsub xmlns='http://jabber.org/protocol/pubsub'>
> >     <items node='princely_musings'
> >            ver='some-version-string'/>
> >   </pubsub>
> > </iq>
> >
> >
> > The service would then return all the items published since that version
> > of the data published at the node.
>
> What happens with deleted items? E.g. you have items 1, 2, 3 and the
> current version has 1, 3, 4. The server sends 4 in <items> but must have
> a way to signal that 2 is gone now.
>
>
Yes, that is exactly what I meant with this earlier,

"Succesfull need of use for 'ver' described above would require the
'retract' messages to hold the same 'ver',
 ___and service to keep the retracted items as answers for those who will
subscribe the items after 'ver'=xxx,___
 the time or number of the retracts should be configuratable through the
service.
"


> I have another request for the ver attribute: initial message after
> subscription. We have pubsub#send_last_published_item and I would like
> to suggest new possible values such as only_ver_on_sub_and_presence and
> only_ver_on_sub. Instead of sending the last item as PEP does, only send
> the version when a new client subscribes or gets online with
> auto-subscription.
>
> For the persistent storage using pubusb I would like to send my presence
> status to the server with the auto-subscription hash and receive the ver
> attributes of all my storage nodes (pubkeys, bookmarks) and fetch the
> changed items.
>
> Dirk
>
> --
> ACK and you shall receive.
>

Reply via email to