D. Radoiu, O. Tamas, Universitatea "Petru Maior" din Tg.Mures
Abstract
The whiteboard we present is part of an Interactive Meeting System (which will embed sound and video capabilities).
The whiteboard is a means of sharing notes, images, drawings and chat over the Internet as an effective support tool for distance learning and communication between science people.
Our paper presents the design principles, the functionality and the capabilities of this tool, to further extend the scientific data dynamic front-end offered by browsers like Netscape and Internet Explorer in education and science.
The point of this article is that it's possibile, with a limited effort, to set up a complete virtual environment, which integrates hypermedia browsers with sincron communication tools and/or scientific visualization programs.
Keywords: hypermedia, Java, whiteboard, syncron communication, shared workspace
1. Introduction
Until recently, hypermedia systems, and networked information systems in general, have not supported scientific data as a basic information type. In the last years, scientific data has been included within a hypermedia document in the same manner as images, audio, and video sequences. These media have become suitable both for scientific and educational applications.
Our work explores the capabilities of an auxiliary tool to further extend the scientific data dynamic front-end offered by browsers like Netscape and Internet Explorer in education.
The paper presents a whiteboard as a support tool for distance learning.
2. Whiteboard characteristics
A whiteboard is software for a meeting . The one we present is part of an Interactive Meeting System (which will embed sound and video capabilities).
The whiteboard we present is a means of sharing notes, images, drawings and chat over the Internet as an effective support tool for distance learning and communication between science people.
Here are some characteristics of this application:
A document oriented application allows the user to save his work anytime he wants. The user also has to have the posibility to continue his work when he wants to restore the saved "document".
In our application a document is a file that contains your saved work. At this moment only one document can be opened at one time, unlike some other applications, like text editors. This part of the application is still under development. When this part is implemented every user will be able to use the application for slide shows. A user will have the possibility to create the slides he wants to present, whitout connecting to the server, and save them, on the local file system. When the user connects to the server, he just loads the "slides" and shows them, in the order he wants.
Two "tools" are at hand for data introduction. The mouse can be used for drawing objects on the whiteboard area or typing text in the chat area or whiteboard area using the keyboard. It would be better if you could connect a "pen" to your computer instead of the mouse. Using this so called pen you'll find it easyer to draw objects.
This application is designed to be used on the Internet. We can find a lot of multiuser applications on the Internet, one example could be the IRC (Internet Relay Chat) where a lot of users from every part of the Earth are connected to a server and they can communicate with each other. The WhiteBoard application is based on this multiuser concept. A server is running on a computer connected to the Internet, and users can connect to this server anytime they want and communicate with each other through the whiteboard area or the chat area of the client interface.
There are two classes in this program: the main class, StartServ, is a server that accepts connections from clients and assigns them to new connection handler objects. The Handler class actually does the work of listening for messages and broadcasting them to all connected clients. One thread (the main thread) handles new connections, and there is a thread (the Handler class) for each client.
Every new user (in our case Whiteboard user ) will connect to the StartServ; this StartServ will hand the connection to a new instance of the Handler class that will receive messages from the new user (client). Within the Handler class, a list of the current handlers is maintained; the broadcast() method uses this list to transmit a message to all connected WhiteBoard Clients.
Class StartServ
This class is concerned with accepting connections from clients and launching handler threads to process them.
class StartServ
{
// public StartServ() throws IOException ...
// public static void main(String args[]) ...
}
This class is a simple standalone application. It includes a constructor that performs all the work for the class, and a main() method that starts it.
int portnr = 5500;
public StartServ() throws IOException
{
try
{
ServerSocket serv=new ServerSocket(portnr);
while(true)
{
Socket s=serv.accept();
System.out.println("Accepted from client: "+s.getInetAddress());
Handler c=new Handler(s);
c.start();
}
}catch(IOException e){}
}
This constructor, which performs all of the work of the server, is very simple. We create a ServerSocket and then wait in a loop accepting clients with the accept() method of ServerSocket. For each connection, we create a new instance of the Handler class, passing the new Socket as a parameter. After we have created this handler, we start it with its start() method. This starts a new thread to handle the connection. After this thread starts, the server waits for other connections.
public static void main(String args[])
{
new StartServ();
}
Class Handler
This class is concerned with handling individual connections. We must receive messages from the client and re-send these to all other connections. We maintain a list of the connections in a static Vector.
class Handler extends Thread
{
// public Handler(Socket nc) throws IOException ...
// public void run() ...
// protected static void broadcast(Obiecte ob) ...
}
We extend the Thread class to allow a separate thread to process the associated client. The constructor accepts a Socket to which we attach; the run() method, called by the new thread, performs the actual client processing.
ObjectInputStream in;
ObjectOutputStream ou;
Socket c;
public Handler(Socket nc) throws IOException
{
try{
DataOutputStream dops= new DataOutputStream(nc.getOutputStream());
ou = new ObjectOutputStream(dops);
DataInputStream dips=new DataInputStream(nc.getInputStream());
in = new ObjectInputStream(dips);
}catch(IOException ectp){}
c=nc;
}
The constructor keeps a reference to the client's socket and opens an input and an output stream.
protected static Vector list=new Vector();
public void run()
{
try
{
list.addElement(this);
while(true)
{
try{
obi=(Obiecte) in.readObject();
}catch(ClassNotFoundException cnfe){
System.out.println("class not found!");
}
broadcast(obi);
}
}catch(IOException e){System.out.println("IOException...");}
finally
{
list.removeElement(this);
System.out.println("User exiting...");
try
{
c.close();
}catch(IOException e){}
}
}
The run() method is where our thread enters. First we add our thread to the Vector of Handlers list. The list Vector keeps a list of all of the current handlers. It is a static variable and so there is one instance of the Vector for the whole Handler class and all of its instances. Thus, all Handlers can access the list of current connections.
It is very important for us to remove ourselves from this list afterwards if our connection fails; otherwise,all other handlers will try to write to us when they broadcast information. This type of situation, where it is imperative that an action take place upon completion of a section of code, is a prime use of the try ... finally construct; we therefore perform all of our work within a try ... catch ... finally construct.
The body of this method receives messages from a client and rebroadcasts them to all other clients using the broadcast() method. When the loop exits, whether because of an exception reading from the client or because this thread is stopped, the final clause is guaranteed to be executed. In this clause, we remove our thread from the list of handlers and close the socket.
protected static void broadcast(Obiecte ob)
{
synchronized(list)
{
Enumeration en=list.elements();
while(en.hasMoreElements())
{
Handler eh=(Handler) en.nextElement();
try
{
synchronized(eh.ou)
{
eh.ou.writeObject(ob);
System.out.println("Object sent...");
}
eh.ou.flush();
}catch(IOException e)
{
eh.stop();
}
}
}
}
This method broadcasts a message to all clients. We first synchronize the list of handlers. We don't want people joining or leaving while we are looping, in case we try to broadcast to someone who no longer exists; this forces the clients to wait until we have finished synchronizing. If the server must handle particularly heavy loads, then we might provide more fine-grained synchronization.
Within this synchronized block we get an Enumeration of the current handlers. The Enumeration class provides a convenient way to iterate through all of the elements of a Vector. Our loop simply writes the message to every element of the Enumeration. Note that if an exception occurs while writing to a WhiteBoard client, then we call the client's stop() method; this stops the client's thread and therefore performs the appropriate cleanup, including removing the client from handlers.
The Whiteboard application could be used as an applet that is included in an HTML page. This can be done by including a little applet, that contains only one button, which will bring up the GUI window that includes the whiteboard application. If the whiteboard is used as an applet, there will be some limitations. The user would not be able to save the created document, or could not load from the local file system. Considering these limitations this possibility is important for those users who don't have Java on their machines but have a Java enabled browser, and they consider that it's easier to use the application in this way.
Scalability is related to the possibility to further extending the capabilities of the whiteboard as an auxiliary tool for a scientific data dynamic front-end.
Our whiteboard is a Java application which uses syncron communication.
The whiteboard can be made more useful by combining it with a chat application. In this configuration the whiteboard is able to help an instructor to communicate with the students in a complex way. He can type text (in the chat or in the drawing area), he can draw something in the drawing area. The user is assisted by drawing tools, writing tools or object insertion facility. He is also able to paste image and text from other application, or to insert images from a file, that are located on the local filesystem (provided the application is running as a standalone application) or at a specified location on the net. If this whiteboard is used to teach science, the instructor can write a formulae assisted by a formula tool which provides a library of science symbols.
Including this powerful tool in an HTML page is very simple. It can be contained in a small applet containing a button, that brings up a GUI window when somebody clicks on it. In this way the student is able to use the whiteboard and navigate in the browser.
A look behind the application helps us understand how this syncron communication works. The application is based on client-server arhitecture. We have a client application, which is included in the HTML page and a server running on a computer connected to the net. Once the server is started it connects to a specified port on the local computer and starts "listening" to that port. If a connection request apears on this port, then the server tries to accept the connection and register the new client in some way. After this, new input and output streams are created. The server is multithreaded, which means that it accepts multiple connections; there is no reason to create a single threaded server in this case because the server has to connect to more than one client. To understand how this server works, see the graphical representation below:

