On 7-Jul-2009, at 10:22, Matthew Wild wrote:
In another thread, the idea of timestamps for items is being
discussed. I
suggested there that it might be appropriate to mirror the behavior
of HTTP
"if-modified-since" requests by allowing clients to specify a
timestamp for
the oldest items to retrieve from persistent storage. If timestamps
on items
are supported would this satisfy your requirement?
For instance:
<pubsub xmlns='http://jabber.org/protocol/pubsub'>
<items node='urn:xmpp:pubkey:0'
if-modified-since='2009-07-01T01:33:23Z'/>
</pubsub>
The other problem with timestamps was highlighted in the roster
versioning discussions - timestamps are not unique (multiple items may
be published by different people to the same node in under a second
[or whatever time resolution you use]).
I hate timestamps on principle. They're not particularly well suited
to anything except for human consumption. The roster versioning
approach is much cleaner: opaque version attributes which the server
negotiates. This is also a generic mechanism that is applicable to all
of PubSub as it improves performance and solves a race condition that
exists in the current protocol. retrieve-items and publish events are
asynchronous, so there's no way (short of potentially hairy
application level code) to determine current state in some situations.
The only problem I see is that the semantics are a bit different
under PubSub than rosters. Would I attach the version attribute to the
subscribe request? To the retrieve-items request? Should there be
another request added?
-bjc