Memcached. Memcached runs on Unix, Linux, Windows and Mac OS X and is distributed under a permissive free software license.[3] Memcached's APIs provide a giant hash table distributed across multiple machines. When the table is full, subsequent inserts cause older data to be purged in least recently used (LRU) order.[4][5] Applications using Memcached typically layer requests and additions into RAM before falling back on a slower backing store, such as a database. History[edit] Memcached was first developed by Brad Fitzpatrick for his website LiveJournal, on May 22, 2003.[24][25][26] It was then rewritten in C by Anatoly Vorobey.[27] Architecture[edit] The system uses a client–server architecture. The servers keep the values in RAM; if a server runs out of RAM, it discards the oldest values. If all client libraries use the same hashing algorithm to determine servers, then clients can read each other's cached data. A typical deployment will have several servers and many clients.
Security[edit] Java Memcached Client. Using Memcached with Java - Sudarshan Acharya. Why not JBoss Cache? By default, if you are looking for a caching solution for your Java based enterprise application, the tendency is to go with Java Caches. I have been using JBoss Cache for a couple of years now. It is a very powerful smart cache, which provides clustering, synchronized replication and transaction support.
Meaning, given a cluster of JBoss cache, each instance is aware of the others and will be kept in sync. That way, if one of the instance is down, other instances still be serving your data. Having been plagued with memory problems over and over again, I finally gave up on JBoss Cache and decided to go with a a simple and dumber solution – Memcached. Memcached is widely popular esp. in the PHP and Rails community. 1. 2. 3. In short, the fact that Memcached is so simple and requires almost no maintenance was a big big win for me.
Memcached: However, Memcached is not a persistent store, and doesn’t guarantee something will be in the cache just because you stored it. 2. MySQL and Memcached: End of an Era? If you look at the early days of this blog, when web scalability was still in its heady bloom of youth, many of the articles had to do with leveraging MySQL and memcached. Exciting times. Shard MySQL to handle high write loads, cache objects in memcached to handle high read loads, and then write a lot of glue code to make it all work together. That was state of the art, that was how it was done. The architecture of many major sites still follow this pattern today, largely because with enough elbow grease, it works. This was a pre-cloud, relational database dominated world, built from parts scrounged from the remnants of enterprises and datacenters past. Twitter and Digg started in this era, but are evolving into something different, as scaling pressures increase and new purpose built technologies pop into being.
With a little perspective, it's clear the MySQL+memcached era is passing. LinkedIn has moved on with their Project Voldemort. Plays well with others by Mark Callaghan. Home - Memcached-Java-Client - GitHub.