|
From: Yonik S. <yo...@ap...> - 2008-03-12 14:25:00
|
On Tue, Mar 11, 2008 at 5:49 PM, Doug Cutting <cu...@ap...> wrote: > > An example application can be an online email system. > > The keys of a user's emails are prefixed by the user name, > > so a user's emails are located together on the ring. When > > a user searches his/her emails, the query is only sent to > > servers which cover that range, instead of the entire ring. > > We could just define doc ids as 128-bit numbers rather than strings. > Then user-provided hash values wouldn't be a special case. A > constructor could convert string ids to 128-bit ids, and also store the > original string in a field named "id". Allowing the user to specify a hash value doesn't seem so different from allowing them to specify a numeric id... it's just 32 bits vs 128 bits. Ning's use case doesn't seem to require collision-free hashes. Perhaps there are other advantages to a numeric id that also serves as the hash though. -Yonik > 128-bits is big enough that we shouldn't see collisions. > > http://en.wikipedia.org/wiki/Birthday_attack > > By my reading, it would take over a trillion collections of a trillion > documents each before a collision is probable. |