CS685 Group Project - Software Specification

Author: Travis Emmitt
Date: 16-DEC-1998 links fixed 21-JAN-2000
Version: 3.1

Contents:

System Overview

Source Code

Executable Applets
(might not work from browser)

Other Files

Main Modules Base and Helper Classes

System Overview

The system consists of three main subsystems: a Server, a Client, and a Demon. Each is an executable Java stand-alone application or Applet, further subdivided into a individual modules.

A high level decomposition of the system into subsystems and subsystems into modules is depicted below.



System Architecture

Our system is broken into modules and structured as in the diagram below. The vertical and horizontal bars represent interfaces.

                   USER           <-- modular developer or FR manager
                    |
              APPLET VIEWER       <-- netscape, appletviewer, etc.
                    |
. . . . . . . . . . | . . . . . . . . . . . . . . . . . . . . . . . . . .
                    |
               ClientApplet
                    |
                ClientGUI
CLIENT              |
(multiple)     ClientEngine
                    |
                ClientRMI
                    |
              ClientRMIIface
                    |
. . . . . . . . . . | . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
                    |                               .
                    |                               .
           ServerRMItoClientIface                   .---DemonRMIIface
                    |                               /         |
                ServerRMI---ServerRMItoDemonIface---.      DemonRMI
SERVER              |                               .         |          MONITOR
(single)       ServerThread                         .    DemonEngine     (single)
                    |                               .         |
               ServerEngine                         .      DemonGUI
                    |                               .         |
                  Server                            .    DemonApplet
                    |                               .         |
. . . . . . . . . . | . . . . . . . . . . . . . . . . . . . . | . . . . . . . . .
                    |                                         |
                 OS SHELL                               APPLET VIEWER
                                                              |
                                                            USER

We also have a "module" of base classes that are used in representing the fundamental data structures in our project. These include Node, Module, Depend, and Map.



System Operation

Our Version 1 prototype follows the following basic algorithm:

  1. network init (clients say hi to the server)
  2. server --> reads from file
  3. server --> send map to clients
  4. server --> wait for "Done" from all clients
  5. client --> display map
  6. client --> accept changes (unstabilize nodes, "Done")
  7. client --> send changes to server (will be a single module)
  8. server --> update response list each time a client sends changes
  9. server --> when all clients have sent changes back (all are "Done")...
  10. server --> merge changes from clients
  11. server --> do the following until entire map is stable:
  12. server --> send map to client
  13. client --> display map
  14. server --> update map
  15. GOTO step 11
  16. server --> write file
  17. GOTO step 2


Here is a more detailed, pseudo-code version: An asterisk (*) means we don't have to implement it in the prototype; these lines are in here as placeholders.

        Server          Client
        ------          ------
SYNC    ServerEngine.Notify ("waiting for clients to connect...")

        while (ServerRMI.WaitForConnect()) {
                        ClientGUI.Notify ("connecting to server...")
                        ClientRMI.Connect()
        }

BEGIN   File.ReadMap()
        ServerRMI.SendMap()
        ServerEngine.DisplayResponseList() <-- starts off empty

        while (ServerRMI.WaitForChanges()) {

                        ClientRMI.ReceiveMap()
                        ClientGUI.DisplayMap()

                        while (ClientGUI.GetEvent() != "Done")) {
                          Map.DestabilizeNode()
                          ClientGUI.DisplayMap()     <-- update
                        }

                        ClientGUI.Notify ("waiting for server...")
                        ClientGUI.Freeze()
                        ClientRMI.SendChanges()

          ServerRMI.ReceiveChanges()
          ServerEngine.DisplayResponseList()  <-- no longer empty
        }

        Map.MergeChanges()

        while (true) {
          ServerRMI.SendMap()

                        ClientRMI.ReceiveMap()
                        ClientGUI.DisplayMap()  <-- we're still "frozen"

                        if (Map.IsFinal()) {
                          ClientGUI.Display ("You Can Edit Now")
                          ClientGUI.UnFreeze()
                        }

*         ServerEngine.ComputeStatistics()
*         ServerEngine.SendStatistics()
*
*                       ClientRMI.ReceiveStatistics()
*                       ClientGUI.DisplayStatistics()

          if (Map.IsStable()) {
            break;
          }

          Map.Update()  <-- in prototype, this stabilizes all nodes
        }

        File.WriteMap()

        END OF MAIN LOOP, GO BACK TO BEGIN

Our requirements document provides details on the current operation of our program. I've left the above description in to illustate how parts of our system work together. It also shows our initial division-vision of the project, and influenced how we broke it up into programming modules.

The exact sequence of events is hidden in the individual subsystems and modules, and for that reason out of the realm of the software specification. (We can change the operational loops without changing any interfaces).


Return to Software Planning page


Revision history:

Version 3.1 - 16-DEC-1998 txe
Fixed links

Version 3.0 - 14-DEC-1998 txe
Updated for version 3 (lots of edits)

Version 2.6 - 16-NOV-1998 txe
Split module specs into separate files.

Version 2.5 - 16-NOV-1998 rgb
Added Shutdown() to ClientEngine
Removed OpenFile(), SetPropagation(), SetDelay() from DemonEngine
Added SetParameters(), ReceiveMap(), ReceiveClientConnectStatus() to Demon Engine
Added ClientConnectStatus object
Added thrown exceptions to ClientEngine, DemonEngine, and ClientConnectStatus

Version 2.4 - 16-NOV-1998 txe
Finished DrawableNode, DrawableModule, DrawableMap
Added GraphicsException

Version 2.3 - 15-NOV-1998 txe
Finished specifying base classes, updated diagram.
Removed Drawable, DrawableDepend.
Added Exception classes, throws columns.

Version 2.2 - 13-NOV-1998 txe
Finished statistics, added more (pink) edits to base classes.

Version 2.1 - 12-NOV-1998 rgb
Added ClientEngine.SetClientID, DemonEngine

Version 2.0 - 12-NOV-1998 txe
Added ClientGUI.DisplayStatistics, Node.SetName(), Node.GetName(), Module.SetName(), Module.GetName(), Map.GetDepend*IDs(), Stats, DrawableStats

Version 1.9 - 10-NOV-1998 txe
Added link to source code page

Version 1.8 - 09-NOV-1998 smg
Modified ServerEngine functions, added ServerThread, removed ServerGUI, changed ServerApplet to Server and modified its functions

Version 1.7 - 06-NOV-1998
Added base classes's Valid(), Verbose(), SetStable() methods

Version 1.6 - 06-NOV-1998
Added String Constructors, String format information, and updated ToSerial method descriptions to Node, Module, Depend, and Map classes.

Version 1.5 - 06-NOV-1998
Updated FileMgr Specification

Version 1.4 - 05-NOV-1998
Added PrintMessage() interface to ClientEngine

Version 1.3 - 03-NOV-1998
Added interfaces to base classes, improved other interface descriptions.

Version 1.2 - 02-NOV-1998
Moved planning and speculation into a separate, private file.
Added individual modules to TOC for quicker referencing.
Started adding interfaces for modules.

Version 1.1 - 29-OCT-1998
Former ClientGUI functionality split into Client, ClientEngine,and ClientGUI.
Added high-level, plain-English version of System Operation for Rob.

Version 1.0 - 29-OCT-1998
Initial creation