Presentation is loading. Please wait.

Presentation is loading. Please wait.

Implementation of XML Database and Enhancement of Resource and Sensor Agents Cuong Ngo CSS497 Summer 2006 Professor Munehiro Fukuda.

Similar presentations


Presentation on theme: "Implementation of XML Database and Enhancement of Resource and Sensor Agents Cuong Ngo CSS497 Summer 2006 Professor Munehiro Fukuda."— Presentation transcript:

1 Implementation of XML Database and Enhancement of Resource and Sensor Agents Cuong Ngo CSS497 Summer 2006 Professor Munehiro Fukuda

2 Overview Mobile agents and AgentTeamWork XML Format and XML DOM object New XML database and Applet GUI Dynamic monitoring of resources Future work AgentTeamwork

3 AgentTeamWork Overview FTP Server User A User B User B snapshot snapshots User program wrapper Snapshot Methods GridTCP User program wrapper Snapshot Methods GridTCP User program wrapper Snapshot Methods GridTCP snapshot User A’s Process User A’s Process User B’s Process TCP Communication Commander Agent Sentinel Agent Resource Agent Sentinel Agent Resource Agent Bookkeeper Agent Results XDB

4 Project Objectives Replace old database, eXist No documentation No documentation Need to include cluster information Need to include cluster information Dynamically monitor resources Proper communication between agents eXistXDBase

5 XML Format XML File DOM Object XML Format XML File DOM Object <department><employee> John Doe John Doe <email>jDoe@foo.com</email></employee><employee> Bill Jones Bill Jones <email>bJones@foo.com</email></employee></department> Element “department” Element “employee” Element “email” Element “employee” Element “name” Text “John Doe” Text “Bill Jones” Element “email” Text “jDoe@foo.com” Text “bJones@foo.com” Element “name”

6 DOM: Document Object Model Keeps XML structure in tact DOM Structure Node Node Document Document Element Element Text Text Ability to: Add Add Delete Delete Modify Modify Query Query Element “department” Element “employee” Element “email” Element “name” Text “John Doe” Text “jDoe@foo.com” Whole XML File Element “id” Text “5561” Text “jDoe@foo.net”

7 Xpath Expressions Xpath is a query language used to find information in an XML document Java provides XPathAPI to use Xpath expressions to perform tasks Examples /department/employee /department/employee /department/employee[name=‘John Doe’]/ /department/employee[name=‘John Doe’]/ //name //name //employee[name = ‘Bill Jones’]/email/text() //employee[name = ‘Bill Jones’]/email/text() //employee/* //employee/* //name | //email //name | //email Element “department” Element “employee” Element “email” Element “employee” Element “name” Text “John Doe” Text “Bill Jones” Element “email” Text “jDoe@foo.com” Text “bJones@foo.com” Element “name”

8 Database Overview Parse XML document to DOM object and create a wrapper object called Resource Modification timestamp Modification timestamp Availability Availability Ping Ping Collection class contains Resources Database contains Collections Parse and process request Parse and process request Services connect to database and demand a request RetrievalService RetrievalService QueryService QueryService Applet-based GUI interacts with database

9 Database Services Create a collection, synchronize by writing database contents back to local disk, and shutting down of the database Store, retrieve and delete a collection or resource Update a single resource or an entire collection Query a collection for specific items Specifically query the database for resources based on requirements

10 Resource Itinerary with Cluster Information Old format included only IP addresses Assumed every IP was public Assumed every IP was public New format contains a cluster, its gateway and its cluster nodes. Use gateway to communicate between nodes of different clusters Use gateway to communicate between nodes of different clusters Even gateway must be running AgentTeamWork platform Even gateway must be running AgentTeamWork platform

11 Applet-based GUI Graphically interact with the new database Ability to: Look at database contents Look at database contents Add files Add files Delete files Delete files Connect to remotely located databases Connect to remotely located databases

12 Applet-based GUI 2

13 ResourceAgent Modifications Create runtime file for each cluster node Create itinerary for SensorAgent to monitor nodes dynamically Query the database for all nodes within a domain, such as “UWB” Query the database for all nodes within a domain, such as “UWB” Itinerary includes cluster and public nodes Itinerary includes cluster and public nodes Proper communication with other agents

14 SensorAgent Modifications Resource id 1 Sensor Client Root Id 4 Sensor Server Root Id 5 Client 1 Id 16 Client 2 Id 17 Server 1 Id 20 Server 2 Id 21 XDBase

15 SensorAgent Modifications 2 Resource id 1 Public Client Root Id 17 Sensor Root Id 4 Gateway 1 Id 16 Gateway 2 Id 64 G1 Client Root Id 65 G1 Server Root Id 66 Public Server Root Id 18 Server 2 Id 73 G2 Client Root Id 256 G2 Server Root Id 257 Client 1 Id 68 Client 2 Id 69 Server 1 Id 72 G2 Client 1 Id 1024 G2 Server 1 Id 1028 Cluster 2 Cluster 1 XDBase

16 Future Expansions of Database Easy to add new functionality to database Create a service to send a request to database Create a service to send a request to database Database parses and processes the request Database parses and processes the request Database send back results Database send back results

17 Future AgentTeamWork Tasks SensorAgent Have 2 cluster gateways perform bandwidth test to monitor inter-cluster bandwidth Have 2 cluster gateways perform bandwidth test to monitor inter-cluster bandwidth Need communication to change unavailable nodes to available when a job is complete CommanderAgent informs ResourceAgent which in turns creates a service request to the database CommanderAgent informs ResourceAgent which in turns creates a service request to the database

18 What I Learned XML, DOM object, Xpath Grid computing programming Communication between team members Understanding existing code and modifying it without breaking it

19 Acknowledgements Advisor Prof. Munehiro Fukuda Sponsor Prof. Shinya Kobayashi Emory Horvath CSS301, CSS342, CSS343, CSS434, CSS442, CSS360 XML and Java, 2 nd Edition book

20 Questions ?


Download ppt "Implementation of XML Database and Enhancement of Resource and Sensor Agents Cuong Ngo CSS497 Summer 2006 Professor Munehiro Fukuda."

Similar presentations


Ads by Google