Information Technology Reference
In-Depth Information
To specify a policy for the dataset resource,
we will attach to
DatasetInterface
a new class
that implements four operations:
to the idlest site upon the first evaluation. Like
any component, policies can maintain state (e.g.
the initialized variable), and be associated just to
single interface operations. Overall, by adding a
simple policy, KNN is able to smartly interact
with the dataset. Policy coding is not mandatory
and, even more important to our work, it does not
affect the application logic.
public class
DatasetPolicy
extends
jgrimapi.Policy {
private boolean
initialized =
true
;
public
String accessWith(String
methodA, String methodB){
return
jgrimapi.Constants.INVOKE;
}
public
String accessFrom(String
siteA, String siteB){
double
trA = jgrimapi.Profiler.
instance().profile(“bandwidth”,
“localhost”, siteA);
double
trB = jgrimapi.Profiler.
instance().profile(“bandwidth”,
“localhost”, siteB);
return
(trA < trB) ? siteA: siteB;
}
public void
before(){
if
(!this.initialized) {
getOwnerMGS().move(jgrimapi.
Profiler.instance().idlestSite());
this.firstEval =
false
;
}
}
public void
after(){...}
}
EVALUATION AND DISCUSSION
To provide empirical evidence about the practi-
cal soundness of our approach, we conducted a
comparison between JGRIM, ProActive and Satin.
In short, these tools were separately employed to
gridify existing implementations of two different
applications, namely the k-NN explained in past
paragraphs, and an application for panoramic
image restoration based on the enhancement al-
gorithm proposed in (Tschumperlé and Deriche,
2003). After gridification, representative code
metrics on the Grid-aware applications were taken
to quantitatively analyze how difficult is to port a
Java application to a Grid with either of the three
alternatives. Besides, experiments were conducted
to evaluate the performance of JGRIM applica-
tions with respect to the other two approaches.
The restoration application was originally im-
plemented as a master component responsible for
splitting/joining images, plus worker components
for carrying out the CPU intensive processing,
this is, running the actual restoration algorithm
on individual portions of the whole panoramic
image. Experiments were performed on a Grid
comprising three Internet-connected clusters (see
Figure 4). Each cluster hosted a replica of the k-NN
dataset wrapped with a Web Service. For the sake
of fairness, all gridified codes used the replicated
datasets. Both the original codes of k-NN and
the restoration application were implemented by
an experienced Java programmer. On the other
side, gridification was performed by a different
developer with similar skills in Java programming
For simplicity, we have omitted the XML con-
figuration that is generated by JGRIM to inject this
policy into the application. The policy mechanism
works as follows: upon each call to the dataset,
DatasetPolicy
is evaluated, which instructs KNN
(through
accessWith
and
accessFrom
methods)
to remotely contact the service replica which is
hosted at the site that offers the best bandwidth (al-
ternatively, the KNN application could be moved
to that site). Methods
before
and
after
are used to
perform initialization/disposal tasks before/after
an individual evaluation of the policy takes place.
For example, the policy causes KNN to migrate
Search WWH ::
Custom Search