Externalities

Externalities are objects that access resources external to the portable Java runtime environment.  Another way to think of externalities is as objects that provide input and output to an application other than user input and graphical output.  Examples of externalities are files, sockets, and system time.

Externalities are an issue for a replicated distributed application.  Consistency among the replicas is insured as long as each deterministic replica receives that same input.  Since externalities are machine-specific, replicas of an externality could deliver different values to each replica of the shared application.  Our approach to dealing with this is to replace each externality with a proxy that communicates with a central instance of the externality which delivers the same value to each replica.

As a rule, an externality object will access resources on its host machine via a native method, which is a platform-specific implementation of a method to which the platform-independent Java Virtual Machine passes control.  Some native methods are private and are wrapped by public Java methods that we can override in a platform-independent manner.   However, public native methods are a problem for our proxy scheme, because we cannot override them with a platform-independent implementation in a proxy of the externality.

This document enumerates the externality classes in Java.  Each class name is followed with a brief description of the class and what makes it an externality.  The class's public native methods are listed.  Note that not all of these public native methods are related to accessing the problematic externality of the class (e.g., shared replicas calling gc() (garbage collect) of Runtime will not cause a problem).
 


Externalities in Java

The following classes are externalities in Java.

The following classes are not externalities, but initially seem to be.
May 18, 1998