Development of Web Scope

shopholisticΛογισμικό & κατασκευή λογ/κού

13 Δεκ 2013 (πριν από 3 χρόνια και 6 μήνες)

97 εμφανίσεις



THE AUSTRALIAN NATIONAL UNIVERSITY


FACULTY OF ENGINEERING AND INFORMATION TECHNOLOGY

DEPARTMENT OF COMPUTER SCIENCE










Development of Web Scope


(
Using the Hibernate Package for

Caching MDSPlus Data
)










Ajith Mannanakunnel Jose

(u4083453)


November 2005





This is the final report for the COMP6703 eScience Project (Semester 2, 2005)






2

TABLE OF CONTENTS


ACKNOWLE
DGMENTS


ABSTRACT


1. INTRODUCTION
.
...........................................................................................
..
.
..
6

1.1. O
VERVIEW…………….
....................................................................................
.
.6


1.1.1. Background


1.1.2. Pur
pose


1.1.3. Statement of Scope


1.1.4. Target Results and Project Customers


1.1
.4.1 Target
Outcomes



1.1.4.
2

Outputs



1.1.4.
3

Deliverables



1.1.4.
4

Customers


1.1.4.
5

Stakeholders

1.2. I
NTRODUCTION
T
O
H
IBERNATE
.......................................................................
.
.9

1.3. I
NTRODUCTION
T
O
MDSP
LUS
.......................................................................
.
..10

1.4. C
URRENT
W
AY
O
F

R
ETRIEVING
MDSP
LUS
D
ATA
.......
....................................12


1.4.1.
Issues with the Current Way of Retrieving Data fr
om MDSPlus


1.4.2. Former Attempt to Provide a S
olution

to
Issues of MDSPlus


1.4.3
.

New Attempt to Provide a S
olution to Issues of MDSPlus

1.5. I
NTRODUCTION
T
O
W
EB
S
COPE
...............................
................................
.....
.
....15


2.

REQUIREMENT ANALYSIS.................
..............................
..........................
...
17

2.1. S
OFTWARE
R
EQUIREMENTS
.................................................
..........................17

2.2. O
PERATING
S
YSTEM………..
..........................
.................................................
17

2.3. L
ANGUAGES…………….
...................................................
...............................17

2.4. C
LIENT
R
EQUIREMENTS
..................................................
.........................
......18


3. SCHEDULING………………………………..............................
.......
................19

3.1. P
LANNED
T
IME
T
ABLE
A
ND
A
CTUAL
P
ROGRESS
................
...........................19


4. MODELING………......................................................
......
...............
.............
.
...
..22

4.1. D
ATA
B
ASE
D
ESIGN
…….
……………………………..
...............
...........................22

4.2. D
ETAILED
D
ESIGN ……….……………………………..
...............
............................26


4.2.1.
DataBaseAccessDomain


4
.
2.2. MDSServ
erAccessDomain


4
.
2.3. AppletDomain


5. IMPLEMENTATION.....
..
...............
.............................
....
........................
.........
...33


6. FUTURE WORK…….........................................
.....................
........................
.
....36


7. CONCLUSION……..........................
.....................
..........................................
.....37


8. REFERENCE LIST........................................................
.....................
.............
....38

8.1. W
EB
R
EFERENCE
..
.............................
.............................
..
.............................38


3

8.2. B
OOK
R
EFERENCE
.................................................................
..........................39


APPENDIX A: HOW DOES HIBERNATE WORKS...........
...
............................40


APPENDIX B: CLIENT REQUIREMENTS CHECK LIST
..............................42


APPENDIX C: INSTALLATION GUIDE …….....................
...............................44


APPENDIX D
: LINUX SPECIFIC

ISSUES FACED……………………….
…..
.47


AP
PENDIX E
: G
ANT CHART…………................................
...............................50






















4

Acknowledgments



During the entire project of developing Web Scope I have received endless help from
my supervisor Dr. Henry Gardner and client R
aju Karia, right from deciding the
concept, finalizing the method of implementation and what not….


While installing the required software I faced endless troubles. And all such times I
found help from Hugh Fisher. I should specially appreciate the efforts

that he put for
my final project presentation
.




















5

Abstract

This report outlines the development of the “
Web

Scope
” application for the eScience
department of the Australian National University. This project is an extension to the
work don
e by the former eScience student “Shi Hu” in semester1 2005.

