[ < Home Page]

Virtual Meeting Product Line

C. Nebut (cnebut@irisa.fr)
F. Fleurey (franck.fleurey@ifrance.com)


1. Introduction

2. Products and Design

3. Implementation

4. Testing tools

5. Execution trace tools

6. Download


1. Introduction

This package contains an implementation of the virtual meeting system designed with variants to allow us to build different products using the same design (see the Products and Design section). The entire system is made of about 80 classes. The implementation is not finished yet so some fonctionalities are not available for the moment (such as meetings auto start, see the Implementation section for detailed informations). But the whole system can be compiled, executed and tested without those features. There is not yet any network interface but for testing purpose a command line server can be started and tested (see the testing tools section). For diagnostic another tool is available to compute execution trace of test cases, see the Execution trace tools section.
You can download the archive containing all material.

2. Products and Design

The design of this virtual meeting server had been done including variants :
Figure 1 - Application design

Figure 1 - Global application design


Figure 1 shows the global class diagram of the application, of course not all classes are on this diagram because it wouldn't be very clear... The Server class is the core of the system. It has an AvailableMeetings object to represents  available kinds of meetings in the current product, it implements the (1) variant. The (2) variant is implemented by a decorator pattern, each kind of meeting can be decorate by the LimitedMeeting decoration to fix the maximum number of users that can enter the meeting. The singleton ServerMessage is a table of languages, for each language it contains translated server messages, it also contains, as shown on Figure 1, the default language of the server. So the ServerMessage implements partially variants (3) (4) because in case of a multilanguage server a ChooseLanguage must be added to allow users to choose their language (see Figure 2 to see how the whole command pattern ha been implemented). For the last variant (5) it is implemented by an instance of the Translator class or not. The entire system is initialised by a Factory pattern shown of Figure 7.
Figure 2 - Commands implementation

Figure 2 - Commands implementation

The main behaviour of the server is to wait for command and execute them. It is done by a Command design pattern, Figure 2 show the entire set of command the server can have. The ChooeLanguage command can be or not in the server set of command to implement "multilanguages variants".
The server also contains connected users. Each of thos users has its own state :
REMARK : The user currentMeeting is null if the user in in the registred state.
Figure 3 - User state diagram

Figure 3 - User state diagram

Figure 3 shows the state diagram of a user, this diagram is implemented as a State design pattern. Figure 4 shows the corresponding class diagram. All state classes are implemented as state-less classes so we can use the singleton pattern for those classes.
Figure 4 - User state class diagram

Figure 4 - User state class diagram

The server also contains meetings (that have been created by the Create command) and each meeting has its own meeting state :
Figure 5 shows the state diagram associated to every meetings. This diagram is also implemented using the State design pattern (Class diagram is presented on Figure 6).
Figure 5 - Meeting State Diagram

Figure 5 - Meeting state diagram


Figure 6 - Meeting State Class Diagram

Figure 6 - Meeting state class diagram

The las part of the system has no appear on any diagram yet : it is the Factory that builds products including different values of variants. In the current version of the virtual meeting product line we choosen to support 3 products :
  • Demo : Only standard meetings limited to 5 users are available, the default language is english and there is no multilanguages features at all (no translator, no ChooseLanguage command...).
  • Personal : All kinds of meetings are available but limited to 5 users. The server can send its message in English or in French but there is no translator for user messages.
  • Enterprise : All kinds of meetings are available without limitation, all languages are available, and a translator can translate user messages.
Those features had been implemented using the Factory pattern. Figure 7 shows the class diagram of this implementation and the main dependencies of the factory.
Figure 7 - Product Factory Implementation

Figure 7 - Products factory implementation


REMARK : All figures were done using poseidon. The poseidon project is available in the package in the "doc" sub-directory in file "design.zargo".  All figures are also in PDF and PS format in the "doc/figures" sub-directory.

3. Implementation

The implementation of the core system is done but some extra features are missing. You can browse the system API documentation to have a detailled description of each class of the system. The system is organized in 3 packages :
  • MtgServer : Contains the Virtual meetings core system. All that has been described in Section 2 except the factory is in this package. Mabe in the future this package should be splited in sub-packages.
  • Testing : this packages contaings a executable test server and the factory describer in Section 2 (Figure 7). This package allows us to test the Virtual Meeting system.
  • Tracer : Tracer is a trace tool to compute execution trace of test cases. (see Section 5)
At the moment some features are not implemented :
  • All Date/Time features.
  • Network interface.
  • Server Messages tables (not all messages are translated).
  • Translator (for the moment it just add a comment at the end of the message to translate).
  • Contracts.

