New York
University
Computer
Science Department
Courant
Institute of Mathematical Sciences
Session 3:
CORBA-Based MOO Framework Installation Instructions
Course Title: XML for Java Developers Course
Number: g22.3033-002
Instructor: Jean-Claude Franchitti Session: 3
1.
Extract
CORBA-MOO.zip using winzip.
2.
After
extraction, a directory named CORBA-MOO is created, which includes subdirectory
ChatClient and ChatServer.
3.
Open
the file “vb.bat” in corba directory, change the classpath for Visibroker and
current directory.
4.
Environment
Insprise Visibroker 4.5 installed
5.
Test
> vb.bat
> osagent
> vbj ChatServer.Server
Open another DOS prompt
> vbj ChatClient prof
Open another DOS prompt
> vbj ChatClient student
1.
The
chat room is implemented with CORBA, the client side is a Java application
instead of Java applet.
2.
IDL
ChatServer.idl describes the interfaces to the
server.
connect: called by client when the chat user
connects to the server.
disconnect:
called by client when the chat user disconnects to the
server.
sendMessage: called by server when new user
(dis)connect, or by client
when some user send a message to others.
sendLocation: called by client when some user move his/her
position in
the graph.
ChatClient.idl describes the interfaces to the
client.
updateMessage: called by server when new messages arrives
updateLocation: called by server when
location changed for some user
3.
Communication
Message is transferred via a string or integer,
while complicated message is encoded in string using special separator “@”
instead of using object.
4.
Client
implementation
Each client has a user list to keep track of all the
online users. Each user has a record to record his/her info: like name,
location, etc.
The graph of chat room is updated at some time
interval, timer is used to decide if a message should be showed in graph.
5.
Server
implementation
Server has a user list to keep track of all the
online users.