Storage Plan: Map v/s linear

Dustin Sallings dustin at spy.net
Sat Nov 10 21:00:37 UTC 2007


On Nov 10, 2007, at 4:14, Rakesh Rajan wrote:

> I would like to know which of option is better for my requirement ?


	I'd probably favor option 1 as a first pass simply because it's  
atomic.  With option 2, you can lose some mappings between a user and  
his friend without knowing it.  You can't tell the difference between  
``not a friend'' and ``don't know.''

	Option 1 is heavier if you're just asking if user b is a friend of  
user a when user a has  a lot of friends, but option 2 won't work  
reliably unless you record both friend and known not-friend  
relationships (from max p^2 to always p^2).

-- 
Dustin Sallings





More information about the memcached mailing list