Home > Store

Programming and Deploying Java Mobile Agents with Aglets

Register your product to gain access to bonus material or receive a coupon.

Programming and Deploying Java Mobile Agents with Aglets

Book

  • Sorry, this book is no longer in print.
Not for Sale

Description

  • Copyright 1998
  • Dimensions: 7-3/8" x 9-1/4"
  • Pages: 256
  • Edition: 1st
  • Book
  • ISBN-10: 0-201-32582-9
  • ISBN-13: 978-0-201-32582-9

The next huge wave of Internet development, Java™ Aglets™ are lightweight mobile agents that enable the autonomous execution of programs on remote heterogeneous hosts. Because Java aglets automate many of the processes users must now perform manually, the technology is poised to transform the way many users interact with the Internet.

Written by the creators of the technology, this book gives you the knowledge and skills you need to create Java aglets using IBM's Aglets Software Development Kit. Practical in focus, the book features numerous real-world examples of Java code that illustrate concepts and demonstrate Java aglets in action.

Geared for Java programmers with no previous agent experience, the book presents a clear introduction to mobile agents that explains the basic conceptual model, agent behavior, the creation and disposal of agents, and agent transfer over a network. The appendix provides systematic, detailed coverage of the Java Aglet API describes and illustrates aglet anatomy, context, messaging, and collaboration.

Moving beyond these basics, the book also presents advanced topics, such as design patterns for creating mobile agent applications, and provides a deeper look inside the Aglets framework to help you optimize the performance of your aglets. Aglet security, a topic of critical importance for this mobile technology, is covered in depth.



0201325829B04062001

Extras

Web Resources

Click below for Web Resources related to this title:
IBM's Java Aglet website

Sample Content

Table of Contents



1. Introduction to Mobile Agents.

What's a Software Agent?

What's a Mobile Agent?

Seven Good Reasons for Using Mobile Agents.

Network Computing Paradigms.

Mobile Agent Applications.

Application Example: Tabican.

Contemporary Mobile Agent Systems.

Mobile Agent Standardization: MASIF.

Summary.



2. Elements of a Mobile Agent System.

Agent and Place.

Agent Behavior: Creation and Disposal.

Agent Behavior: Transfer.

Communication.

MASIF: MAFAgentSystem and MAFFinder.

Summary.



3. Mobile Agents with Java.

Agent Characteristics of Java: Benefits.

Agent Characteristics of Java: Drawbacks.

Mobile Java Agent: The Aglet Model.

Aglet Package.

Aglet Example: Remote File Update.

Summary.



4. Anatomy of an Aglet.

Creation.

Aglet Disposal.

Delegation-Based Event Model.

Cloning.

Aglet Mobility.

Persistence.

Events.

Aglet Example: Directory Listing.

Summary.



5. Aglet Context.

Aglet Creation.

Proxy Retrieval.

Aglet Retraction.

Context Properties.

Aglet Example: Directory Listing.

Summary.



6. Aglet Messaging.

Simple Messaging.

The Message Class.

Getting the Reply.

Message Management.

Remote Messaging.

Multicasting.

Receiving Multiple Replies.

Aglet Example: Directory Listing.

Summary.



7. Aglet Collaboration.

Aglet Proxy.

Controlling an Aglet.

Finding an Aglet.

Aglets in Parallel Execution.

Summary.



8. Agent Design Patterns.

Classification of Agent Design Patterns.

The Master-Slave Pattern.

The Itinerary Pattern.

Master-Slave Revisited.

Summary.



9. Inside Aglets.

Architectural Overview.

Aglet Object Structure.

Initialization and Serialization of Aglets.

Class Loading and Transfer.

Communication Layer.

Summary.



10. Aglet Security

What Can Go Wrong?

Taxonomy of Attacks.

Security Services: What Is Possible and What Is Not.

When You Cannot Protect Your Agents.

When You Cannot Trust Incoming Agents.

Security Model.

Summary.



Appendix: The Aglet API Documentation.