The core idea behind this project is retrieving the nuclear fusion datasets from the
MDSPlus (
a software system developed for the Italy based nuclear research
organization
,

"The Center for Nucle
ar Research, Padua")

based server throug
h a web
browser. The use of
java object/relational package “Hibernate” in caching the
retrieved datasets is the highlight feature of this project.

This report is divided into 7 major sections.




Section 1, Introduct
ion,
gives an overview of the project, as well as the
expected outcomes, outputs and the major deliverables of the project. Through
this section the customers and major stakeho
lders of the project are identified
.
It also gives a brief introduction to the M
DSPlus system and Hibernate
package.





S
ection 2, Requ
irement Analysis, describes
detailed user requirements,
softwares and other tools needed to accomplish this project.




Section

3, Scheduling, describes the various phases involved in this project
and the

number of days allotted for each phase.




Section 4,
Modelling
, also known as Designing, uses UML model to design
the structure of this software.

It al
so defines the
database

structure
.




Section 5
, Implementation, descr
ibes the ideas and
methods used to ac
hieve
the

functionalities of
“Web Scope” application
.




Section 6, Future Work, gives
suggestion
s

on further development.




Section 7,
Conclusion
, draws a conclusion from
this project.




Section 8, Reference List, shows the various references used for
accompl
ishing the “Web Scope” application.











6

1 Introduction

1.1
Overview

1.1.1
Background

Currently nuclear fusion researches are being done at different parts of the world.
Millions of nuclear fusion datasets are generated as

a

result of various nuclear f
usion
experiments happening at different research organizations. It is very important for the
researchers to share the datasets for mutual research benefits. The s
afe storage and
retrieval of
fusion datasets is currently done using a data storage and manag
ement
system known as “MDSPlus”.


Researchers from different parts of the world connect to the MDSPlus and retrieve the
required datasets for their own research purposes. They use special client side
software applications like “EScope” or “JScope” to ret
rieve the datasets from the
MDSPlus server. The client side applications plot the retrieved datasets as graphs or
as statistical information tables.


There are many limitations to the current way of retrieving datasets from the
MDSPlus server. At present

the retrieved datasets are
not cached at the client side
and therefore

the
researchers have
to wait for the same amount
of time even when
accessing
previously accessed datasets
. The researchers need to install specific
software applications to retrieve th
e datasets from the MDSPlus server. If they don’t
have the specific software on the computer they are unable to connect to the MDSPlus
and
retrieve

the data.



The project “
Development of Web

Scope

is an attempt to resolve the existing issues
with the ret
rieval of datasets from the MDSPlus server. Through this project, the
“JScope” or “EScope” dependent issues are solved. Another highlight of this project
is the use of Java object relational mapping solution “Hibernate” to solve the caching
issues with cur
rent data retrieval system.

1.1.2
Purpose

The purpose of doing this project is to
make the retrieval of dataset
s from the
MDSPlus server
efficient
ly
.


1.
1.3 Statement of scope


The statement of scope determines the target outcomes and outputs that are pr
oduced
as a result of this project. It also identifies the customers who will be utilising the
outputs to produce those outcomes and an analysis of the linkage between the
outcomes, outputs and the customers. Once outcomes, outputs and customers are
iden
tified, the work required to complete the project is identified.





7

1.
1.4 Target results and project customers


1.1.4.1 Target outcomes



The “Develop
ment of Web Scope”
project

has

four target outcomes
besides several
benefits that may flow through. They a
re:




Reduced
delivery
time
of requested datasets



Elimination of
complexity in installing

the

software required to retrieve the
datasets



Increased cross
-
platform functionality



Reduced resource
requirement
on the client side


The above mentioned target outco
mes help the project customers in the following
way.


Reduced time in the delivery of requested datasets translates to faster data access.
Reduced complexity in setting up the client software required to retrieve the datasets
will co
ntribute to
easy
and c
heaper
access of MDSPlus data from different locations.


1.1.4.2 Outputs


All the outputs ensure that the customers are able to utilise them to realise the
outcomes. The target outputs for the “Development of Web Scope” project are the
working “Web Sco
pe” application and the final project report.




1.1.4.3 Deliverables


Deliverables are a superset of the outputs obtained as a result of the project.

The project deliverables are mentioned in the table below:


8



1.1.4.4 Customers


The project customers

who are vital in ensuring the success of achieving target
outcomes are nuclear fusion researchers or scientists from different parts of the globe.


1.1.5 Stakeholders


The stakeholders
of
this project are described below.






























9

1.2

Introduction to Hibernate


Hibernate is a Java based object/relational mapping solution. It can dynamically
create the database tables based o
n the information provided
. It is much easier to
retrieve and store data using the Hibernate package

than the exi
sting ones
. The dual
layer caching mechanism of Hibernate makes the data caching faster.





The main features of the Hibernate package described in its web site are listed below
[2]:


Hibernate is a powerful, ultra
-
high perfor
mance object/relational persistence and
query service for Java. Hibernate lets you develop persistent classes following
common Java idiom
-

including association, inheritance, polymorphism, composition
and the Java collections framework. The Hibernate Quer
y Language, designed as a
minimal object
-
oriented extension to SQL, provides an elegant bridge between the
object and relational worlds. Hibernate also allows you to express queries using
native SQL or Java
-
based Criteria and Example queries. Hibernate is
now the most
popular object/relational mapping solution for Java. The most important feature of
Hibernate for this proposal is that Hibernate uses HDLCA (Hibernate Dual
-
Layer
Cache Architecture). It maintains two levels of cache. One is session
-
level cache

and
the other is JVM
-
level cache. The session
-
level cache serves one client or one session
at one time, it resolves circular/shared references and repeated requests for the same
instance in a particular session. The JVM
-
level cache resolves repeated reque
sts for
different sessions using the same instance of JVM.

(Please refer the Appendix A for more information regarding the working of
Hibernate)





10

1.
3

Introduction to
MDSPlus


Researchers from different parts of the world are trying to get a deeper unders
tanding
of generating electricity through nuclear processes. They perform magnetic fusion
experiments
to build a cleaner, safer and efficient way of generating electricity.
While
the magnetic fusion
experiments

are conducted
, significantly large volumes of

data
are generated and

are collected with
the
help of various
measuring instruments
.

It is
very important to store the data generated efficiently so that it can be accessed for
later use. MDSPlus is a data storage and management system developed for satis
fying
the requirements of the fusion researchers.

According to the information available in the website of MDSPlus [1
]

it has a unique
combination of features and functions including:



Hierarchical structure



A rich set of simple and composite data types



Se
lf
-
descriptive
-

"metadata" included with each data item



Expression evaluation, enabling "indirect" reference to data



Data compression and decompression



Remote access via client/server model



Service vs file oriented
-

"logical" rather than "physical" d
ata access



Scalable to very large and complex data sets



Extensible


Developed jointly by the Massachusetts Institute of Technology, the Center for
Nuclear Research (Padua, Italy), and the Los Alamos National Lab, MDSPlus is the
most widely used system for
data management in the magnetic fusion energy
program. It is currently installed at over 30 sites spread over 4 continents

(
MDSPlus
website [1]
).


MDSPlus is used to store all the information from an experiment including the:




setup information;



experiment

configuration;



data collected during the experiment; and



analysis results of this data.


Fusion experiments operate as a series of pulses or "shots". Plasma is discharged over
a small time interval (of the order of tenths of seconds), and the measuring eq
uipment
and diagnostic tools collect data about the shot. This information is typically a
waveform structure and MDSPlus is used to store and analyze it. A tree structure
which very closely parallels that of a file system is used to present these results i
n an
organized hierarchy. Each particular item of information that describes a different
component of the experiment is then stored at one of the "nodes" in the tree

(
MDSPlus
website [1]
)
.



This information can be used to make various judgments about the
results of the
experiment such as reviewing experiment settings and comparisons of the physical
results with the supporting theory and simulations. However, in order to conveniently

11

view the stored information, a viewer application is needed to extract the

information
from the MDSPlus system and present it to the res
earchers. The system provides a
client side software
system called "Scope", which qu
eries the MDSPlus system
using
the
MDSPlus
command language (
MDSPlus website [1]
).


From the computer science
point of view, the MDSplus system can be classified as a
kind of file system for
data storage and
post
-
shot processing of experimental data.
An
example of the set of facilities it offers is given on the MDSP
lus web site [1]:








Figure 1.1


Figure 1.2


Traditionally each processing step defined its own set of file structures, interfaces and
graphical routines. For example, Figure 2.1 is a simplified diag
ram of the data flow
for a particular type of analysis (TRANSP) carried out on experimental data in the
fusion program using older methodologies. The data flow resembles a multi
-
threaded
conveyer belt spawning an array of mismatched data structures. The pr
oliferation of
file types and interface standards (APIs) make it difficult to share tools or to directly
compare the results of different analysis suites. When using MDSplus, data at all
stages is stored in the same format with the same API and can be acce
ssed and
displayed with the same set of routines. Data from all sources can be easily compared
and tools are readily shared (Figure 2.2).












12

1.4

Current Way of Retrieving Data from MDSPlus






The researchers use softwar
e like

“EScope” or “JScope” to
connect to the MDSPlus
server and retrieve the required data.
The major steps involved in this data retrieval
process are

as follows:




Researchers connect to the MDSPlus server, and requests data sets using client
applicatio
n called “EScope”.




Based on the “EScope” client’s request the
MDSPlus retrieves

data
sets
from
its own data
storage
mechanism.




MDSPlus server sends the retrieved datasets to the

EScope


client.




“EScope” Client displays the datasets as graphs.



1
.
4
.1

I
ssue
s

w
ith
the Current Way of R
etriev
ing Data
from
MDSPlus


Since the MDSplus system is simply a kind of file system, although it solves the
heterogeneity for using the experimental data, it is not
well
optimized for the
efficiency of data acquisition. E
very time the MDSplus server receives an enquiry for
the experimental data, it has to firstly find which file stores the data, then load the data
to the memory from the disk, and finally send the data to the user.


In the real world, the main way of worki
ng with the experimental data is for physicists
to acquire data from MDSplus server and then to do their own research on the data.
So it happens occasionally that some physicists require the same sets of data from the
MDSplus server at almost the same time
. But in this situation, MDSplus has to find
the data, load it from disk, and send it to every client, although the required data may
be already in memory.



13

R
esearchers need to install

EScope


or “JScope”
software into their machine

to
retrieve datasets f
rom the MDSPlus. It is a big inconvenience for the researchers as
they have to install and keep the updated v
ersion of the client software in their
machine.





1.4
.2

Former Attempt to Provide a S
olution

to the
data retrieval
I
ssues of
MDSPlus


In order to

resolve the issues with data retrieval from the MDSPlus server, a new
software system was implemented. This system uses the Java object/relational
mapping solution, “Hibernate package” to cache the MDSplus data to provide better
efficiency in acquiring ex
perimental data. The idea to use “Hibernate” was proposed
by Raju Karia and Dr.Henry Gardner
(“
Using the Hibernate Package for Caching the
MDSPlus Data”,
report by Shi

Hu [26]
)
.



The following diagram shows the architecture of the new system. The main
com
ponents of this system are the “Importer” and the “DBServer” applications.




This system works in the following way:




Data from the MDSPlus server is initially downloaded from the MDSPlus
server using an application called “
Importer
” and stored in the
local HSQL
database.




An application called “
DB
server
” is used to serve the requests from the
clients (EScope). Based on the client requests the datasets from the HSQL
database is returned to the clients.



14



Using client application called “
EScope

viewer” a

connection is established
with the “DB Server“, and retrieves the required dataset from the local
database (HSQLDB) associated with it. EScope client plots graphs based on
the retrieved datasets.



Limitations of the above mentioned system




Initially a se
t of data is downloaded to the HSQL database using the

Importer
”. After that there is no interaction with the server. If the requested
data set is not available in the database there is no way to obtain the data from
the MDSPlus server.




As the MDS Plus s
erver contains millions of data sets it is impossible to
manually download all the data sets to the HSQL database using “Importer”
and then serve the client requests.




A Java based platform is required to run this application.





It is impossible to retrie
ve that datasets without specific client side
applications like “EScope” or “JScope”.




The current system serves the users with the datasets which is available in the
HSQL database. If a requested dataset is not available in the HSQL database
there is no m
echanism to search for the requested dataset in the MDSPlus
server. So the client is being forced to get satisfied with the data that is
available in the database. Since the volume and diversity of the MDSplus
datasets is enormous, it is impossible to down
load and keep a copy of all the
MDSPlus datasets in the HSQL database.


1.
4
.
3

New Attempt to Provide a S
olution

to the data retrieval Issues of
MDSPlus


Development of an application

(“
Web Scope
”)

which has the following
features is the
solution
to the iss
ues with the current way of retrieving data
sets

from the MDSPlus
:




It
should use

java object/relational mapping solution
,
Hibernate to
make the
data
cach
ing much more efficient. With the help of the dual layer caching
mechanism of the Hibernate the researc
hers will be able to retrieve
the
datasets quickly
.




It should
work

from a web
server and retrieve the MDSPlus datasets
,

so that
the researchers need not install any specific software to run it.


This new idea to implement a system which works from a web s
erver, and uses the
caching benefits of Hibernate is proposed by the Raju Karia and Henry Gardner. This
new system tries to avoid the limitations with the former attempts to provide a
solution to the data retrieval from the MDSPlus server.




15

1.
5

Introducti
on to
Web Scope


The “Web Scope” is a new system proposed by my client Raju Karia and supervisor
Dr.
Henry Gardner.

It tries to solve the limitations of
the formerly implemented
system
s

by changing the entire system architecture and by implementing new
tech
nologies. The following diagram describes the “Web Scope”.







Web Scope runs on a web server and waits for the client requests coming through web
browsers. It maintains a database (“HSQLBD”) for

storing the retrieved datasets from
the MDSPlus server. All database interactions (storage and retrieval of datasets) are
handled using the Hibernate package.


Web Scope
works in the following way:


When a client request arrives at the “Web Scope”, it ret
urns a web GUI to the client.


1)

