Ayende @ Rahien

My name is Oren Eini
Founder of Hibernating Rhinos LTD and RavenDB.
You can reach me by phone or email:


+972 52-548-6969

, @ Q c

Posts: 5,969 | Comments: 44,492

filter by tags archive

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.


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

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

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


Ping Sriram, ask him how you can help him


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


Comment preview

Comments have been closed on this topic.


No future posts left, oh my!


  1. Production postmortem (5):
    29 Jul 2015 - The evil licensing code
  2. Career planning (6):
    24 Jul 2015 - The immortal choices aren't
  3. API Design (7):
    20 Jul 2015 - We’ll let the users sort it out
  4. What is new in RavenDB 3.5 (3):
    15 Jul 2015 - Exploring data in the dark
  5. The RavenDB Comic Strip (3):
    28 May 2015 - Part III – High availability & sleeping soundly
View all series



Main feed Feed Stats
Comments feed   Comments Feed Stats