Implementation of XML Database and Enhancement of Resource and Sensor Agents Cuong Ngo CSS497 Summer 2006 Professor Munehiro Fukuda Overview Mobile agents and AgentTeamWork XML Format and XML DOM object New XML database and Applet GUI Dynamic monitoring of resources Future work AgentTeamwork AgentTeamWork Overview User A’s Process User A’s Process User B’s Process TCP Communication Snapshot Methods Results GridTCP User program wrapper snapshot GridTCP Snapshot Methods User program wrapper snapshot Results snapshot Sentinel Agent Resource Agent User A GridTCP User program wrapper Sentinel Agent Sentinel Agent Commander Agent Snapshot Methods Resource Agent XDB XDB FTP Server snapshots Bookkeeper Agent snapshots Bookkeeper Agent User B Commander Agent Project Objectives Replace old database, eXist XDBase eXist No documentation Need to include cluster information Dynamically monitor resources Proper communication between agents XML Format XML File <department> <employee> <name>John Doe</name> <email>[email protected]</email> </employee> <employee> <name>Bill Jones</name> <email>[email protected]</email> </employee> </department> DOM Object Element “department” Element “employee” Element “name” Text “John Doe” Element “email” Text “[email protected]” Element “name” Text “Bill Jones” Element “email” Text “[email protected]” Element “employee” DOM: Document Object Model Keeps XML structure in tact DOM Structure Node Document Element Text Ability to: Add Delete Modify Query Element “department” Element “employee” Element “name” Text “John Doe” Element “email” Text “[email protected]” “[email protected]” Element “id” Whole XML File Text “5561” 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[name=‘John Doe’]/ //name //employee[name = ‘Bill Jones’]/email/text() //employee/* //name | //email Element “department” Element “employee” Element “name” Text “John Doe” Element “email” Text “[email protected]” Element “name” Text “Bill Jones” Element “email” Text “[email protected]” Element “employee” Database Overview Parse XML document to DOM object and create a wrapper object called Resource Modification timestamp Availability Ping Collection class contains Resources Database contains Collections Parse and process request Services connect to database and demand a request RetrievalService QueryService Applet-based GUI interacts with database 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 Resource Itinerary with Cluster Information Old format included only IP addresses 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 Even gateway must be running AgentTeamWork platform Applet-based GUI Graphically interact with the new database Ability to: Look at database contents Add files Delete files Connect to remotely located databases Applet-based GUI 2 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” Itinerary includes cluster and public nodes Proper communication with other agents SensorAgent Modifications Resource id 1 XDBase Sensor Client Root Id 4 Client 1 Id 16 Sensor Server Root Id 5 Client 2 Id 17 Server 1 Id 20 Server 2 Id 21 SensorAgent Modifications 2 Resource id 1 XDBase Sensor Root Id 4 Public Client Root Id 17 Gateway 1 Id 16 G1 Client Root Id 65 Gateway 2 Id 64 G2 Client Root Id 256 G2 Server Root Id 257 G2 Client 1 Id 1024 G2 Server 1 Id 1028 Cluster 2 G1 Server Root Id 66 Cluster 1 Client 1 Id 68 Client 2 Id 69 Public Server Root Id 18 Server 1 Id 72 Server 2 Id 73 Future Expansions of Database Easy to add new functionality to database Create a service to send a request to database Database parses and processes the request Database send back results Future AgentTeamWork Tasks SensorAgent 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 What I Learned XML, DOM object, Xpath Grid computing programming Communication between team members Understanding existing code and modifying it without breaking it Acknowledgements Advisor Prof. Munehiro Fukuda Sponsor Prof. Shinya Kobayashi Emory Horvath CSS301, CSS342, CSS343, CSS434, CSS442, CSS360 XML and Java, 2nd Edition book Questions ?
© Copyright 2026 Paperzz