The new MDS
Plus

data retriever application, “Web Scope” runs on a Web Server
(Tom Cat) and accepts

the client requests coming through

web browsers.


2)

Upon re
ceiving a client request the
“Web Scope” checks for the client reques
ted
data in the attached HSQL database.

If the requested data set is available in the
database it is retrieved and sent to the client Web browser. If the requested data set
is not available in the database, it is retrieved from the MDS Plus server and sent

to the client Web browser. A copy of the retrieved data set is stored in the data
base for later use. So that the later requests for the same data sets can be
accomplished faster.


3)

Using applets the retrieved data sets are plotted as graphs at the clien
t Web
browser.


16



The benefits of using Web Scope are

given below




Users need not install any specific software to retrieve and view the MDS Plus
data. They just needed to connect to the Web Server using a web browser.




Users are not restricted to the data
sets in the database. If requested data sets
are not available in the database it is retrieved from the MDS Plus server and
shown to the client.





The use of hibernate package makes the caching faster.




The utilization of the resource
s at the clien
t side
is decreased
dramatically





























17

2 Requirement Analysis


2.1 Software Requirements



The main software

and other tools

used for the development of “Web Scope” are
given below.



Jakarta Tom Cat 5.0



Hibernate3.0



JDK1.5



HSQLDB



