Welcome!

SOA & WOA Authors: Peter Silva, Maureen O'Gara, Tony Bishop, Mark O'Neill, Yeshim Deniz

Related Topics: PowerBuilder

PowerBuilder: Article

Mobile Agent-Based File Search Utility

Creating a utility that can search for any desired document on multiple remote machines simultaneously

The messages are processed by the handleMessage method of the FileSearchAglet. The message handler then disposes of this aglet:

public boolean handleMessage(Message msg)
{
//.....
else if(msg.sameKind("Destroy"))
{
     //Destroy this aglet.
         this.dispose();
     }
     //....
}

In a similar manner the user can select an element from the Remote URL list box and then click on the STOP button to destroy the aglet that is searching on the URL of the element selected from the list box.

Future Enhancements
Several enhancements could be made to this file search application. We could have one agent that visits the machines in sequential order. This agent would try to search for the file on the network given whatever search criteria, for example, a file that was recently modified. The user could also find the largest file of all the files on the network or one that contains some keyword. Currently the application isn't secured since anyone can search and get a file from a remote machine without the permission of the user of the machine.

Aglet Installation & Configuration Instructions
We used IBM's Aglets Framework (ASDK) for this search utility. We used version 2.0.2 of the ASDK, i.e., Aglets 2.0.2. You can download it from http://sourceforge.net. You'll also need JDK 1.5 on your machine.

After you've downloaded the zip version of Aglets 2.0.2, unzip it to the folder of your choice. You'll need to run ant and ant install-home commands from the bin folder of your installation. Disable the security by commenting the line below in the aglets.props file that's in the cnf subfolder of your installation folder:

#aglets.secure=false

You can now start the Tahiti server by running the command below from the bin folder of your installation:

C:\aglets-2.0.2\bin>
agletsd -port 9000 -f ..\cnf\aglets.props -cleanstart

You'll see the console in Figure 5.

Summary
A wide variety of techniques for searching on remote machines are available today. But none of these techniques try to utilize the network and computational resources optimally. This slows network traffic considerably. Such utilities are usually more time consuming and difficult to deploy on huge networks. Even if we manage to deploy it on the network, it's difficult to add new enhancements to the application developed using these techniques.

In this article, we demonstrated the development of a search system using mobile agent technology that overcomes most of these limitations. We demonstrated how mobile agent technology can be used to create a file search utility. This utility can search for any desired document on multiple remote machines simultaneously and uses the network optimally.

More Stories By P.G. Sarang

Dr. Sarang in his long tenure of 20+ years has worked in various capacities in the IT industry. Dr. Sarang currently holds the position of Director (Architecture) with Kynetia, Spain and has been a Consultant to Sun Microsystems for last several years. He has previously worked as a Visiting Professor of Computer Engineering at University of Notre Dame, USA and is currently an adjunct faculty in the Univ. Dept. of Computer Science at University of Mumbai. Dr. Sarang has spoken in number of prestigious international conferences on Java/CORBA/XML/.NET and has authored several articles, research papers, courseware and books.

More Stories By Ninad Kamerkar

Ninad Kamerkar is currently pursuing a master's degree in computer science at the University of Mumbai in India. His research interests involve mobile agents, networking, and distributed systems. Besides his studies, he is interested in painting and listening to music.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.