SHED
SHED (Shared Editor) is a software package designed to allow multiple users to access and manipulate centralized documents and files. It operates on a client/server model, where the server controls the synchronization and distribution of the documents. Our development team consisted of Cheryl-Annette Kincaid, Brandon Parker, and Robert Freeberg. Cheryl-Annette focused on the client editor and data structure design, Brandon concentrated on the server and data structure classes, and Robert aided project planning.
SHED is currently in a pre-release state, but already design ideas for Version 2 are being mapped out. The SHED project was designed in a modular, OOP form to better enable future expansion and additional features.
You can obtain the latest version of SHED here.
Design
SHED uses a client/server approach to control the editable documents. An alternative method of a peer-to-peer decentralized model was explored, but rejected for reasons of complexity and robustness of design.
Client Editor
The client (editor) side is currently implemented using the C++ ncurses library. The client requests a document from the server, and then edits the document using an editor interface similar to UNIX's vi. The user can freely parse the document in its entirety independently of the other users. The user can then enter into edit mode, where the software will lock one line at a time for the user to edit. If the user moves to a different line in edit mode, the previous line is submitted for updating, and the next line is checked out. Any line that is currently locked by another user appears on the screen in red text and any attempt by the local user to lock such a line is refused by the server.
Server
The server runs as a stand-alone daemon and listens for incoming connections. The server is initiated by a control script, which can start, restart, stop, or print statistics about the server. The server then reads a configuration file to set certain internal variables, and then outputs its process id number to a file. After initializing, the server program listens for incoming connections. A connection client will then be assigned a new socket, and associated with the document requested. If the document requested is not already in memory, the server will obtain the document from the file system. As the clients then request locks for lines of a document, the server tracks locks and changes in its copy of the document structure. When a line is released from a lock, the server then sends that line as an update packet to all clients who are associated with that document.
The following diagram illustrates the design structure of SHED:

(click to enlarge)