FireFox (or a
ny
Java Applet enabled Web Browser
)



Emacs Editor


2.2 Operating System


Os Name

Version

Linux Debian



2.3 Languages














18

2.4 Client Requirements


The following table shows the major requirements specified by the client.






(
Please refer to

Appendix B for more information regarding what has been done
against the detailed client requirements
)



19


3 Scheduling


3.1 Planned Time Table and Actual Progress


The whole project was divided to five different phases and specific time slots were
allotted

for each of the phases. Though I tried to proceed according to the initial time
table, had to reschedule the time table due to some of the issues faced in the phase II
of the project.

The following table shows the time table scheduled initially for the
pr
oject.




20

The major issues faced during the phase II of the project are described below:




As my Linux skills were very basic it was a tough task to install and configure
the required software packages on to the Linux machine provided to me (
see
Appendix
E
for more information regarding Linux specific issues faced
). It
was a critical situation as the project couldn’t proceed further without the
required software running properly.




As I was new to the Hibernate package, Tomcat and the Java Servlets, the
learn
ing curve involved was another issue that I faced.


The phase I (first 2 weeks) of the project went exactly as per the initial time table. But
as a result of the issues mentioned above, phase II took two extra weeks to complete. I
had to restructure the e
ntire project schedule

to compensate for the delay in the
completion of the phase II
.

In the initial schedule my plan was to work on the project
for roughly three hours per day. But as per the changed schedule I had to work at least
5 hours per day on the
project to compensate for the lost number of days during phase
II.


The following table shows the new time table scheduled to handle the delays.


21




(
Please See the Appendix
E

for viewing the Grant Chart showing the difference
between the planned time tabl
e and the actual time table
.
)











22

4
Modeling


4. 1

Database Design


Database design was a very important process for the development of the “Web

Scope” as the performance of the application depends on the structure of database. I
have created a tota
l of six tables for the us
ing

in “Web Scope. The
details of the
various tables used by the “Web Scope” are given below
.





All interactions with the database are handled with the help of java object relational/
mapping solution “Hibernate”. Java persiste
nt classes were created to represent the
database tables and the details of those classes were entered into the Hibernate
mapping file (“Mapping.hbm.xml”). Hibernate dynamically creates the tables
corresponding to the information provided in the mapping fi
le, and performs various
actions. The Appendix C shows the mapping file used by Hibernate package.



