|
From: Jonathan D. <jd...@wu...> - 2005-05-05 04:06:47
|
I was wondering what was wrong with this horrible math. Hexidecimal is 0-15, true, but that's not 16 bits... its 4 bits! Duh! 32 * 4 bits = 16 bytes, or 4 ints. I think this is a reasonable key size... my guess is that this is the best way forward for keys. Alternately we could use sha1 which is 20 bytes, further reducing the chance of a collision. On Mar 3, 2005, at 12:12 AM, Jonathan Dance wrote: > Err, its' 32 * 16 bits, or 64 bytes. This makes the collision > chance slightly bigger but you get the idea. > > --JD > > On Mar 3, 2005, at 12:10 AM, Jonathan Dance wrote: > > >>> Another issue is unique IDs. Assuming we store songs/albums/ >>> artists in a database, how will the clusters have the same IDs as >>> the central database (or, every other database)? The first >>> inclination is to store this on the central server and have the >>> clusters download this information. When a new song is submitted >>> to a cluster, it tells the central server. >>> >> >> Just thought of this: >> IDs could be based on a hashing algorithm, like MD5. MD5 is 34 * >> 16 bits = 34 * 2 bytes = 68 bytes. That's a pretty long ID but it >> has a 3.38 x 10^-21 chance of a collision. >> >> --JD >> >> > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real > users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Openscrobbler-devel mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openscrobbler-devel > |