5. Event flow

This chapter describes flow of events in the system accompanying user actions. The set of actions includes:

5.1. Entering the system

Description:

Logging into the system is the first activity each user has to perform before using the system. Logging will be done on the base of two parameters typed by the user: name and password. System will verify these parameters, grant user specific privileges and enable user to perform other actions.

Events:
  1. User types username and password to Control Application
  2. Demon sends the information to Central Server (user id, user passwd)
  3. Data is verified in the database
  4. Central Server returns user rights to Control Application (user rights)
  5. Central Server returns description of existing sessions (session list)

5.2. Leaving the system

Description:

After finishing his/her work user has to log off from the system. This will remove him/her from all sessions he/she was participating and close all his/her applications

Events:
  1. User selects exit option from Control Application (exit)
  2. Demon sends the information to Central Server (exit)
  3. Central Server updates information about virtual connections
  4. Demon closes all running client applications.

5.3. Launching local application

Description:

This activity will enable a user to launch an application on the local host. The actions performed by user will not be shared with any other users, unless another user will join this session. These messages will be sent to Central Server and logged in the database.

Events:
  1. User chooses application type in Control Application (app type)
  2. Information from Control Application is sent to the demon (app type)
  3. Demon sends the information to the Central Server, information is stored to the database, a session is created (app type)
  4. Central Server generates unique application id and sends it to the Demon (app id)

    Local Application

    5. Demon generates new port number (port number)

    6. Demon launches proper application with number of port (port number)

    Java Applet

    5. Control Application launches Java Applet

    6. Demon generates new communication channel

    7. Applet connects Local Demon

5.4. Joining a session with new application

Description:

This activity allows a user to launch a new application and connect it to an existing session. Control Application on local host displays all sessions, the user is privilaged to join.

Events:
  1. User chooses the session from Control Application (session id)
  2. Information is sent to Central server through the Demon (session id)
  3. Master of this session is notified (user id, session id)
  4. If master agrees, the application id is added to the session list
  5. ??? Demon on initiator's machine is notified (accept)
  6. Demon launches and connects the application -> goto: 5.3. Launching local application

5.5. Joining a session with existing application

Description:

This activity allows a user to connect already running application to an existing session. Control Application on local host displays all sessions, the user is privilaged to join.

Events:
  1. User selects session from the list of session he/she is allowed to join (session id)
  2. Information is sent to Central server through the Demon (session id)
  3. Database checks if master for this session exists, if so he/she is notified (user id)
  4. If master agrees, the application id is added to the session user list
  5. Demon on initiator's machine is notified (accept)

5.6. Launching remote application

Description:

This action will launch application of a given type on the host of another user currently logged in the system. We assume that before launching application on remote host user will have application of this type running locally. Before launching application remote user must confirm it. After remote application is started it joins the session with the local application on the initiator's host. Initiator has to be master of the given session to perform this operation.

Events:
  1. User chooses remote launching option in Control Application and remote user id (session id, user id)
  2. Remote user is notified with a message that application is about to start, he must accept it (app type, master user id)
  3. Server generates new application id and sends it to the remote user demon (app id)
  4. New virtual connection is created (app id is added to the session list) and message is sent to remote user's demon (app id)
  5. Remote user demon generates port number and launches application (port number)

5.7. Switching to master mode

Description:

Changing to master mode may be invoked by a user with proper privilages for an application running in client mode. The application becomes then master of the session and starts transmitting events.

Events:
  1. User chooses change to master for a given session in Control Application (session id)
  2. Information goes to the Demon (session id)
  3. Demon sends message to Central Server (session id)
  4. Central Server sends information to current session master (user id)
  5. When master agrees for change, server sends info to all users (session id, user id)
  6. All other participants are notified (user id, session id)
  7. Information about master in the database is updated (user id, session id)