On 3/30/09 11:40 PM, Curtis King wrote:
> 
> On 30-Mar-09, at 7:12 PM, Peter Saint-Andre wrote:
> 
>> As far as I can see, nothing in XEP-0237 (Roster Versioning) prevents a
>> server from using timestamps (e.g., seconds in the Unix era) as
>> version/sequence numbers. Would that be a popular approach? If so, we
>> might want to add a note about it in the spec.
> 
> time makes a bad counter as it can go backwards and there are resolution
> issues ;-)
> 
> Instead follow rfc4551 for version number,
> 
>    An IMAP server that supports this extension MUST associate a positive
>    unsigned 64-bit value called a modification sequence (mod-sequence)
>    with every IMAP message.  This is an opaque value updated by the
>    server whenever a metadata item is modified.  The server MUST
>    guarantee that each STORE command performed on the same mailbox
>    (including simultaneous stores to different metadata items from
>    different connections) will get a different mod-sequence value.
>    Also, for any two successful STORE operations performed in the same
>    session on the same mailbox, the mod-sequence of the second completed
>    operation MUST be greater than the mod-sequence of the first
>    completed.  Note that the latter rule disallows the use of the system
>    clock as a mod-sequence, because if system time changes (e.g., an NTP
>    [NTP] client adjusting the time), the next generated value might be
>    less than the previous one.

Thanks for the text. That looks helpful. I'll borrow accordingly.

Peter

-- 
Peter Saint-Andre
https://stpeter.im/

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to