Mammatus

Initially developed at Eniro.se when I worked there but after I left they accepted that I released the code open source so it can be maintained and spread. Now tailsweep.com uses it in many extreme situations like content delivery.

Mammatus's main focus is to deliver various cache and storage solutions which each addresses common challenges. All implementations follow the java.util.Map interface which makes it very easy to plugin. If your application's data is of key/value characteristics which would suite in storing in a java.util.Map like structure then perhaps Mammatus is something for you.

Most of the implementations are tested in real life under extreme conditions but many are not. The Open Source Community can help out by using this fine library and reporting bugs.

Get updated and receive info about the project! Join the Google group

TODO

  • Symmetric cluster where all key/pairs reside on all machines. Initial work is started and near completion in SymmetricJgroupsCacheEngine which suites cache data but not yet reliable enough to store business critical data.
  • Asymmetric sharded cluster which replicates each key/value X times and provides a unified state. Initial work is started in AsymmetricJgroupsEngine which suites cache data but not yet reliable enough to store business critical data.
  • HashedDiskCache should have an index at the top which knows what key maps to what file.

News

  • 2008-09-14 Uses Haloe instead of core-lucene
  • 2008-09-08 Renamed to Mammatus from AbstractCache.
  • 2008-06-08 Added thrift, which is a perfect solution for sharing state between languages and applications, currenty only support for binary data though.
  • 2008-06-08 Added key locking (i.e row locking) where you just supply a org.apache.lucene.store.LockFactory to the cache, a Distributed Lock Manager will soon be released.
  • 2008-06-07 Added a draft to a HTTP API to the cache in form of an embedded Jetty server.
  • 2008-05-25 Added HBaseCache which uses hbase as storage. Intended for use in large clusters where HA is key.
  • 2008-05-08 Replaced the JDBM B+TRee implementation with Apache Xindices implementation which is 10 times faster on writes.
  • 2008-05-07 Added a Lucene Storage engine which performs really well.

Features

  • Fast and Flexible
  • Spring support - Most modern Java modules today have spring support so does this one.
  • Generics support - Only want to store instances of the same type in the Cache huh ?
  • Support for Hibernate as 2nd level cache - All caches can be used as 2nd level cache by wrapping them in the "HibernateCacheStrategy"
  • Various memory based cache policies
  • Persistance - Many applications would prefer if the data wasn't lost whenever the applicaton is restarted and therefor many caches which persist the objects have been implemented or each cache can be wrapped in other caches which persist the data.
  • Chaining/wrapping. You can wrap a cache in another for instance a LruCache wrapped in a TimedCache making it evict on time and on lru.
  • Clustering and membership with JGroups.
  • MemCached client, both SpyMemcached and Greg Whalin's client is implemented and tested in heavy conditions.
  • All caches support the method lock(key) which makes applications able to handle the state atomically.
  • All caches have listener support which gets notified on the put, remove, clear, lock, release events.