cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Boxenhorn <da...@lookin2.com>
Subject Re: UUIDs whose alphanumeric order is the same as their chronological order
Date Wed, 23 Jun 2010 07:18:19 GMT
Tatu, I did read your comments - and I appreciate them very much!

I want someone to argue with me (using good arguments) since what I'm doing
*does* seem weird to me - because no one else is doing it.

What I mean by readable is that the sort order of my UUIDs are obvious to
humans.

What I mean by "weird code" is mostly that it doesn't come with enough
authority that I would trust it as a black-box more than my own code. For
example, what happens when I want to port it to different kinds of machines?
But another thing weird about it is the complexity (and I think low speed)
of the algorithms I need in my *own* code to use it. Just look at it
http://wiki.apache.org/cassandra/FAQ#working_with_timeuuid_in_java !



On Wed, Jun 23, 2010 at 10:03 AM, Tatu Saloranta <tsaloranta@gmail.com>wrote:

> On Tue, Jun 22, 2010 at 11:54 PM, David Boxenhorn <david@lookin2.com>
> wrote:
> > Having a physical location encoded in the UUID *increases* the chance of
> a
> > collision, because it means fewer random bits. There definitely will be
> more
> > than one UUID created in the same clock unit on the same machine! The
> same
> > bits that you use to encode your few servers can be used for over 100
> > trillion random numbers!
>
> You did not read what I wrote... I did not say it does, just that
> people feel as if it does.
> >
> > "As to ordering, if you wanted to use time-uuids, comparators that do
> > give time-based ordering are trivial, and no slower than lexical
> > sorting."
> >
> > "No slower" isn't a good reason to use it! I am willing to take a
> > (reasonable) time *penalty* to use lexically ordered UUIDs that will work
> > both in Cassandra and Oracle (and which are human-readable - always good
> for
> > debugging)!
>
> Huh? These are plain old UUIDs, as readable (or not) as any.
> Comparator refers to java.util.Comparator (or Comparable for class
> itself).
>
> But fear not, I am not trying to change your mind, just pointing out
> that there is nothing magical about getting things to sort.
> Just that sorting by standard String representation is not the only
> collation order there is.
>
> >
> > I am also willing to take a reasonable penalty to avoid using weird
> > third-party code for generating UUIDs in the first place.
>
> To each his own -- lots of people use "weird" code, and generally use
> little bit less derogatory and patronizing terms when referring such
> libraries.
>
> And it seems to me that you are perfectly happy writing your own
> "unweird" code to generate them instead. :-)
>
> -+ Tatu +-
>

Mime
View raw message