23

All the tables in the database use an Id field as the primary key and the values to these
fields are dynamically generated by the Hibernate package.


The G
RAPHDATA table has a foreign key referring the NODE table. The NODE
table stores the general information of a particular node in the MDSPlus server. The
GRAPHDATA table contains the graph data for the nodes in binary format. The
NODE table contains a point

field to store the reference to the GRAPHDATA table.




The table NODEPATHS stores the names of all the nodes in a specific location (in a
specific shot in an experiment) in the MDSPlus server. All the node names are stored
to a field called “nodePaths”.

This table uses the Id field as the primary key.






The table USERS stores the personal information of the users .Like any other table in
the database it also has an id field which is the primary key. There are references to
the USERS table from the o
ther tables (LOGINFO, METADATAINFO) in the
database.


24




The LOGINFO table stores the log details of the users. It keeps track of a specific
user and the node that the user viewed. The “node” field in the LOGINFO is a
reference variable to the correspondin
g node in the NODE table. Similarly the
“users” field is a reference variable to the “USERS” table.






The METADATAINFO table stores the metadata created by the user based on the
dataset viewed by the user. The table has a primary key field “id”. This
table stores
the basic details like the date of creation of the metadata, name of metadata,
explanation about the metadata, the value of the metadata and the keyword for

25

identifying the metadata (this field is for implementing the search based on the
keywo
rd,
for future development
).




The “node” field in the METADATAINFO is a reference variable to the
corresponding node in the NODE table. This field identifies the node based on which
the metadata is created. Similarly the “users” field is a reference var
iable to the
“USERS” table and this field identifies the corresponding user.

















26

4.2

Detailed Design


The various domains used in the Web Scope application are described below:











27

Domain Chart


The domain chart below shows the relationsh
ip between various domains of the Web
Scope application.


















28

4
.
2
.
1

databaseAccessDomain


All the database interactions within the Web Scope application are handled by the
“databaseAccessDomain”.

This domain is the bridge between the other part
s of the
system and the database. Other parts of the system have to use this domain to access
the database.


This domain contains the persistent classes to be used by the Hibernate package to
perform the database operations. The Hibernate mapping file “Ma
pping.hbm.xml”
maps the persistent fields in the classes of this domain to the corresponding database
table fields. (
Please refer to Appendix
A for more information regarding how the
working of Hibernate
)


The following figures show the details of the vari
ous classes within the
databaseAccessDomain.






Figure

4.2.1


29






Figure 4.2.2



30

4
.
2
.
2

mdsServerAccessDomain



This domain controls all the access to the MDSPlus server. This domain is the bridge
between other parts of the system and the MDSPlus server
. Other parts of the system
have to use this domain to access the MDSPlus server.


The following figure shows the class MDSDataSource and its relationship with the
other classess:




Figure 4.2.3



The MDSServerConnect class is responsible for opening a s
pecific shot of an
experiment at the MDSPlus server. After making a connection it gets the list of all the
nodes available in the specified location.

The figure 4.2.4 shows the class
MDSServerConnect and its relationship with the other classess:




31


Figure

4.2.
4


The class MDSServerDownload retrieves a specific node data either from the
MDSPlus server or from the database.
The figure 4.2.5 shows the
MDSServerDownload class and its interaction with the other classes.



Figure 4.2.
5






32


4.2.3 Applet Domain


This domain is responsible for plotting the dataset as a graph. The
“RetrieveMaiFrame” class of this domain plays an important role in the plotting of the
graph. It retrieves the dataset for plotting the graph from the volatile memory of the
web server an
d plots the graph.


The figure 4.2.6 explains the relationship of the

RetrieveMainFrame


class and other
classes.





Figure 4.2.
6















33

5
. Implementation


Since the number of technologies used for the development of “Web Scope” is high,
the who
le Implementation phase was divided into
six

sub phases. The details of these
sub phases are given below:










34




The implementation of all

the sub
-
phases, except sub phase (D) was
straight forward.


The main target of the sub
-
phase D was to plot the

retrieved datasets as graphs to the
client web browser. The configuration of the applet communication with the parent
web server was a very tricky task. Almost two weeks were spent to configure the
applet communication with the web server.



Steps involve
d in the plotting of graph by the Applet


1)
Client web browser requests for the specific shot of an experiment.


2)

Web Scope retrieves dataset either from the HSQLDB or from the MDSPlus
server. The retrieved dataset is kept in the volatile system memory
of the web server.


3)

Web Scope sends Applet embedded web page to the client web browser.


4)

The applet embedded in the web page communicates with the Web Scope and gets
the dataset stored in the volatile system memory of the web server. The applet pl
ots a
graph based on the data obtained from the Web Scope.






35


The following diagram explains how the applet plots an interactive graph
:




Please check the former paragraph for the detailed explanation about each of the
steps in the above diagram.















36

6
.

Future Work


1)

Implementation of a meta
-
data index based search engine for finding the
datasets with specific features from the database.

For example: the search
should be able to find all the metadata created in a specific day (or by a
specific
user).


2)

Implementation of an engine which dynamically performs calculations and
creates different types of metadata based on the data sets retrieved from the
server or data base.


3)

Implementation of an engine which allows the users to create metadata tables

dynamically. This should allow a user to specify the fields and the data types
of the metadata table and other users should be able to contribute data to the
table.



4)

At different client sites metadata will be producing as a result of the client
contribut
ion. It would be a great achievement if we can distribute (share) the
metadata generated at one location to another location for the purpose of the
researchers at the other location.


