ZooCache is a simple cache implementation on top of ZooKeeper™
- A cache with ZooKeeper capabilities (fault tolerance, distributed, performance (see here for example)
- TTL for items
- Can use a local shadow (simple LRU cache) to save on network calls
- Ability to invalidate local shadow even if TTL has not passed
- 3 APIs - synchronous, Async (returns scala Futures) and Actor
The project is currently compiled and tested with Scala 2.9.1
General note ZooKeeper is not the perfect ultimate cache due to some zookeeper known limitations. Thus, please note the following caveats:
- ZooKeeper has a 1MB transport limitation. For now a single cache node (systemID) can hold around 10K items (sharding of keys to create deeper will be added later)
- The startup can be slow on large ZNode so keep TTLs low for larger caches
- ZooKeeper can start to perform badly if there are many nodes with thousands of children.
- all data is kept in memory, all nodes contains exact replica of the data
NICE Systems (NASDAQ: NICE), is the worldwide leader of intent-based solutions that capture and analyze interactions and transactions, realize intent, and extract and leverage insights to deliver impact in real time.
- curator - Netflix Zookeeper client library.
- messagepack - Fast binary serializer/deserialzer.
- Apache commons-collection - the client side shadow uses the commons-collection LRU cache
- grizzled-slf4j -Scala friendly wrapper for slf4j
- Akka - Akka Actor based concurrency