Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Ehcache appears to be the most commonly used CAS replication technology. It is fairly simple to configure, and it uses RMI calls to transmit tickets, a built in Java technology that is about as simple as Cushy HTTP. It can store tickets on local disk. It is the obvious alternative to CushyTicketRegistry and deserves special consideration.

Ehcache Compared to

...

CushyTicketRegistry

First, CushyClusterConfiguration will configure either EhcacheTicketRegistry or CushyTicketRegistry, so it is certainly no easier to configure one or the other.

If you use Cushy configuration and Front End programming (F5 or the Cushy Filter)Although the default configuration of Ehcache uses synchronous replication for Service Tickets, if you program the Front End (or add the CushyFrontEndFilter) to Ehcache in the same way described for CushyTicketRegistry, then you can relax use the ticket replication in Ehcache so Service Tickets and TGTs are both asynchronous and casual. This means that both Ehcache and Cushy would replicate tickets same asynchronous replication for both Login and Service Tickets.

So the main difference between the two is that every 10 seconds or so given typical configurations.

In that 10 second period Ehcache would queue up all the changes and then send the changes for that 10 second period as an RMI operation to each configured machine in the cluster. Cushy on the other hand adds the changes during the 10 second period onto all the other changes since the last checkpoint. So Cushy sends a lot more data.

However, Ehcache knows nothing about CAS or Ticket structure. When it replicates a ST or proxy ticket, it also generates a copy of the TGT and transmits it to the other machines. Multiple copies of the TGT accumulate and are never fixed. Cushy cleans everything up when once every few minutes it replicates a copy of the entire ticket registry with what Java guarantees to be an exact duplication of all the connections and relationships between ticketsEhcache replicates all the tickets that have changed in the last 10 seconds, while Cushy transmits a file with all of the ticket changes since the last full checkpoint. Then every few minutes it generates a full checkpoint. So Ehcache transmits a lot less data. However, the cost of transmitting the extra data is so low that this may not matter if Cushy provides extra function.

Ehcache is a closed system . The Cushy that operates inside the CAS servers and exposes no external features. Cushy generates checkpoint and incremental files can be backed up or copied off site as ordinary files, so you have a lot of flexibilitythat are regular files on disk that can be accessed using any standard commands, scripts, or utilities.

Ehcache is designed to be a "cache". That is, it is designed to be a high speed, in memory or local disk, copy of some data that has a persistent copy off on some server. That is why it has a lot of configuration for "LRU" and object eviction, because it assumes that lost objects are reloaded from persistent storage. You can use it as a replicated in memory table, but you have to understand if you read the documentation that that is not its original design.

...

Suppose (and this one we have all seen) someone doesn't really understand how applications are supposed to work with CAS, and they write their code so they get a new Service Ticket for every Web page the user accesses. CAS now sees a stream of requests to create and validate new Service Tickets. The other TicketRegistry systems replicate the Service Ticket and then immediately send a message to all nodes to delete the ticket they just created. Cushy instead just wakes up after 10 seconds and finds that all this create and delete ticket activity has mostly cancelled out. The incremental file will contain an increasing number of deleted Ticket IDs, until the next checkpoint resets it to empty and it starts growing again. If you turn on the option to ignore Service Tickets all together (because you don't really need to replicate them if you have programmed your Front End or added the Filter), Cushy can ignore this mess activity entirely.

Basic Principles

...