Next: TicTacToe - Two party
Up: The Experiment
Previous: The Experiment
In this example, a user informs a set of people that it is time to go for lunch.
The data flow is broadcast (see Figure 2a).
The example uses two interfaces (ILunchGroup and ILunchGUI) and
thus two components implementing the interfaces.
The implementation strategies are described below:
- NetPebbles:
- In this approach, the script first instantiates
a component that implements the ILunchGroup interface, and then
by invoking a method on the component it retrieves a list of user
and workstation names for a lunch group. The component is probably
invoked on a database server machine where information about administrative
or informal group lists are maintained. Next, for all users in the
group, the script migrates to the user's workstation, creates
a component implementing the ILunchGUI interface and displays
the ``Lunch Time'' message.
- Java/RMI:
- For the RMI version, it is required that all machines
in the lunch group run ``Impl'' servers corresponding to the component
implementing the ILunchGUI interface. These servers export interfaces
that can be called from a client. For this implementation, the client
(the machine of the user who set out to inform the group about lunch)
iterates through the group, invoking the display method remotely on
the ``Impl'' servers running at the user's workstations.
- Aglets:
- The application logic is the same as for Java/RMI,
except that the programmer writes code to handle migration explicitly.
At each visited workstation, the agent creates an instance of the
component implementing the ILunchGUI interface and displays the message.
Ajay Mohindra
Mon Mar 16 14:45:01 EST 1998