5)

In the current application applets are used to plot the retried datasets

as graphs.
Many web browsers still don’t support the applets in the proper way. It was a
tough job for me to put the right plug
-
in for the web browser to enable applets.
So it will be a good idea to implement a system which can plot the graphs
without usi
ng the applets.


6)

Implementation of an administration side for the current system. The current
system doesn’t have an admin section which gives special privileges to the
administrator. The admin should be able to view the details about all the users
and the
ir log details.



7)

Implementation of an engine which dynamically shows the details of the node
access rates (the number of times various nodes have been accessed) and other
related statistical information.


8)

The current system uses “HSQLDB”, a very light wei
ght database. It would be
a good idea
to replace it with a more powerful

database like “MySql” or
“PostgreSql”










37

7
. Conclusion


Some of the useful conclusions that can be drawn from this project are given below:




Hibernate package is a very powerful
tool to perform caching operations. It is
a package that makes the life of programmer easier and the life of user faster.




Through the successful implementation of the “Web Scope”, it is now possible
for the researchers to quickly access the MDSPlus datas
ets through a web
browser.









































38

8
. Reference List


8
.1 Web Reference


1)
http://www.mdsplus.org/


Gives details about the MDSPlus server and the mode of data storage in it.


2)
http://www.hibernate.org/


Gives all the required information about the Hibernate software package.


3)
http://www. jakarta.apache.org/tomcat/

Gives information abo
ut setting up/running the Jakarta tomcat server


4)
http://www.eclipse.org/

the official website of the text editor eclipse


5)
http://
java
.sun.com/
applets
/

gives the detai
ls about java applets


6)

http://java.sun.com/docs/books/tutorial/applet/practical/gui.html


Gives the details about java applets


7)

http://java.sun.com/j2se/1.5.0/docs/api/java/applet/Applet.html

Gives the details about java applets


8)
http://kr.fujitsu.com/products/solutions/ebiz_platform/was/technical/tutorial/web/kis
o/kiso01.html


Gives details about synchronizing the data transfer from servlets

to applets


9)
http://j
dj.sys
-
con.com/read/36044.htm


Gives information about the java object serialization


10
)
http://www.htmlhelp.com/


Gives a lot of information regarding the various html syntax

suggested for expert
users


11
)
http://www.w3.org/


The website gives clear idea about the various web designing standards.


12)
http://www.w3schools.com/js/tryit.asp?file
name=tryjs_function2

Describes how to pass variables to a java script function


13)
http://www.w3schools.com/js/js_functions.asp


Gives valuable information about the JavaScript functions


1
4
) http://www.htmlcodetutorial.com/

Provides valuable information regarding various HTML and XHTML syntaxes


15)
http://www.groan
-
zone.net/jscript.h
tml

A good source of information regarding the java scripts



39

16)
http://mindprod.com/jgloss/volatile.html

Provides information about various java keywords


17)"Remote server communication and appli
cation delivery" by Alan Newman,
Revision 1.0, December 2004.(a journal ,
http://www.symbian.com
)



18)
http://prl.anu.edu.au/H
-
1NF

Information regarding the H1
-
NF plasma
experiment at ANU


19)
http://www.MDSPLUS.org/

Information regarding the MDSPlus system


8
.2 Book Reference


20) “Hibernate in Action” by Christian Bauer and Gavin King .Published by Manning
Publications. co


21) “
Core java 2, Volume 1” by Cay S, Gary Cornell. Published by Sun Microsystems


22)

"The Core Web Programming”. Published by Sun Microsystems.

This book was the Bible for me during the whole development process


23) "The Complete Java Reference" by Schmidt,
published by McGraw Hill


24) "Java Examples in a Nutshell" by Flanagan, published by O'REILLY


25) "Internet & World Wide Web
-
How to Program" by Deitel & Neito. Published by
Person Education


26) "Using the Hibernate Package for Caching the MDSPlus Data",

the final report
for the COMP6703 eScience Project (Semester1, 2005) course, by Shi Hu.


27) "Escope Viewer Development", the final report for the COMP6701 eScience
Project, by "David McLenaghan".


28) The Study brick, provided as a part of the course "N
etworked and Scientific Data
Presentation",COMP6442











40

APPENDIX

A


How
does Hibernate Work
?


Hibernate

can dynamically create the database tables based on the persistent classes
and the information provided in the “Mapping.hbm.xml” file.


The followi
ng class “Message.java” is an example of a java persistent class:





The two fields “id” and “text” are the fields of the persistent class going to be
converted to the fields of the database table. The get and set methods of the persistent
class are used

to pass values to the fields of the database table.



The fields of the java persistent class are specified in an xml mapping file. Hibernate
dynamically creates the database tables based on the information provided in the xml
mapping file. An example of
a mapping file corresponding to the persistent class
“Message.java” is given below.



41





Hibernate converts the two fields “id” and “text” of the Message class to the
corresponding fields “MESSAGE_ID” and “MESSAGE_TEXT” of the table
“MESSAGES”. The follow
ing figure shows “MESSAGES” table:








The following bit of Java code shows how a value is stored to the database table,
MESSAGES.





Various steps involved in the storage of data to the table, MESSAGES is explain
ed
below:



The first line of code creates a new session of the Hibernate.



An object of the Message class is created and a value (“Ajith M Jose”) is
passed to the set method of the Message class.



The object created (“message”) is stored to the database by
using the save
method associated with the session object of the Hibernate package.


42


The MESSAGES table after the data storage operation is completed is shown below.









































