is a distributed cache, sitting in front of a DB, eliminating the DB as a bottleneck.
memcached is written in C and can be accessed by clients written in any language through the memcached protocol.
is an implementation of memcached in Java, on top of JGroups
It is written specifically for Java
clients running in the same address space as PartitionedHashMap. This eliminates the memcached protocol, which slows down things through serialization and round tripping.
Other advantages over memcached include:
- PartitionedHashMap processes form a cluster, and know when nodes join or leave, and are therefore able to rebalance the data.
- PartitionedHashMap includes an L1 cache, which acts as edge cache, so frequently accessed elements can be cached near the clients.
- JGroups is used as transport for RPCs. This allows for full control and customization of the transport, e.g. adding compression or encryption.
The full article is here