Figure 1 The whiteboard architecture
If something is sent from Client 1 to the server, it will be sent back to all the clients connected at that moment. You can see on the graphical representation the way the server is connected to the clients and how it sends back the data received from one client.
The whole whiteboard application is based on this client-server architecture, both the whiteboard part and the chat part. The whiteboard sends objects to the server and the chat sends lines of text. To send objects through a stream one can use object serialization.
Serialization is a concept that enables you to store and retrieve objects, as well as to send objects to remote applications. Without serialization only simple types such as int and char would be allowed in parameter signatures, and complex objects would be limited in what they could do. When an object is serialized it is converted to a stream of characters. Those characters can be sent to an application situated in other location. Parameters passed in remote objects are automatically translated into serialized representation. Once an object is serialized, it can be safely sent via a communication method to a remote location.
3. Early evaluation
There was neither the time nor the expertise available to construct a consistent theory addressing the usability of a whiteboard. The reason is that the possibility to construct an entire virtual educational environment (VEE) around the communication technology has been poorly addressed in a systematic manner.
The user interface and the functionality have been tested through heuristic methods. Simple operations such as drawing, and inserting objects could be easily performed via the toolbar.
Object manipulation in the whiteboard window is still limited.
Multi-paged presentation is not available at this stage.
References
D. Dumitru, O. Tomas
Petru Maior University of Tirgu Mures
Computer Science Department
Str. Nicolae Iorga 1
4300 Tirgu Mures
tel: 00-40-65-215899
fax: 00-40-65-162275