2009/7/7 Matthew Wild <[email protected]>
> 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]).

Yes, This is a standard issue with timestamps. Nonetheless, timestamps work
fine for most applications -- with the caveat that there are occasional
issues with granularity. If you're really worried about it, then you end up
with a sequence number (like that used in rosters or the eTag of HTTP). But,
then you get into another set of issues that are just as troubling as those
with timestamps. For instance, if your system scales, you'll eventually need
to have different components processing messages and you won't want to
bottleneck them all through a single sequence number assignment component.
The result will be all sorts of problems with maintaining not only unique
numbers but ordered numbers... Moving from timestamps to ordered sequences
doesn't actually solve the problem, it only hides it in small systems. With
sufficient scale, timestamps and ordered sequences are pretty much the same
problem. So, why not just use a timestamp, make sure folk know about the
granularity issues, and do the simple thing.

bob wyman


2009/7/7 Matthew Wild <[email protected]>

> On Thu, Jul 2, 2009 at 6:37 PM, Bob Wyman<[email protected]> wrote:
> > On Wed, Jun 3, 2009 at 5:56 AM, Dirk Meyer <[email protected]> wrote:
> >> I want to know if my storage changed. I want
> >> to know if I need to get the items from
> >> MyStorage or if they are still the same as before.
> >
> > 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>
> >
> > Note: Of course, if you use if-modified-since, you should always use a
> > timestamp that was previously returned by the specific server you were
> > talking to -- do not try to figure out by looking at your own local wall
> > clock time...
> >
>
> 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]).
>
> Matthew
>

Reply via email to