Memcached for Windows

Zeddy brought this to my table for a review (thanks for him!). Simply said, memcached is a proven distributed memory object caching system, very generic in nature, run in many platforms. People use that to speed up data driven web applications by alleviating database workload, Facebook, Flickr, Youtube, and many big giant social network sites are using memcached to serve million users. That’s why I think it is important to share here how you can take advantage from this technique as well. You can read from memcached documentation about its low level nature. In this post, I will show you how to start quickly.

 

Build memcached on Windows

First, you can download the latest libevent and memcached source codes from here. I am using version 1.2.6 and compile it using VC++ 2008. There are some *.txt documentations inside the source codes that explain clearly the  low level nature of its protocol and implementation. Launch your VC++ (you can use VC++ Express) then open the libevent project and then add memcached project in the same solution.

01

Make sure you compile libevent before and the location of compiled libevent.lib file. Locate that file in the linker property of memcached project. Looks like below:

02

Then you can build your memcached project. If you found compile time error on winsock extension (ws2tcpip.h), just delete the following codes then compile again. I hope you have no problem anymore.

INT
WSAAPI inet_ntop( __in INT Family, __in PVOID pAddr, __out_ecount(StringBufSize) PSTR pStringBuf );

Once you are done with compilation, you can launch memcached.exe for installation:

memcached –d install

Check on your Windows Service if the memcached service already installed. After that you can start memcached with some options (-help), for example if you want to allocate 2GB RAM and use port 11211:

memcached –d start –m 2024 –p 11211

Make sure to check memcached server if it is running well or not (TCP and UDP).

03

Using Memcached Manager

using this tool, you can manage your memcached server easily on Windows. You can also use this tool to generate client configuration file for enyim.com Memcached Client that you can use from client.

0405

 

How to use in ASP.NET

I am using Memcached Provider 1.2  from CodePlex. To shorten this post, I will write another post to guide you how to use Memcached Provider 1.2 with ASP.NET 3.5. However, you can use the two walkthrough articles from CodePlex if you really want to try earlier.

 

Have nice weekend!.

 

Ciao – RAM

Share this post: | | | |
Published Friday, April 03, 2009 6:18 PM by Risman Adnan Mattotorang

Comments

# re: Memcached for Windows

buset ini berjiwa opensource banget, semuanya harus di-build from source, nggak mau ngambil yg versi binary :)

boss, selain memcached yg dibuat dgn C dan optimized, coba oprek beberapa .NET Memcached berikut:

CacheMan (dibuat ama programmer Microsoft): www.sriramkrishnan.com/.../cacheman-fast-distributed-hashtable-for.html

Performance: 16,000 requests per second

NMemcached (dibuat oleh programmer superman):

ayende.com/.../Scratching-an-itch-NMemcached.aspx

Performance: using standard memcache tests -> memcache: 1700ms | nmemcached: 3000ms

Friday, April 03, 2009 7:51 PM by zeddy

# Pages tagged "social code"

Pingback from  Pages tagged "social code"

Friday, April 03, 2009 10:03 PM by Pages tagged "social code"

# Project Velocity – Answer to Memcached?

Again, Zeddy is responsible for this, weekend insomnia! Regarding my previous post about Memcached, Zeddy

Saturday, April 04, 2009 12:53 AM by Risman Adnan

# Project Velocity – Answer to Memcached?

Regarding my previous post about Memcached, Zeddy pointed me to Project Velocity . This is exactly what

Saturday, April 04, 2009 1:15 AM by RAM in Brunei

# Project Velocity – Answer to Memcached?

Regarding my previous post about Memcached, Zeddy pointed me to Project Velocity . This is exactly what

Saturday, April 04, 2009 1:19 AM by RAM in Cambodia

# Project Velocity – Answer to Memcached?

Regarding my previous post about Memcached, Zeddy pointed me to Project Velocity . This is exactly what

Saturday, April 04, 2009 1:23 AM by RAM in Laos

# Project Velocity – Answer to Memcached?

Regarding my previous post about Memcached, Zeddy pointed me to Project Velocity . This is exactly what

Saturday, April 04, 2009 1:26 AM by RAM in Nepal

# Project Velocity – Answer to Memcached?

Regarding my previous post about Memcached, Zeddy pointed me to Project Velocity . This is exactly what

Saturday, April 04, 2009 1:34 AM by RAM in Srilanka

# Project Velocity – Answer to Memcached?

Regarding my previous post about Memcached, Zeddy pointed me to Project Velocity . This is exactly what

Saturday, April 04, 2009 10:54 AM by RAM in Vietnam

# re: Memcached for Windows

This post is now becoming Velocity thread.

Saturday, April 04, 2009 7:56 PM by Risman Adnan Mattotorang

# .NET中使用Memcached的相关资源整理

Memcached官方站点: http://www.danga.com/memcached / Memcached Win32 1.2.6下载: code.jellycan.com/memcached

Sunday, July 19, 2009 10:29 AM by dudu's 镜像

# .NET中使用Memcached的相关资源整理

Memcached官方站点:www.danga.com/memcached

MemcachedWin321.2.6下载:http://code.jellycan.com/memc...

Friday, July 31, 2009 10:53 AM by 麦子同学

# 【转】.NET中使用Memcached的相关资源整理

Memcached官方站点:www.danga.com/memcached MemcachedWin321.2.6下载:http://code.jellycan.com/me...

Monday, August 03, 2009 3:20 PM by JoeWang

# .NET中使用Memcached的相关资源整理

Sunday, November 08, 2009 7:49 AM by 周骏