[Standards-JIG] Re: JEP-0124: datatype for 'rid' attribute

Ian Paterson ian.paterson at clientside.co.uk
Thu Feb 9 14:57:00 UTC 2006

Hi Mridul,

Ian wrote:
> > A limit of 2147483647 would seem to offer a range large 
> > enough to provide both 'unpredicability', and the 'certainty' 
> > that the limit will never be reached. Choosing a random 
> > initial rid to be anything up to 1 billion, would allow a 
> > session with ten requests every second to last over 3.5 years.
> > Do we need to be more conservative than that to allow for 
> > future non-IM XMPP applications? IMHO 9007199254740991 = 
> > 2^53-1 would be another possible candidate (higher 
> > limits would be tricky for server connection managers 
> > written in some weakly typed higher-level languages).

Mridul wrote:
> Makes sense to make it unsigned long so that we dont box 
> ourselves in for the future.
> Also allows a higher space for random number generation...

Yes, and it also removes the necessity for client and server
implementations to include code that handles wrapping back to 1, since
it is trivial for clients to select an initial rid that will never be
incremented above the maximum value.

This change has been made to the final paragraph in Section 7 of the JEP
in the CVS:

- Ian

More information about the Standards mailing list