Because the main purpose of Resin 4.0 was support for dynamic servers, we needed to upgrade our distributed session management to handle the case where servers can appear and disappear frequently. Resin 3.1 session replication relies on a static set of servers to choose backup and triplicate servers. Dynamic servers change that model because a 3.1 session backup might be shut down indefinitely. So we needed a new architecture.
At the same time as we redesigned sessions, I wanted to generalize the distributed store to support standard caching and storage using the javax.cache API, while retaining the scalability and reliability of our original design.
- A hub of 3 fully-redundant servers for reliability (the triad)
- Other servers dynamically appear and disappear for deployment flexibility
- Updates using lightweight messaging using BAM/HMTP
- Cache entry ownership and leasing for performance
- Support storage (infinite expire), caching (timed expire), and session (timed idle invalidation)
- Support serialized objects (using Hessian), and binary data
The cache architecture is heavily influenced by the messaging and extra complications of distribution.