"Jonathan S. Shapiro" <shap@eros-os.org> writes:
> > > Also, TIME probably needs to be more precise than seconds since epoch,
> > > because several transactions might arrive in one second. Adding the
> > > microsecond count from gettimeofday() should be good enough.
> >
> > Why not just use an incremented counter (plus pid)? This avoids a
> > system call per transaction, and is just simpler.
>
> This is often a useful way to go, but take care that the sequence numbers
> only need to be sequenced with respect to a single repository. Otherwise,
> you'll find later that they become a bottleneck to distribution.
>
> Another observation on this: generating the numbers using sequencing is a
> fine idea, but unless you actually need to be able to sort on this
> identifier, call it an identifier rather than a sequence number. If this is
> done, it becomes possible to reduce the first problem by pre-assigning
> ranges of the namespace to replicate servers.
http://www.freebsd.org/FAQ/misc.html#AEN4661
Received on Sat Oct 21 14:36:08 2006