a Grid Computing System - Utopia
a Grid Computing System - Utopia
a Grid Computing System - Utopia
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
}<br />
3. The Basic Building Block - ONTA (Object Network Transfer Architecture)<br />
A ca; B db;<br />
D cd; ....<br />
.... }<br />
Figure 3.2.: Example of an object’s references hierarchy<br />
The hierarchy of references created by this object being saved to the jar archive is presented<br />
in figure 3.2. Starting with the object that instantiated the class A, we should traverse all the<br />
references and save the class B and class D. We are stressing here that the references are all resolved<br />
at compile time by Java, even the ones referring to an interface implementation (e.g. interf1 Obj<br />
= new Implementation()) and hence all the classes needed for an object can be found by starting<br />
at analyzing the class file for the class that that object is an implementation of. Than we should<br />
check all the references in those classes too. Checking the references in class B we end up saving<br />
the class C and then, checking the references of this class, we could end up in a loop. This should<br />
be avoided. At a first look, it looks like we should avoid to begin inspecting the objects, not the<br />
classes that have been previously traversed. That is because there could be other instances of the<br />
same class that could lead to different points in the hierarchy. That is not true, since different<br />
instances of the same class will end up leading us to the same classes, hence this is a static traverse<br />
of the class hierarchy graph. Even if there are multiple instances of the same class in the hierarchy,<br />
we should only begin to traverse the first instance encountered.<br />
The implementation does an iterative deep-first traverse of the graph, keeping track of nodes<br />
in a stack that remembers all the classes that were already saved. Actually, if we think about the<br />
fact that we are not going on with traversing any node that has been previously inspected, we end<br />
up concluding that the structure could be thought of as a tree, so we are doing a iterative depth-<br />
first traverse of a general tree. Since the algorithm of doing this is common, we would not get<br />
any further into details about the implementation. We are first saving the classes that are referred<br />
24