Memcached is a popular in-memory distributed cache that is used to boost the performance of high traffic applications. Memcached however has various limitations in the areas of high availability, data replication, cache elasticity, and ease of management.
NCache is an extremely fast and scalable in-memory distributed cache for .NET that provides 100% uptime, intelligent data replication including WAN replication, cache elasticity through dynamic clustering, and much more. See below for a detailed comparison between NCache and Memcached:
If you have a Memcached application that you want to migrate to NCache in order to take advantage of the benefits that NCache offers over Memcached, you can easily do so without making any code changes to your application, simply by using the Memcached Wrapper for NCache.
The Memcached Wrapper for NCache provides two options for a no-code-change migration from Memcached to NCache. The Memcached Plug-In is for .NET and Java applications, and the Memcached Gateway is for all applications. These are explained below:
For .NET and Java applications using Memcached, the Memcached Plug-In for NCache provides a no code change option to migrate from Memcached to NCache. There’s no need to even recompile your application. Simply replace your Memcached client library (.NET assemblies) with the equivalent library provided by Alachisoft.
Alachisoft has taken most of the popular Open Source Memcache client libraries for .NET and rewritten them internally so they talk to NCache instead of Memcached. The client API however, remains the same, so your application is unaware of this change. Here are the libraries provided by Alachisoft:
Using the Memcached Plug-In is recommended for .NET and Java applications over the Memcached Gateway, because the Plug-In offers faster performance than the Gateway. This is due to the fact that there is no extra hop in the Plug-In approach.
You can use the Memcached Plug-In for applications that are already deployed in production, since there are no code changes or code recompilation required.
The Memcached Gateway is an NCache server process that implements the Memcached Protocol (both text and binary) and therefore automatically supports any Memcached client. Simply point the Memcached application to this process, and the application will see it as a Memcached server, unaware that it is communicating with the Memcached Gateway to NCache.
The benefit of using the Memcached Gateway is that it can be used with any Memcached application regardless of the programming language used, because the application talks to the Memcached Gateway across a TCP/IP socket.
The Memcached Gateway can be deployed in one of two possible configurations:
The Memcached Client Gateway is deployed on the application servers. The Memcached Client Gateway connects with the NCache cache cluster, and it routes all client requests to NCache, and all responses to the client application. This is the recommended deployment configuration for a Memcached Gateway solution.
The Memcached Server Gateway is similar to the Memcached Client Gateway, except that it is deployed on one or more separate virtual machines. It may even be deployed on NCache cache servers. Each Memcached Server Gateway then connects to the NCache cache cluster in the same way that the Memcached Client Gateway does. Use this option only if you don’t want to touch your application servers.