Storage System
The Storage System of Cheetah is inspired by the Wizard, Rabbit and Treasurer.
The UI uses the Storage System to store and share objects. The Storage System typically consists of the following components:
- The Wizard
- The Rabbit
- The Treasurer
These components all share the same interface. You can see the network as a graph. With these components, the internal nodes are always Wizards, and the external nodes ultimately store the data. You can ask every type of node for a specific object, and the question will be propagated until an external node is found.
The Interface
A component can handle these two questions:
- Give me an object with this id
- Save this object for me with the following id
The Components
The Wizard
The Wizard has a list of other components. Typically, it has a Rabbit, a Treasurer (which store data locally) and other Wizards (via the network). It also has a rating for all these components. When a Wizard gets a question, it delegates these questions to the other components. The components with the highest rating gets the question first. Also, if a result is returned from a specific component, it will get a higher rating.
Maybe the Wizard can also ask for ratings of other components, but that might not be necessary.
The Rabbit
The Rabbit is a storage system that stores the data in a quick memory (typically: RAM). The lifetime of the data is not very long, compared to the Treasurer. When the application quits, the data is lost. The Rabbit never communicates with other components.
The Treasurer
The treasures provides a more permanent way of storing data. When the computer is shut down and restarted the data of the Treasurer will still be there.
Example
Below you will see an example graph representing a part of the network. The part inside the box is typically in the same JVM.
The UI is connected to a Wizard, and the Wizard has a Rabbit and a Treasurer. This is predefined by the application architects, but can be changed. The other Wizards are automatically found. How this is done, is currently an open issue.
Issues
Resolved Issues
Open Issues
See discussion for Open Issues.