Java already supports concurrency through the thread mechanism and monitor synchronization built into the language. In this article we are interested in truly parallel computation, involving multiple CPUs. Such parallelism could be introduced into Java in a number of ways.
It could be achieved through automatic parallelization of sequential code, but it is unclear why this would be more successful for Java than for other languages. Alternatively, the Java virtual machine for a shared memory multiprocessor can schedule the threads of a multi-threaded Java program on different processors. Some success with these approaches has already been demonstrated . For computation on a network (or distributed memory computer) realistic options include language extensions or directives akin to HPF, or provision of libraries--class libraries--to support task parallelism or data parallelism.
A popular approach in C++ has been to defer language extensions and concentrate on class library support for parallel programming. The similarities between the two languages suggest this may be a fruitful avenue in Java too. The success of this analogy is by no means automatic, however. Features such as templates and user-defined operator overloading make the C++ language inherently more customizable than Java. In C++ library-defined types can be used on an identical footing to primitive types--inline methods mean they can be almost as efficient as primitive types. Less importantly, but conveniently, new control constructs can often be simulated in C or C++ through use of macros1. On grounds, presumably, of simplicity and transparency many of these features have been omitted from Java.
Such caveats notwithstanding, this article will concentrate on class libraries rather than language extensions. We will be working with class libraries implemented in the standard Java development environment.
Another open question is how multiple interacting Java tasks are to be initiated. Conventionally in network computing, instructions to execute a particular user task are sent to a specialized daemon or secure server running on the target host. Alternatively standard operating system daemons (rshd, rexecd, ...) can be used to the same effect. Java brings some options of its own. One is to use standard or enhanced Web servers to execute Java byte-codes. This approach is predicated on the existence of cooperative servers, probably running suitable CGI scripts. Another option is to exploit Java-enabled browsers. Applets downloaded from a particular server can perform computations and return the results to that server. In any case the substantive improvement over conventional network computing is that the byte-codes can be downloaded on the fly to target hosts, even in heterogenous networks. Conventionally, it was often necessary to install and compile an application on each target host before starting the task remotely.