incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tatu Saloranta <tsalora...@gmail.com>
Subject Re: UUIDs whose alphanumeric order is the same as their chronological order
Date Thu, 24 Jun 2010 17:31:17 GMT
On Wed, Jun 23, 2010 at 12:18 AM, David Boxenhorn <david@lookin2.com> wrote:
> 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?

Ok! It all makes sense -- honestly I just wanted to try to explain why
certain consensus builds, not to argue against your way of doing
things.
I don't think you are missing anything obvious, my suggestions are
really secondary arguments. I think you have good reasons and code
looked solid.

And yes, implementing time-based UUIDs leads to quite a few
complications, if one tries to address all oddities.
This is probably why JDK UUID is so limiting, I assume JDK authors did
not want to deal with such aspects.
And that is why I think that fundamentally random-based variant is
good for the main goal of achieving uniqueness.

> 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 !

Yes, that is definitely overly complicated (IMO). Perhaps Cassandra
could add convenience methods for mundane things like converting
between java.util.UUID and byte[].
Or authors of nice extension/convenience libraries like Hector (and
others mentioned -- apologies for not listing I just worry I misspell
their names :) )

-+ Tatu +-

Mime
View raw message