• No results found

Example real-time online conferencing application

Chapter 8 Getting-to-Know: An experimental Notification Server

8.5 Example real-time online conferencing application

The previous sections have shown how the Event Manager and the Notification Manager components have been implemented on the GtK framework. The last component on the distributed layered infrastructure (starting from the base in figure 8.1) is the Application. The Application does not execute as a stand-alone component. It interacts closely with the Notification Manager through the Event Manager. This interaction is essential for any purpose-built application to function properly. Also, the Notification Manager needs the relevant information from the Application in order to broadcast information to the users at the right pace and right granularity.

An example real-time online conferencing application has been constructed on the GtK infrastructure (figure 8.5). The application allows users to create conferences on various topics and launch sessions on one or more conferences with several participants simultaneously. The system supports live discussions but also enables late joiners to catch up on any ongoing sessions.

Event Manager

Notification Manager Application

Conference

Manager GtK Notification Server

Figure 8.5 Conferencing exemplar on GtK infrastructure

The Conference Manager interacts with the client objects and the Notification Manager by exchanging events and messages through the Event Manager. Throughout the discussion presented in this chapter, the terms message and event seem to convey the same meaning. However, there is a subtle distinction between them.

receive message

send event receive event

Application

send message

Figure 8.6 Event vs. message

A message is usually directed towards a specific object whereas an event announces the presence of a certain object. An application can be regarded as being in the centre receiving and sending messages and events (figure 8.6). Both events and messages have the same format and they are received through the same mechanism, but they differ in the way they get sent out. Figure 8.7 shows the flow of messages and events between the different components in the example conferencing system.

receive message

send message

Client 1 Client 2 Conference Manager

send event receive

event receive event

send

event receive event

send event send message send message receive message receive message Notification Manager

Messages are events that are sent directly from one object to another and the sender object does not receive a feedback from the receiver object. For example, the client objects send and receive messages directly to and from the Conference Manager.

Events instead only announce the presence of an object and they are mediated through the Notification Manager. For example, client objects register with the GtK notification server by sending an event to the Notification Manager. The latter then responds to the user clients by sending some feedback, such as a welcome note. Similarly, the Conference Manager can send events to the client objects via the Notification Manager, for instance through the ‘tell all’ function. The Notification Manager responds by sending broadcast events to the user clients.

8.6 Summary

This chapter described how the GtK experimental notification server has been implemented over several layers of custom and standard infrastructure. The functionalities of each layer and their implementation details were examined. A distributed asynchronous protocol is used for exchanging messages and events within the GtK infrastructure. The Event Manager allows point-to-point asynchronous messaging between different communication objects in the same or in different address spaces.

The Notification Manager manages the main functions of the GtK notification server. The distributed object layered infrastructure enables the Notification Manager to be aware of every other object. Client objects can either add or remove interests for different objects with GtK. GtK maintains a list of interested clients for specific objects and their recipients. When changes occur to certain objects, GtK broadcasts notification events to the respective recipients.

The way in which GtK has been augmented to provide pace impedance matching was also analysed. Two pace parameters are introduced to control the frequency of updates − the queue length and maximum delay time. The ‘add interest’ and ‘remove interest’ functions were subsequently modified to include each recipient’s frequency of notification. Furthermore, a FIFO queue of outstanding events is maintained for each recipient. The events are flushed and broadcast to the recipients at the relevant time depending on the pace parameters. An alarm process sets and resets the maximum delay time parameter.

Users often interact with different interface objects at a non-uniform pace. A client object can change the frequency which with it wants to be notified by sending a ‘change frequency’ event to GtK together with the updated pace parameters. GtK also modifies the frequency of each recipient for that client object accordingly.

An example real-time Web conferencing application has been constructed on the GtK framework. The exchange of messages and events between the different components of the application were finally considered. The example application is similar to many Web-based chat systems. However, its main purpose is to demonstrate the practicality of the GtK

separable notification server as a pace impedance matcher and this will be dealt with in the next chapter.

Chapter 9 Demonstration through an Exemplar