Alternative Memcache Usage: A Highly Scalable, Highly Available, In-Memory Shard Index
blog.maxindelicato.com
blog.maxindelicato.com
I am pessimistic. For one thing author did no address how he plans to keep index fresh in the face of evictions or memcached nodes crashes. It gets really bad - if you did not find the data, is it absent or has it been evicted? Can you create a new user named "FOO" right now? You won't know until you scan the whole data set, which is a "size of data" operation.
There is a case to be made for a resilient RAM-only distributed databases, but using memcached is not it.
Agreed. With the risk of sounding offensive, these kinds of ideas seems about as informed and rational as some of the arguments I hear from MySQL-advicates about why their database is the best RDBMS on the planet.
My intent in using Memcache as the mechanism for this type of indexing was more an attempt to relate the subject with something that most developers are at least somewhat familiar with. I explicitly address the weaknesses of Memcache in the section titled "Weaknesses". I also recommend some work-arounds to lessen the effect of Memcache's limitations. In the "Wrap-Up" section, I even go so far as to say that Memcache is really only one example of a distributed hash-table and that there are alternatives. Rolling your own is another option, and both of solutions are probably better suited to the indexing problem than Memcache.
Again, I was afraid that the subject would be lost on most people if there wasn't at least some relation made between the concept and something that concretely exists. Try to look at it as an exercise in thinking "outside the box", using the best example I could think of.
Thanks for the comments, good and bad. These critiques really do help.
The idea has legs - in a distributed system you no longer need to commit to disk to guard against failures (assuming your power supply is diversified), and if your data fits in RAM then it's certainly a good idea. RAM is getting cheaper at Moore's law curve, which means more and more tasks are getting within reach.