Ayende @ Rahien

Refunds available at head office

Distributed cache for the CLR

Sriram has just published a post about Cacheman, a pet project  his that give us a Memcached like functionality based on the CLR.

I started a project like that a while ago, but eventually I decided that it would be much easier to just use Memcached. Some of the tricks that Memcached is using is explicit memory management of the layout of the cache. I assume that the GC will take care of much of that for us.

Sriram has managed to get to 16,000 requests / second with his current code. Which is certainly impressive.

I find it very interesting because I am much more comfortable with CLR based tools. I know their failure scenarios and how to deal with them. Native tools... not so much.

I have used Memcached for production, and it works. But assuming that Cacheman would be on par with the Memcached implementation, I believe that I will choose it.

I am reading the code now (well, reflecting over it) and it is interesting read.

Comments

Nick Aceves
02/25/2008 04:56 PM by
Nick Aceves

I started a project like that once too. I was able to get somewhere in the area of 10,000 requests/second without any optimization at all. I would really like to see something like Memcached that's built on top of the CLR, and would even be willing to devote significant time to such a project.

It would be even cooler if the server supported the Memcached protocol, which would allow it to act as a drop-in replacement for Memcached.

Sriram Krishnan
02/25/2008 05:03 PM by
Sriram Krishnan

Thanks for the post (and the mail!). I'll admit up front that it is a big stretch to think of Cacheman as being anywhere close to being on par with Memcached. One is a stable, well-tested piece of code and the other is something I've thrown together over a few weekends :).

It might get there eventually - but its a long road!

Luke Breuer
02/25/2008 06:55 PM by
Luke Breuer

I really like your emphasis on failure scenarios. I think I would word it like this: it is easier to determine how failure is flowing through .NET code than most other code. Now, this is clearly based on my experience. I do, however, see quite the trend in people liking how .NET deals with failure.

Now, if people would only document how failure flows through their system, providing information that stack traces do not... (Like the "why", as opposed to the "what".)

Ayende Rahien
02/25/2008 06:58 PM by
Ayende Rahien

Nick,

Ping Sriram, ask him how you can help him

dru
02/26/2008 01:12 AM by
dru

Thanks for the heads up Ayende. Nice stuff to read.

-d

Comments have been closed on this topic.