Go up to Top
Go forward to 2 Using the Toolkit
This reports describes the DAJ toolkit for designing, implementing, testing, simulating, and visualizing distributed algorithms in Java . DAJ consists of a Java class library with a deliberately simple programming interface that allows to develop distributed algorithms in a message passing model. The resulting programs may be executed in standalone mode by a Java interpreter or embedded as applets into HTML pages and executed by available Web browsers.
Our motivation for this work stems from some uneasiness with how to teach distributed algorithms and programming: there are various excellent textbooks on this topic , but they describe distributed algorithms in an abstract notation rather far away from real programs. Furthermore, there is a lack of an easy to use and universally accessible platform for implementing the algorithms taught in class and investigating their dynamical behavior. Distributed message passing libraries like PVM  or systems based on the MPI standard  are too "heavy-weight" for use in education; they force to deal with a number of low-level technical details, and they do not allow the easy observation of the "internals" of the execution.
We therefore have designed and implement the DAJ toolkit that provides an easy way of programming distributed algorithms and visualizing their dynamic behavior based on a programming model that is intuitive but still close to "real" systems. DAJ has been implemented using Sun's Java Development Kit . Despite of a few problems related to Java's Abstract Window Toolkit (AWT), the resulting programs should run in any Java environment and be embeddable as applets into HTML pages; this gives the possibility to develop documents that integrate text and executable code in a single framework.
An application developed with DAJ may run in one of three modes:
The programming model has been deliberately kept simple with minimum conceptual overhead:
The visualization is based on the following elements:
Program execution may be customized by
Furthermore, the programmer may state assertions about the global state of the network (nodes and channels), which gives the possibility to check the validity of invariance conditions which may be formally proved in class.
The structure of this report is as follows:
The DAJ toolkit is freely available at the URL
Reports, comments, and suggestions should be addressed to the author athttp://www.risc.uni-linz.ac.at/software/daj