Specifictions of server commands :

  • CONNECT : 
    • CONNECT [user_name]
    • [user_name] : the name of the new user
    • This command should be used by a new user (an unsued channel obviously) and it will register the user on the server. The [user_name] parameter must be different for each users.
  • DISCONNECT :
    • DISCONNECT
    • Disconnect the user that execute the command. In the current implementation it does nothing so that users are not allow to leave the server.
  • CREATE :
    • CREATE [mtg_type] [mtg_name]
    • [mtg_type] : the kind of meeting to create (standard/private/democratic)
    • [mtg_name] : the name of the new meeting
    • Create a new meeting and plan it. The user who performed the create operation is the owner of the created meeting.
  • OPEN :
    • OPEN [mtg_name]
    • [mtg_name] : The name of the meeting to open.
    • This action can only be performed by the meeting owner or if there is one the meeting moderator. The meeting to open should be in the planned state. 
  • CLOSE :
    • CLOSE [mtg_name]
    • [mtg_name] : The name of the meeting to close
    • This action can only be performed by the meeting owner or if there is one the meeting moderator. The meeting to close should be in the Open or in the ThereIsASpeaker state.
  • SET :
    • SET [mtg_name] [PARAMETER] [new_value]
    • [mtg_name] : The name of the meeting.
    • [PARAMETER] The meeting parameter to set (MODERATOR, ACCESSLIST, DATE, DURATION, TITLE, AGENDA)
    • [new_value] : The new value of parameter.
    • This action can only be performed by the meeting owner or if there is one the meeting moderator.
  • GET :
    • GET [mtg_name] [PARAMETER]
    • [mtg_name] : The name of the meeting.
    • [PARAMETER] The meeting parameter to get (MODERATOR, ACCESSLIST, DATE, DURATION, TITLE, TYPE, AGENDA)
    • Can be performed by any user connected to the server.
  • LIST :
    • LIST
    • Get the list of meetings currently created on the server
  • ENTER :
    • ENTER [mtg_name]
    • [mtg_name] : The name of the meeting to join.
    • The user must be in the registered state to enter a meeting.
  • LEAVE :
    • LEAVE
    • Leave the user current meeting.
  • ASK :
    • ASK
    • Ask to speak in the current meeting. The user must be in a moderated meeting since in democratic meeting there is no need to ask to speak. the user's current meeting must be open.
  • HANDOVER :
    • HANDOVER [usr_name]
    • [usr_name] : The name of the user to allow speaking.
    • This operation can only performed in a moderated meeting by the moderator, who must be in the meeting. The meeting mut be in the open state. The user must be in the meeting too and in the WaitingToSpeak state, it will allow the user to speak in the meeting.
  • OVER : 
    • OVER
    • This operation can only performed in a moderated meeting by the moderator, who must be in the meeting. The meeting must be in the ThereIsASpeaker state.
  • CHOOSELANGUAGE :
    • CHOOSELANGUAGE [new_language]
    • [new_language] : the new language (English, French, Spanish)
    • The server must support mulilanguages features.

4. Testing tools

The entry point of the test program is in class Testing.TestServerMain.
This command allow us to start any product (Demo, Personal, Enterprise) and to test the server by sending commands. The first mode is an interactive mode, the server reads commands on the standard input and writes outputs to the standars output. But the program can also take commands from a file and write outputs to another file.
The test program includes a few extra features to allow diagnostic and debugging :
  • The DUMP command will send to the output the state of every users and meetings.
  • The EXIT command will stop the server (every testcase input file should have exit on their las line).
  • The ability to write 1 line comments. Any line starting by # will be interpreted as a comment and the comment will be written to the server output. this is usefull to document test cases and to check that outputs are corrects.
The test server can be launch by executing the Testing.TestServerMain class with correct arguments. to execute the server move into the distribution "bin" directory.
java Testing.TestServerMain [Product] [in_file] [out_file]
  • [Product] : the server product to build (Demo, Personal or Enterprise).
  • [in_file] : optional input file.
  • [out_file]: optional output file.
REMARK 1: To be abe to execute the test server you must have a correct java environnement compatible with the sun JDK v 1.4.
REMARK 2: For details view the README file in the root of the project's archive.

