Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

Sponsored Links

Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs

The architecture of aglets

Find out about the inner workings of aglets, IBM Japan's Java-based autonomous software agent technology

  • Print
  • Feedback

Page 6 of 6

The aglet being represented by a proxy might be local or remote, but the proxy object is always local. For example, if a BossAglet in Silicon Valley wants to communicate with an EmployeeAglet on a South Pacific island, the BossAglet gets a local AgletProxy object, which represents the remote EmployeeAglet. The BossAglet merely invokes methods in the local proxy, which in turn communicates across the network to the EmployeeAglet. Only aglets, not proxies, migrate across the network. A proxy communicates with a remote aglet that it represents by sending data across the network.

You get a proxy to an aglet in one of three ways, each of which involves invoking a method in the context object:

  1. By creating the aglet in the first place with createAglet(). (This returns a proxy object.)

  2. By searching through an enumeration of local proxies returned by getAgletProxies().

  3. By supplying an "aglet identifier" and, if remote, an aglet location as parameters to getAgletProxy(). (Every aglet, upon creation or cloning, is assigned a globally unique aglet identifier.)


Security

Mobile-agent systems, such as aglets, require high levels of security, because they represent yet another way to transmit a malicious program. Before aglets can be used in practice, there must be an infrastructure of aglet hosts that prevent untrusted aglets from doing damage but provide trusted aglets with useful access to the host's resources. Security is amply provided for in Java's intrinsic architecture and in the extra security features of JDK 1.1, but as with applets, some attacks (such as denial of service by allocating memory until the host crashes) are still possible. Currently, the aglet hosts from IBM (named Tahiti and Fiji) place very severe security restrictions on the activities of any aglet that didn't originate locally.

Next month

Will aglets become as ubiquitous as their plastic cousins, which quietly perch on the ends of everyone's shoelaces? Aglets represent a good example of innovation on top of Java's network-oriented architecture, but what new benefits do they offer developers and end users that client/server, applets, and servlets don't already offer? In next month's Under The Hood, I will analyze the real-world utility of mobile agents in general and aglets in particular.

About the author

Bill Venners has been writing software professionally for 12 years. Based in Silicon Valley, he provides software consulting and training services under the name Artima Software Company. Over the years he has developed software for the consumer electronics, education, semiconductor, and life insurance industries. He has programmed in many languages on many platforms: assembly language on various microprocessors, C on Unix, C++ on Windows, Java on the Web. He is author of the book: Inside the Java Virtual Machine, published by McGraw-Hill.This month's article looks at aglets, an innovation developed by IBM Japan.
  • Print
  • Feedback

Resources
  • Previous Under The Hood articles:
  • The lean, mean virtual machine -- Gives an introduction to the Java virtual machine. Look here to see how the garbage collected heap fits in with the other parts of the Java virtual machine.
  • The Java class file lifestyle -- Gives an overview to the Java class file, the file format into which all Java programs are compiled.
  • Java's garbage-collected heap -- Gives an overview of garbage collection in general and the garbage-collected heap of the Java virtual machine in particular.
  • Bytecode basics -- Introduces the bytecodes of the Java virtual machine, and discusses primitive types, conversion operations, and stack operations in particular.
  • Floating Point Arithmetic -- Describes the Java virtual machine's floating-point support and the bytecodes that perform floating point operations.
  • Logic and Arithmetic -- Describes the Java virtual machine's support for logical and integer arithmetic, and the related bytecodes.
  • Objects and Arrays -- Describes how the Java virtual machine deals with objects and arrays, and discusses the relevant bytecodes.
  • Exceptions -- Describes how the Java virtual machine deals with exceptions, and discusses the relevant bytecodes.
  • Try-Finally -- Describes how the Java virtual machine implements try-finally clauses, and discusses the relevant bytecodes.
  • Control Flow -- Describes how the Java virtual machine implements control flow and discusses the relevant bytecodes.