com.ibm.aglet Package.

com.ibm.aglet.event Package.



Bibliography.


Index. 0201325829T04062001

Preface

Think of the Internet as a distributed, massively parallel supercomputer that connects information repositories, databases, intelligent agents, and mobile code. Imagine sending your own personalized agents to roam the Internet. They will monitor your favorite Web sites, get you the ticket you couldnit get at the box office, or help you to remotely schedule meetings for your next overseas trip. Sound like science fiction? Maybe, but the advent of Java has truly revolutionized the Internet. It has created a global infrastructure that is just waiting for mobile agents to roam its wires and interact with millions of computers.

Who Should Read This Book? This book is about how to program mobile Internet agents in Java with the help of the Aglet application programming interface (API). A freely available implementation of the Aglet API from IBM Corporation has spurred a tremendous interest in aglets. Consequently, there have been numerous calls for a reference book on the aglet, its API, and its use. As the inventors of the aglet, we decided to put in some long nights to write the definitive book about how to program Java aglets. We hope you enjoy reading it. The book is intended for daring programmers, students, and researchers at the frontier of network programming. No particular knowledge about agent-related technologies is required, but fluency in Java is a must. .

Organization of This Book The following outline shows the progression of the material we present. Chapters 1 and 2 are a general introduction to various aspects of the mobile agent paradigm. Chapter 3 provides a bridge between the mobile agent paradigm and Java by introducing the Aglet API. Chapters 4 through 7 systematically cover the Aglet API in detail, and Chapters 8 through 10 are dedicated to advanced subjects: agent design patterns, the Aglet API and its implementation, and mobile agent security.

Chapter 1: Introduction to Mobile Agents

This chapter leads you into the world of mobile agents, an emerging technology that makes it much easier to design, implement, and maintain distributed systems. We explain the benefits of mobile agents and demonstrate their impact on the design of distributed systems. The chapter also includes a brief overview of contemporary mobile agent systems.

Chapter 2: Elements of a Mobile Agent System

This chapter helps you to develop a basic understanding of the elements of a mobile agent system. We present the basic conceptual model of mobile agents, which includes the two core concepts of any mobile agent system: agent and place. The chapter also describes the essentials of agent behavior, including the creation and disposal of agents and their transfer over a network.

Chapter 3: Mobile Agents with Java

This chapter shows what it is that makes Java a powerful tool for agent development. This chapter introduces you to the agletoa Java-based agile agentoand gives you a brief overview of the Aglet API. The purpose of this overview is to link the mobile agent model with Java.

Chapter 4: Anatomy of an Aglet

This chapter teaches you about the methods in the Aglet class that can be overridden by the programmer. These methods are systematically invoked by the system as important events in the life of an aglet. The chapter shows you the principles of using these methods, including important information about the order in which they are invoked by the system when specific events take place. With this knowledge, you will be in a position to create aglets that can perform simple tasks on remote computers.

Chapter 5: Aglet Context

This chapter covers one of the key elements of the Aglet API, namely, the AgletContext interface. The interface defines the execution context for aglets, and in this chapter we teach you about the methods that an aglet can invoke in its current context to create new aglets, retrieve aglets contained in the same as well as remote contexts, and much more.

Chapter 6: Aglet Messaging

This chapter covers the basics of aglet messaging. Several means of interaglet communication are supported in the Aglet API, and you will learn about simple messaging with and without reply, advanced message management, and multicast messaging between aglets. The classes covered in this chapter include Message, MessageManager, and FutureReply.

Chapter 7: Aglet Collaboration

This chapter introduces the aglet proxy, AgletProxy, and describes the rationale behind this important element of the Aglet API. This overview is followed by a demonstration of different ways to control aglets to make them collaborate with one another.

Chapter 8: Agent Design Patterns

This chapter focuses on a set of design patterns for creating mobile agent applications. Design patterns have proved to be highly useful in object-oriented programming and have helped developers to achieve good design of applications through reusability of validated components. We hope that the design patterns described in this chapter will serve this purpose in the context of aglet-based .