The syntax to send commands to the server is the folowing :
[channel] [COMMAND] [ARGS]
Here is an exemple of input file (You can find more exemples in the "tests" sub-directory of the project) :
# 3 users connecting
1 CONNECT buffy
2 CONNECT tara
3 CONNECT willow
# the user 1 creates a standard meeting
1 CREATE standard magicbox
# user 1 sets Title, Agenda and Moderator for the created meeting
1 SET magicbox TITLE vampires and deamons
1 SET magicbox AGENDA Reserches on paranormal activities
1 SET magicbox MODERATOR tara
# Opening meeting and all users entering
2 OPEN magicbox
1 ENTER magicbox
2 ENTER magicbox
3 ENTER magicbox
# check if all users are InMeeting and meeting is open
DUMP
# test speaking features
1 ASK
2 HANDOVER buffy
1 SPEAK Hi everyone !
3 ASK
1 SPEAK Welcome to the magic box !
2 OVER
1 ASK
2 HANDOVER willow
3 SPEAK guys! what are you doing ?
2 OVER
2 ASK
# check that 1 and 2 are waiting to speak and meeting open
DUMP
2 HANDOVER buffy
1 SPEAK hey! I can speak again !
2 OVER
2 HANDOVER tara
2 SPEAK Moderator or not I can also speak !
1 LEAVE
2 SPEAK where is buffy
3 ASK
# check that 3 is waiting, 2 is speaking.
DUMP
2 OVER
2 HANDOVER willow
3 SPEAK Aparently she left...
2 OVER
3 LEAVE
2 LEAVE
2 CLOSE magicbox
# check all users are Registred and meeting is closed
DUMP
EXIT

And here is the corresponding output by running the server :
Virtual meeting server starting...
 -> EXIT to quit server.
 -> DUMP to view server internal state.
Server is ready !
COMMENT :  3 users connecting
COMMENT :  the user 1 creates a standard meeting
COMMENT :  user 1 sets Title, Agenda and Moderator for the created meeting
COMMENT :  Opening meeting and all users entering
COMMENT :  check if all users are InMeeting and meeting is open
Virtual Meeting Server dump :
USERS :
  3 willow English MtgServer.InMeeting magicbox
  2 tara English MtgServer.InMeeting magicbox
  1 buffy English MtgServer.InMeeting magicbox
MEETINGS :
  magicbox MtgServer.Opened
--------------------------------
COMMENT :  test speaking features
2| Server:magicbox -> buffyAskingToSpeak
3| magicbox:buffy -> Hi everyone !
2| magicbox:buffy -> Hi everyone !
1| magicbox:buffy -> Hi everyone !
2| Server:magicbox -> willowAskingToSpeak
3| magicbox:buffy -> Welcome to the magic box !
2| magicbox:buffy -> Welcome to the magic box !
1| magicbox:buffy -> Welcome to the magic box !
2| Server:magicbox -> buffyAskingToSpeak
3| magicbox:willow -> guys! what are you doing ?
2| magicbox:willow -> guys! what are you doing ?
1| magicbox:willow -> guys! what are you doing ?
2| Server:magicbox -> taraAskingToSpeak
COMMENT :  check that 1 and 2 are waiting to speak and meeting open
Virtual Meeting Server dump :
USERS :
  3 willow English MtgServer.InMeeting magicbox
  2 tara English MtgServer.WaitingToSpeak magicbox
  1 buffy English MtgServer.WaitingToSpeak magicbox
MEETINGS :
  magicbox MtgServer.Opened
--------------------------------
3| magicbox:buffy -> hey! I can speak again !
2| magicbox:buffy -> hey! I can speak again !
1| magicbox:buffy -> hey! I can speak again !
3| magicbox:tara -> Moderator or not I can also speak !
2| magicbox:tara -> Moderator or not I can also speak !
1| magicbox:tara -> Moderator or not I can also speak !
3| magicbox:tara -> where is buffy
2| magicbox:tara -> where is buffy
2| Server:magicbox -> willowAskingToSpeak
COMMENT :  check that 3 is waiting, 2 is speaking.
Virtual Meeting Server dump :
USERS :
  3 willow English MtgServer.WaitingToSpeak magicbox
  2 tara English MtgServer.Speaking magicbox
  1 buffy English MtgServer.Registered
MEETINGS :
  magicbox MtgServer.ThereIsASpeaker
--------------------------------
3| magicbox:willow -> Aparently she left...
2| magicbox:willow -> Aparently she left...
COMMENT :  check all users are Registred and meeting is closed
Virtual Meeting Server dump :
USERS :
  3 willow English MtgServer.Registered
  2 tara English MtgServer.Registered
  1 buffy English MtgServer.Registered
MEETINGS :
  magicbox MtgServer.Closed
--------------------------------

Virtual meeting test server outputs are quite simples. Every times the server sends a message, the first fiels is the channel that the server used to send the message, then the server writes the message origin and last the message itself :
[channel] | [Origin] -> Message
The comments are preceded by "COMMENT" and dumps are quite clear no ?
The "tests" sub-directory contains a set of test cases I had use to debug the application.

5. Execution trace tools

