Skip to content
Alex Snaps edited this page Aug 21, 2014 · 11 revisions

Ehcache 3 developer wiki

Developer, be welcome!

This wiki contains all design documents and other related material to doing development on Ehcache, not using Ehcache! If you are a developer that wants to get involved in developing new features, fixing bugs, extend the existing or implement a new module based on the Ehcache3 SPIs, this is the place you’ve been looking for. Be welcome!

How to contribute?

Process

On paper (or on this screen), it’s pretty straight forward:

  1. Join the developer mailing list and say hello!

  2. Check the issues and verify what you want isn’t yet planned or could even already being worked on by someone;

  3. If the task exists already and isn’t assigned: drop us an email on the developer mailing list about it and we’ll make sure we help you getting started and we’ll assign the task/issue to you;

  4. If nothing matches in the existing issue list, create a bug as such; or, if we’re talking about a larger task or feature, drop us a message first, and we’ll see how to tackle it;

  5. Fork the project to your own repository and get started (you probably want to work on a dedicated branch);

  6. Rebase your fork and do a pull request. We’ll use that to code review it (see git usage page)

  7. Be rich and famous!

Now, the doing the work part might be a little more challenging, and we don’t provide any guarantees as to becoming rich…​ but you’ll be famous to us!

Contributor agreement

In order to accept any contribution, we will need you to fill out and mail the Individual Contributor Agreement at contributors@terracotta.org.

Code layout

The code core of Ehcache is split in three core modules:

  1. the API module, which contains mainly interfaces. They are the core API to Ehcache (e.g. Cache, CacheManager) that users depend on. It also contains the entry points in terms of SPI (e.g. Service, Store, AuthoritativeTier & CachingTier), that are used by other modules that in turn provide their implementations;

  2. the Core module, that is composed of the plumbery that wires the API used by users with the SPI implementations present in packaged modules; and

  3. the Implementation module, containing the default implementation of Cache and CacheManager, as well as implementations of core SPIs, such as HeapResource that lets you create on-heap Cache and CachingTier instances.

Fundamental concepts

Modular approach

org.ehcache.spi.service.ServiceFactory are used to create org.ehcache.spi.service.Service, configured through org.ehcache.spi.service.ServiceConfiguration. Each of those services can be about anything.

A special kind of Service is the org.ehcache.spi.cache.CacheProvider, which is used by the CacheManager to create all caches.

Configuration

org.ehcache.config.CacheConfiguration, org.ehcache.spi.service.ServiceConfiguration, org.ehcache.config.xml.XmlConfigurationParser

Note
For more information on how the configuration is parsed, resolved and services are then bootstrapped, please read the Bootstrapping design doc.

How to extend?

SPIs

org.ehcache.spi.service, org.ehcache.spi.cache

Extension points

Clone this wiki locally