Chapter 9: Inside Aglets

This chapter presents a general overview of the components of the Aglets framework, with a special focus on selected parts of the framework. After reading this chapter you should have a sufficient understanding of the inner workings of the Aglets Framework to optimize the performance of your aglets, to understand why apparently healthy aglets are malfunctioning, and overall to better use the Aglet API in your programming. .

Chapter 10: Aglet Security

This chapter introduces you to network security technologies in general and mobile agent security in particular. We first show you what can go wrong when mobile agents are released in a network. This is followed by a taxonomy of attacks, which introduces you to some potential attacks related to mobile agents. We then briefly explain cryptography as a general basis of security before continuing with a description of the set of security services available for mobile agents. The remainder of this chapter is devoted to a description of security policies for mobile agent systems in general and the Aglets framework in particular. .

Appendix: The Aglet API Documentation

The appendix contains the API documentation of the Aglet API (limited to the aglet package).

Bibliography

We offer this list of works for further reading on related topics. The list is by no means exhaustive, and other excellent works exist on most of the .

Conventions Used in This Book All the code examples in the text have been compiled and run on Java Development Kit (JDK) 1.1.5 using the first release of IBMis Aglets Software Development Kit. Source code for examples in this book can be retrieved on-line from the Web sites listed in the Introduction.

A constant-width font is used for the following:

Code examples

 public class MyFirstAglet extends Aglet {     ...  }

Class, method, and variable names within the text

URLs set in italics

We have attempted to be complete and accurate throughout this book. Changes in future releases of IBMis Aglets Software Development Kit, as well as changes in future releases of JavaSoftis JDK, make it impossible to be completely accurate in all cases. We welcome your feedback about this book, especially if you spot errors or omissions. We prefer to use the Aglets mailing list (see the Introduction) as the communication channel for this book. However, if you wish to contact us directly, feel free to send your electronic mail to danny@acm.org.



0201325829P04062001

Introduction

Why All the Fuss about Mobile Agents? Software agents are programs that assist people and act on their behalf. Agents function by allowing people to delegate work to them. This is a very interesting concept that becomes even more attractive when the agents are no longer bound to the system where they begin execution. Mobile agents have the unique ability to transport themselves from one system in a network to another. The ability to travel allows mobile agents to move to a system that contains services with which they want to interact and then to take advantage of being in the same host or network as the service (see Figure I-1).

You will find that mobile agents reduce network traffic and provide an effective means of overcoming network latency. Whatis more, through their ability to operate asynchronously and independently of the process that created them, mobile agents help you to construct highly robust and fault-tolerant systems.

Several organizations promote standards for mobile agent systems. Two of them are the Object Management Group (OMG) and the Foundation for Intelligent and Physical Agents (FIPA). Together they represent almost 1,000 corporate members. OMG endorses the Mobile Agent System Interoperability Facility (MASIF); at the time of this writing, FIPA has called for proposals for agent mobility. We expect these standardization efforts to have a positive effect on the deployment of mobile agents in commercial systems.

What Is a Java Aglet? The aglet represents the next leap forward in the evolution of executable content on the Internet, introducing program code that can be transported along with state information. Aglets are Java objects that can move from one host on the Internet to another. That is, an aglet that executes on one host can suddenly halt execution, dispatch itself to a remote host, and resume execution there. When the aglet moves, it takes along its program code as well as its data.

The aglet is a mobile Java agent that supports the concepts of autonomous execution and dynamic routing on its itinerary. You can also think of the aglet as a generalization and extension of Java applets and servlets. Aglets are hosted by an Aglet server in a way similar to the way applets are hosted by a Web browser (see Figure I-2). The Aglet server provides an environment for aglets to execute in, and the Java virtual machine (JVM) and the Aglet security manager make it safe to receive and host aglets.

By the way, the origin of the word aglet is simple: it means "lightweight agent" in much the same way that applet means lightweight application. The term aglet is a portmanteau word combining agent and applet.