This testing distribution of the virtual meeting server also includes an execution trace tool. It is able to log every method calls and the number of instruction executed beteen each call. It also give every source file that have been executed and the lines of code that have been executed. The entry point for this tracing tool is in the class Testing.TraceServerMain.

java Testing.TraceServerMain [trace_file] [Product] [in_file] [out_file]
  • [trace_file]: the file to write trace into.
  • [Product]   : the server product to build (Demo, Personal or Enterprise).
  • [in_file]   : input file of the server.
  • [out_file]  : output file of the server.

Here is an example of trace file. The first section reports every methos calls (this part is generally very long even if the test case it quite short). The second part reports for every source files the lines numbers of executed instructions. And the last part shows contract repartition along the execution path. (it assumes that every method has both pre and post conditions).

**** Method call trace ****

CALL Testing.DummyServer.run
| CALL Testing.DummyInterface.sendMessage
| CALL Testing.DummyInterface.sendMessage
| CALL Testing.DummyInterface.sendMessage
| CALL Testing.DummyInterface.sendMessage
| CALL Testing.DummyInterface.getNextCommand
| CALL MtgServer.Server.exec
| | CALL MtgServer.Connect.run
| | | CALL MtgServer.Server.getUser
| | | CALL MtgServer.Server.getUserByName
| | | CALL MtgServer.Server.createAndAddUser
| | | | CALL MtgServer.User.<init>
| | | | | CALL MtgServer.ServerMessages.getInstance
| | | | | CALL MtgServer.ServerMessages.getDefaultLanguage
| | | | CALL MtgServer.User.connect
| | | | | CALL MtgServer.Registered.<clinit>
| | | | | CALL MtgServer.Registered.getInstance
| | | | | | CALL MtgServer.Registered.<init>
| | | | | | | CALL MtgServer.UserState.<init>
| | | | | CALL MtgServer.User.setCurrentState
| CALL Testing.DummyInterface.getNextCommand
        [...]
| CALL Testing.DummyInterface.sendMessage
| CALL Testing.DummyInterface.getNextCommand
*************************************************************************************

**** Line of code covered ****

languages.java : 28.
DummyInterface.java : 69, 70, 71, 72, 77.
Command.java : 44, 46, 49, 52, 53.
LanguageMsg.java : 41, 42, 43.
User.java : 72, 73, 74, 75, 76, 123, 161, 162, 165, 166, 167, 168, 169.
Connect.java : 23, 28, 30, 35, 38, 44, 45.
Message.java : 66, 67, 68, 69, 70.
DummyServer.java : 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46.
UserState.java : 6.
Server.java : 142, 145, 146, 148, 149, 150, 156, 158, 164, 238, 239, 240,244, 255, 257,
259, 261, 265, 266, 267, 269, 270, 271, 273, 274, 276, 280, 281.
ServerMessages.java : 80, 81.
Registered.java : 18, 24.
*************************************************************************************


**** Contract repartition ****

**-*-----*-*-----*-*-----*-*-----*--*-*------*---------*-*-*-----*----*--*-*----*--*-*-
*--*--*-***-*-*-*-*--*-*--*-*--*-*-*--*-*------*---------*-*-*-----*-----*-*---*--*-*--
--*--*-*-*--*--*-*--*-*--*-*--*-*-*--*-*------*---------*-*-*-----*-----*-*----*-*---*-
-*-*----*--*-*-*--*--*-*--*-*--*-*--*-*-*--*-*------*---------*-*-*-----*-----*-*----*-
*----*-*---*--*-*----*--*-*-*--*--*-*--*-*--*-*--*-*-*--*-*------*---------*-*-*-----*-
----*-*----*-*----*-*----*-*-*--*--*--*--*-*-*-*--*-*---*-*-*-*--*--*--*-*-*-*--*---*-*
-*-*-----*-*-*-*-*-*-*-----*-*-*-*-*--*-*------*---------*-*-*--*--*--*---*-*-*-*--*-*-
--*-*-*-*--*--*---*-*-*-*--*---*-*-*-*-----*-*-*-*-*-*-*-----*-*-*-*-*--*-*---*-----*-*
--*--*-*----*---*-*--*--*-*----*---*-*--*--*-*----*---*-*--*--*-*----*-------*-*-----*-
-*-*---*

  Contracts on execution path : 250
     Length of execution path : 540.0
Contracts distribution indice : 0.5216594
*************************************************************************************

6. Downloading

You can download the whole package, including :
  • Desing poseidon project.
  • Source files.
  • Documentation.
  • Compiled classes.
  • Testing and tracing tools.
  • A small set of test cases.
[Download (536 ko)]