43

APPENDIX B


The c
hecklist of what has been done against the detailed client
requirements:









44

APPENDIX
C


Installation Guide

A) Prerequisites:


The “
Web Scope
” application requires the JRE and Tom Cat running on the target
machine prior to its installation.
The va
rious steps involved in the installation of
Tomcat and JRE are explained below as on the web site of Tomcat [3]:


I) Requires JRE 5.0 or later versions




Download the Java 2 Standard Edition Runtime Environment (JRE), release
version 5.0 or later, from
http://java.sun.com/j2se
.




Install the JRE according to the instructions included with the release.




Set an environment variable named JAVA_HOME to the pathname of the
directory into which the JRE is installed, e.g. c:
\
j2sdk5.0 (
Windows
) or
/usr/local/java/j2sdk5.0 (
Unix
).


II) Requires the TomCat5.0 or Later





Download the Tomcat version 5.0 or later from
http://jakarta.apache.org/site/downloads/
.




Unzip the to
mcat to the required location (e.g.: unzip jakarta
-
tomcat
-
5.zip), so
that the distribution resides in its own directory (conventionally named
"jakarta
-
tomcat
-
5"). For the purposes of the remainder of this document, the
symbolic name "$CATALINA_HOME" is us
ed to refer to the full pathname
of the release directory.



To run the Tomc
at:



Tomcat can be started by executing the following commands:


$CATALINA_HOME
\
bin
\
startup.bat (Windows)

$CATALINA_HOME/bin/startup.sh (Unix)




After star
tup, the default web applications included with
Tomcat will be available by visiting:
http://localhost:8080/



To Shut Down the Tomcat:


Tomcat can be shut down by executing the following comma
nd:




$CATALINA_HOME
\
bin
\
shutdown (Windows)

$CATALINA_HOME/bin/shutdown.sh (Unix)

B)
Installation of
Web Scope
:



45

The following table shows the organization of the various files in the “
WebScope

distribution folder:


File Name

Path

“Web
Scope” source code

te打c潰o⽓牣†

“Web Scope” setup

te打c潰o⽓e瑵t

䅰灬A琠捬t獳敳

te打c潰o⽧ra灨䅰灬pt
Lc污獳ls

䅰灬A琠獯畲te c潤o

te打c潰o⽧ra灨
䅰灬A琯獲s



The various steps involved in the installation of “Web Scope” are explained below:



1.

Placi
ng “Web Scope”

on Tomc
at





Copy the file “
WebScope.war


which is supplied along with the
WebScope distribution package

(
WebScope/Setup/WebScope.war or
WebScope
\
Setup
\
WebScope.war
) to the “
webapps
” folder of the Tomcat
root directory

(
$CATALINA_HOME/webap
ps/

or
$CATALINA_HOME
\
webapps
\
)




C
ommand
:



cp
WebScope
.war $CATALINA_HOME/webapps/ (Unix)



copy
WebScop
.war $CATALINA_HOME
\
webapps
\

(W
indows)



2.
Running

the database (H
SQLDB)




Prior to running the database, move to the location where the database is to
be placed.



Go to the folder:



$
CATALINA_HOME
/webapps/WebScope/WEB
-
INF/classes/


(Unix)




$CATALIN
A_HOME
\
webapps
\
WebScope
\
WEB
-
INF
\
classes
\


(Windows)




Run the database:


C
ommand
:

java
-
Xmx256m
-
cp $CATALINA_HOME/webapps/WebScope/WEB
-
INF/lib/hsqldb.jar

org.hsqldb.Server
-
database.0 hdb
-
dbname.0 hdb


(Unix)


java
-
Xmx256m
-
cp $CATALINA_HOME
\
webapps
\
WebScope
\
WEB
-
INF
\
lib
\
hsqldb.jar org.hsqldb.Server
-
database.0 hdb
-
dbname.0 hdb

(Windows)



3.

Placing t
he Applet classes
in
to

the Tomcat




C
opy the “
.class
” files of the “
graphApplet/classes/
” folder
(
WebScope/graphApplet
/
classes

)

to the folder “
WebScope

($CAT
ALINA_HOME/webapps/WebScope/
)



46



Go to the following folder in the provided “WebScope” setup file:




~/WebScope/graphApplet/classes/ (Unix)


C:
\
WebScope
\
graphApplet
\
classes
\

(Windows)



C
ommand
s
:


i)

mv

*.class $CATALI
NA_HOME/webapps/
WebScope/




mv databaseAccessDomain

$CATALINA_HOME/webapps/
WebScope/



(Unix)




ii)
move

*.class $CATALINA_HOME
\
webapps
\

WebScope
\







move databaseAccessDomain

$CATALINA_HOME
\
webapps
\

WebScope
\




(Windows)



























47

APPENDIX
D


Linux Specific Issues Faced During the Development of “Web
Scope”:


I am describing the main issues faced by me during the initial stage of d
evelopment of
“Web Scope” software for the benefit of future students working on this project.


I used the following software packages for the development of “Web Scope”.


a) Jakarta
-
tomcat5.0

b) Hibernate3.0

c) HSQLDB

d) JDK1.5


I had problems with the se
tting up of the required software packages on the Linux
platform for starting the project. Since the processing power of my own computer was
very limited my supervisor Henry provided me a Linux machine in the student project
room near his room.


Since the
Linux skills of mine were very limited I had a real night mare in configuring
the required software on the Linux machine.


I am explaining the main issues faced and how it was solved in the section given
below. I have also given the commands that I used a
nd the errors that I obtained so
that the reader can easily understand what I am explaining about.


