Difference between revisions of "Storage System"

From AardRock Wiki
Jump to navigation Jump to search
(Initial draft)
 
(Changed the image for wizard rabbit treasurer)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
The Storage System of Cheetah is inspired by the Wizard, Rabbit and Treasurer.
The Storage System of Cheetah is inspired by the Wizard, Rabbit and Treasurer.


The Wizard is the part of the application that contains the logic and
The UI uses the Storage System to store and share objects. The Storage
the user-interface. It uses the Storage System to store and share
System typically consists of the following components:
objects. The Storage System typically consists of the following
components:


* The Delegator
* The Wizard
* The Rabbit
* The Rabbit
* The Treasurer
* The Treasurer
Line 12: Line 10:
These components all share the same interface. You can see the network
These components all share the same interface. You can see the network
as a graph. With these components, the internal nodes are always
as a graph. With these components, the internal nodes are always
Delegators, and the external nodes ultimately store the data. You can
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
ask every type of node for a specific object, and the question will be
propagated until an external node is found.
propagated until an external node is found.
Line 25: Line 23:
== The Components ==
== The Components ==


=== The Delegator ===
=== The Wizard ===
The Delegator has a list of other components. Typically, it has a
The Wizard has a list of other components. Typically, it has a
Rabbit, a Treasurer (which store data locally) and other Delegators (via
Rabbit, a Treasurer (which store data locally) and other Wizards (via
the network). It also has a rating for all these components. When a
the network). It also has a rating for all these components. When a
Delegator gets a question, it <b>delegates</b> these questions to the
Wizard gets a question, it <b>delegates</b> these questions to the
other components. The components with the highest rating gets the
other components. The components with the highest rating gets the
question first. Also, if a result is returned from a specific component,
question first. Also, if a result is returned from a specific component,
it will get a higher rating.
it will get a higher rating.


Maybe the Delegator can also ask for ratings of other components, but
Maybe the Wizard can also ask for ratings of other components, but
that might not be necessary.
that might not be necessary.


Line 52: Line 50:
The part inside the box is typically in the same JVM.
The part inside the box is typically in the same JVM.


[[Image:wdrt.png]]
[[Image:wrt.png]]


The Wizard is connected to a Delegator, and the Delegator has a Rabbit
The UI is connected to a Wizard, and the Wizard has a Rabbit
and a Treasurer. This is predefined by the application architects, but
and a Treasurer. This is predefined by the application architects, but
can be changed. The other Delegators are automatically found. How this
can be changed. The other Wizards are automatically found. How this
is done, is currently an open issue.
is done, is currently an open issue.


== Open Issues ==
== Issues ==
=== Resolved Issues ===
* How do Wizards find each other?
** Martien: See [[JXTA]].
* How do we get unique id's?
** Martien: See [[JXTA]].


* How do Delegators find each other?
=== Open Issues ===
* How do we get unique id's?
See [[Talk:Storage System|discussion]] for Open Issues.
* What happens if two different objects are returned? I.e., how do we
  make sure we have data integrity?
* What do we do when an object is changed?

Latest revision as of 07:57, 13 June 2006

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.

Wrt.png

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

  • How do Wizards find each other?
  • How do we get unique id's?

Open Issues

See discussion for Open Issues.