Those random keys are not as random as you may think they are at first blush. 
If you look at the actual code, 
https://github.com/basho/riak_core/blob/master/src/riak_core_util.erl#L131, you 
will see that it is a base62 encoded sha hash of a unique reference within the 
erlang runtime, http://en.wikibooks.org/wiki/Erlang_Programming/Terms, and 
now(), aka. the time.

Cheers,
-Alexander Sicular

@siculars

On Mar 10, 2011, at 10:12 PM, Antonio Rohman Fernandez wrote:

> When posting data to a bucket without specifying a key [ 
> http://server:8098/riak/bucket ] a random-generated key like [ 
> GRwdM5bCPqSdsDa06j5cFNl3i2D, ChVD156ynnfXoZK7Pw9OMGoxUYX, etc... ] is 
> generated... however, shouldn't it be better that Riak generates UUIDs 
> instead of a medium-length random string? using this keys i'm afraid of 
> collisions if a bucket has many items... how collision-free is that 
> algorithm? UUID was specifically created for that purpose, so i think it 
> could be good Riak adopts this system in future versions. any plans for that?
> 
> Rohman
> 
>               Antonio Rohman Fernandez
> CEO, Founder & Lead Engineer
> [email protected]               Projects
> MaruBatsu.es
> PupCloud.com
> Wedding Album
> 
> _______________________________________________
> riak-users mailing list
> [email protected]
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to