What Is the Aglet API? The Aglet API is an agent development kitoin other words, a set of Java classes and interfaces that allows you to create mobile Java agents. A research team at the IBM Tokyo Research Laboratory developed the Aglet API in Japan in response to a call for a uniform platform for mobile agents in heterogeneous environments such as the Internet. The effort was initiated by one of the authors of this book, Danny B. Lange, in early 1995 and continues under the leadership of Mitsuru Oshima.

What is new about the Aglet API is that it stretches the renowned "write once, run anywhere" capability of Java programs to apply to mobile agents. We would rephrase it to "write once, go anywhere." That is, once you have written an aglet, it will run on every machine that supports the Aglet API. You need not be concerned with the underlying hardware or operating system or with the nature of the particular implementation of the Aglet API on the host where your aglet is running. The Aglet API mirrors the applet model in Java. The goal has been to bring the flavor of mobility to the applet. We have attempted to make the Agletsi Framework an exercise in clean design, and it is our hope that applet programmers will appreciate the many ways in which the aglet model reflects the applet model.

IBMis Aglets Software Development Kit The Aglets Software Development Kit (ASDK) is an implementation of the Aglet API that can be downloaded from IBM Tokyo Research Laboratoryis Web site (www.trl.ibm.co.jp/aglets). The ASDK includes Aglet API packages, documentation, sample aglets, and the Tahiti aglet server (named after Dannyis favorite vacation spot). Tahiti is a Java application that allows the user to receive, manage, and send aglets to other computers that are running Tahiti (see Figure I-3). You should use Tahiti to run the examples presented in this book.

World Wide Web and Mailing Lists IBMis Aglets Web site can be found at www.trl.ibm.co.jp/aglets. Here you can find the latest releases and documentation of IBMis ASDK. Another important source of information is the Aglets mailing list, aglets@javalounge.com. Send a message with subscribe aglets in the message body to aglets-request@javalounge.com. If you wish to reach the Aglets Team, you should use aglets@yamato.ibm.co.jp.

Another interesting forum is the Mobility mailing list, mobility@media.mit.edu. Cofounded by Danny, this mailing list is dedicated to the discussion of mobile agent technology and applications. The last mailing list we want to mention is the much broader Agents mailing list, agents@cs.umbc.edu.

Acknowledgments As you are probably well aware, writing a book is never an effort undertaken solely by the authors who get all the credit on the cover. Many people have contributed, helped, and encouraged us in a great many ways.

First, our thanks go to the past and present members of the Aglets Team at IBM, without whom aglets would not have made it. They include, in alphabetical order, Dr. Yariv Aridor, Gunter Karjoth, Kazuya Kosaka, Yoshiaki Mima, Dr. Yuichi Nakamura, Kouichi Ono, Hideaki Tai, Kazuyuki Tsuda, and Gaku Yamamoto. Special thanks to Dr. Tsutomu Kamimura; without his unflagging support, aglets would not have seen the light of day. We would also like to thank Mike McDonald of IBM Japan for checking the wording of this book.

Many people at Addison-Wesley contributed to our project. In particular we wish to thank Betsy Hardinger, Katherine Kwack, Mary OiBrien, Laura Potter, Marilyn Rash, and Elizabeth Spainhour for their editorial and production support. We would also like to thank all the reviewers for their insights and valuable comments at various stages of the creation of this book: Michael Bursell, Paul Clements, Ross A. Finlayson, James P. Neill, and Alan Piszcz.

Most of all, we must thank our respective families. Mitsuru thanks Akiko for her tolerant support and little Yuka for slumbering peacefully during the writing of this book. Danny wishes to thank Eva, Jacob, and Yina for their tireless support and for being never-failing sources of wonderful diversion during the work of making aglets a reality and later during the writing of this book.

Have a good time with aglets!

Danny B. Lange
Cupertino, California

Mitsuru Oshima
Tokyo, Japan

Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020