Java Reference
In-Depth Information
build autonomous control modules, which are the building blocks of a
distributed system.
Flexibility
: control modules execute multiple concurrent tasks and offer
services to other control modules. They interact with each other accord-
ing to a variety of synchronization modes and communication protocols.
■
Maintainability
: the framework allows the incremental development of
control modules, whose capabilities can be extended by adding new types
of task and communication protocols.
■
19.2.6
Test
We need to develop a test application using the library components of the
MMI framework. For the sake of simplicity, the test application is a small
client
server system that demonstrates the correct behaviour of the frame-
work components with regard to the main features described above.
-
The client is a graphical user interface that displays a jogging track. The
track is made up of a graph of lay-bys where the runner can rest. The user
can select the path that the runner will follow repeatedly and the runner's
speed. A path is a sequence of adjacent lay-bys.
■
The server is the manager of the jogging track. Since many runners can be
on the track simultaneously, it guarantees that every lay-by is occupied
by only one runner at a time. When a runner is going to move towards a
lay-by that is currently occupied, the server stops the runner until the
lay-by is free.
■
The client can be a standard application or an applet, or even an HTML
page that offers a textual representation of the jogging track and of the
position of each runner.
19.3
■
Architecture and planning
The system architecture is made up of three main subsystems as described
in Figure 19.1. Control module is the basic component of the MMI frame-
work that is specialized for each distributed system in a collection of server
components and a collection of client components. Clients and servers
inherit all the mechanisms and features to handle multiple tasks concur-
rently, to synchronize their activities and to communicate through the
internet.
The development process of the MMI framework is organized into three
phases that produce three prototypes.
Prototype 1: Synchronous communication
. The components library
enables the development of multi-task control modules and allows them to
interoperate using Java RMI. The test application exemplifies synchronous
and deferred-synchronous communication between client and server.
■