Issue 1

1)

To do software installations I didn't have the required administrator privileges on
the Linux machine provided. So I had to contact the system ad
ministrator for
installing and configuring the required software.


Administrator had installed the tomcat in the root directory of Linux. When I tried to
run the tomcat it was giving me an error as described below.


C
ommand

[u4083453@esci15 ~]$ $TOMCAT/bin
/startup.sh

The “TOMCAT” in the above command refers to the tomcat directory.

Error message

Using CATALINA_BASE: /usr/local/jakarta
-
tomcat
-
5

Using CATALINA_HOME: /usr/local/jakarta
-
tomcat
-
5

Using CATALINA_TMPDIR: /usr/local/jakarta
-
tomcat
-
5/temp

Using
JRE_HOME: /usr/java/jdk1.5

touch: cannot touch `/usr/local/jakarta
-
tomcat
-
5/logs/catalina.out':

Read
-
only file system

[u4083453@esci15 ~]$ /usr/local/jakarta
-
tomcat
-
5/bin/catalina.sh: line

247: /usr /local/jakarta
-
tomcat
-
5/logs/catalina.out: Read
-
onl
y file system

When

The above error message was obtained when trying to run the Tom Cat server.


48

Solution

This error was occurring since the tomcat was trying to write to the log file to which I
had only reader access. The problem was solved when I copied th
e whole tomcat
folder"jakarta
-
tomcat
-
5" from the root directory “/usr/local/” to my home directory
"/home/users/u4083453/" as I have administrator privilege to my home directory.


Issue
2


2) Had a real tough time with the setting of the class paths for co
mpiling the servlets
that I wrote. Though I spent considerable amount of time in reading the
documentations provided with the tomcat and online references it didn't give me a
clear idea about what exactly I should do. My client Raju Karia and supervisor He
nry
helped me in configuring the settings for compiling the servlets in Linux and
deploying the compiled files.


I am describi
ng
the steps taken by my client,

Raju Karia in configuring the Tomcat

in
the section given below
.


Solution

a) Made a directory ca
lled “
jsrc
” and associated child directories "
src
" and "
lib
" in
the home directory.


([u4083453@esci15 ~]$ mkdir jsrc)


+jsrc


-
src


-
lib


b) Made a directory called "
WEB
-
INF
" and associated child directories "
classes
"
and "
lib
" in the home directory


+WEB
-
INF


-
classes


-
lib


c) Copied the "
web.xml
" file from the tomcat folder
"/jakarta
-
tomcat
-
5/webapps/servlets
-
examples/WEB
-
INF
" and pasted in the "
WEB
-
INF
" directory
in the home directory. And changed th
e "web.xml" to as given below




<?xml version="1.0" encoding="ISO
-
8859
-
1"?>


<!DOCTYPE web
-
app


PUBLIC "
-
//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"


"http://java.sun.com/dtd/web
-
app_2_3.dtd">


<web
-
app>


<servlet>


<servlet
-
name>

firstServlet </servlet
-
name>


<servlet
-
class>

firstServlet </servlet
-
class>


</servlet>


<servlet
-
mapping>


<servlet
-
name>

firstServlet </servlet
-
name>


<url
-
pattern>/

firstServlet </url
-
pattern>


</servlet
-
mapping>


</web
-
app>



49


d) The servlet classes written by me were copied to the folder “
src
” of "
~/jsrc/src
"
and were compiled by giving the following command.



[u4083453@esci15 ~/jsrc]$ javac
-
d /home/users/u4083453/WEB
-
INF/classes/
-
classpath /home/users/u4083453
/jakarta
-
tomcat
-
5/common/lib/servlet
-
api.jar:/home/users/u4083453/hibernate
-
3.0/hibernate3.jar/:. src/

firstServlet.java





e) Make a war file


[u4083453@esci15 ~]$ jar cvMf firstServlet.war WEB
-
INF/



f) Move the war file to the "
~/jakarta
-
tomc
at
-
5/webapps/
"


[u4083453@esci15 ~]$ mv firstServlet.war ~/jakarta
-
tomcat
-
5/webapps/




g) Now its time to run the Tomcat server


[u4083453@esci15 ~]$cd ~/jakarta
-
tomcat
-
5/bin/


[u4083453@esci15 ~/bin]$./startup.sh



h) Open any browser
and type the URL "
http://localhost:8080/firstServlet/firstServlet
"
to display the servlet


Issue 3


3)

The “Web Scope” application uses the Java Applets to display the datasets
obtained from the MDSPlus server. The web browsers didn’t show the applet grap
h
part of the web page. I was getting a message saying that the applet loading failed.



Solution


The
web
browser

(Debian and FireFox)

in the Linux machine doesn't have right plug
-
in for displaying the Java

applets. So it was impossible to run the apple
ts on that
machine. When the right plug
-
in for displaying the java applets was provided, it
started working.


Issue
4


4) The Hibernate package installed by the system administrator was corrupted due to
reasons .So I downloaded the hibernate3.0 from "wwww
.hibernate.org", the official
website of hibernate.


The downloaded hibernate package was (unzipped) installed to my Linux home
directory

\
home
\
users
\
u4083453
\
hibernate
-
3.0
\
”. Due to some reasons the size of
many jar files in the unzipped hibernate direc
tory were "0 bytes”.


Solution



It was mainly because of lack of enough free space in the home directory. This issue
was solved by moving the unwanted files in the home directory to a mass storage
device, thus providing more free space for the hibernate p
ackage.




50

APPENDIX E


GANT CHART