Global Positioning System Reference
In-Depth Information
Chapter 10
Separating the RO Client
and the ROApp Server
10.1
Introduction
As an application grows to a certain critical size, it becomes cumbersome
to remember all details in various contexts. A good development team is
characterized by a good distribution of know-how and responsibility. The
same principle holds for good software. A distributed application can help
to decouple semantic modules.
Using Java remote method invocation (RMI), the real objects will be
engineered into client programs, which can be launched independently on
one machine and connect to various real-world server scenarios in the net-
work. The
roaf.book.rmi
package is a minimum implementation to run
MovingObjects
on two JVMs. It serves to develop a terminology in the
context of ROs and ROApps and abstract technical details.
10.2
Observing Remote Objects
In Part III, we introduced two simple applications to observe real objects.
The
MovingObjects
and
Navigator
applications basically share the same de-
sign. In one scenario, the ROs represent motorcycles and replay a recorded
trace, while the navigable objects have a choice of paths.
The external
observer can not really discern a difference.
Both applications can be logically subdivided into three parts,
or
Thread
s:
1.
MapViewer
for visual observation ! Swing
Thread
;
2.
Sampler
as a receiver of the object's GPS data ! server
Thread
;
3. many
movingObjects
of type
RealObject
! client
Thread
.
133
Search WWH ::
Custom Search