Memcached with Windows

Memcached with Windows

The memcached network protocol is the same regardless of the client or server OS, meaning that organisations that develop mainly on the Microsoft platform can use a Linux cluster in production, but still conveniently run memcached on the local Windows development server.
Y can get memcached on windows running as a service.

 

How to install Memcached on Windows machine

Download memcached binaries from:

* CouchBase – http://www.couchbase.com/products-and-services/memcached.

* http://code.jellycan.com/memcached/ (Last updated: 25 Jul 2009)

* splinedancer.com:

memcached 1.2.4 Win32 Beta

 

The win32 version of memcached can be run both as a NT Service or from the command line. To install memcached as a service, follow the next steps:

– Unzip the binaries in your desired directory (eg. c:\memcached). You should get only one file named memcached.exe.

– Install the service

using the command: ‘c:\memcached\memcached.exe -d install’ from the command line

  1. You must run memcached.exe as administrator
  2. Install the service using the command:

c:\memcached\memcached.exe -d install

 

Start the server from the Microsoft Management Console (Services) or by running the following command:

‘c:\memcached\memcached.exe -d start’

or

net start "memcached Server"

– Use the server, by default listening to port 11211

There is one more thing left to do. By default, server is set to 64Mb memory limit, which is too small. To correct, go to Registry Editor and find the key

HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/memcached Server

Change the ImagePath entry to:

"C:/memcached/memcached.exe" -d runservice -m 512

This way you will use 512 Mb memory limit for your server.

 

You can find the help by typing “memcached -h”.

 

Read more about memcached with Windows :

* How to install Memcached on Windows machine

 

Windows Server AppFabric

For Web applications, AppFabric provides caching capabilities to provide high-speed access, scale, and high availability to application data.

AppFabric offers that was previously known as “Velocity”.

Codename “Velocity” was the original name for Microsoft’s answer to MemCached, with the benefit of being written specifically for Windows (with x64 compatibility), and also having better ASP.NET integration. Microsoft has bundled this with something for “managing software built with Windows Workflow Foundation and Windows Communication Foundation“. (A project previously codenamed “Dublin”). Those 2 projects (“Velocity” and “Dublin”) have now been put together to make AppFabric.

 

Read more about MS Velocity:

* Windows Server AppFabric

* Getting Started with Velocity (AppFabric Caching Library)

 

 

MS Velocity vs. Memcached

 

 

Memcached with Windows and .NET

Download .NET memcached client library from here:

* http://sourceforge.net/projects/memcacheddotnet/

 

Memcached Windows/.NET clients:

C#/.NET memcached client library. This library can be used by .NET projects to access memcached servers. Ported from the Java memcached library located at http://www.whalin.com/memcached/. This library ws last updated in Nov, 2010.

 

Also there are other caching systems available on .NET:

* http://www.sharedcache.com/cms/

Shared Cache is high performance distributed and replication cache system built for .Net applications running in server farms.
Shared Cache provides distributed and replicated cache topologies which minimize load factor on your databases. Your advantages from this point of view is quite simple, you can scale out your application linear only with hardware and non additional software cost. Shared Cache is written in C# and its 100% managed code.

 

Using AppFabric in ASP.NET