Project: LICOM
SOFTWARE DESIGN SPECIFICATIONDate of preparation: Jan 30, 2005 Prepared by: Sowmya MS Pradeep V
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1. Introduction1.1 Purpose of this documentThe following SDS document specifies the structure and design of LICOM. The various proposed or actual designs for every module in LICOM are discussed clearly, thereby forming the essential blue-print for coding the software. The outcome of the SDS is the modularity that has been achieved, which will help in organizing code and determining better solutions wherever applicable. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1.2 Scope of the development projectLICOM is a compression/de-compression tool that sits in-between the browser and content from the server. It aims to facilitate compression of ASCII text, RTF, DOC, PDF, HTML and similar file types upto 550% and GIF, JPG, BMP and similar image file types upto 70% of their original size. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1.3 Acronyms and abbreviations
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1.4 References
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1.5 Overview of this document
Section 1 previews this document as a whole Section 2 presents the structure of LICOM, the various user interfaces that come with it, and the relationship between the various modules. Section 3 illustrates each LICOM module and throws more light on its design specification Section 4 describes existing solutions that LICOM re-used, and also describes how LICOM modules can be re-used for other purposes. Section 5 depicts design issues Section 6 is the appendices section | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2. System architecture descriptionThe following section depicts the architectural organization of the entire LICOM application 2.1 Overview of modules / componentsThere are 3 basic modules:
Each of these modules are further split into two more sub-modules:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2.2 Structure and relationshipsThe actual structure (module-wise) can be realized by the following figures: Server-side components/modules: Client-side components/modules: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2.3 User interface issuesThere are two user-interfaces available. Both of them can be represented with the following figure: These interfaces are not mandatory for the proper functioning of LICOM, but are useful for advanced users who wish to customize LICOM. The interfaces are:
Both the interfaces are just a single-page display form that will update configuration files (written in XML). These files will be read by the LICOM system when LICOM starts up. Few options provided in these interfaces are:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3. Detailed description of componentsAll components (modules) in the LICOM application are discussed in this section | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3.1 Component template descriptionFollowing is the template upon which the rest of the section will be based: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| 3.2 LCM Compressor
|
| 3.3 LCM De-Compressor
|
| 3.4 LCM Client ControlBox
|
| 3.5 LCM Server ControlBox
|
|
| 3.6 LCM Client Interfacer
|
| 3.7 LCM Server Interfacer
|
|
| 4. Reuse and relationships to other productsThe following components of LICOM can be re-used by any other software application:
This is an utility which reads simple XML data into a program for processing. It also writes out program-data as a XML file (say, a configuration file). This will be useful for an application that needs to represent its data in a standard format (ie. XML), for the sake of later processing The basic compression and de-compression algorithms can be used as a general utility to compress files into the LCM format, and de-compress them for later use. The supported file-formats are as documented in the appropriate sections The algorithms for image compression MAY be borrowed from another open-source algorithm, if the current research to develop our own algorithm is not successful. |
| 5. Design decisions and tradeoffsThe following design decisions are considered to be worth a mention:
The compression/de-compression algorithms are abstracted from the rest of the LICOM implementation. This was for two major purposes: XML is used as the data-format for both configuration files and internal data. This is in conformance to the needs of the industry, thereby allowing easier re-use of our code, and for providing better transparency. |
| 6. Pseudocode for componentsThe following is the pseudo-code for all LICOM components/modules:
At Startup: Read settings.xml file Update settings based on that data IF Updation of settings is requested Convert settings into XML Write out the XML file as settings.xml ENDIF IF Default options are requested Load the default.xml file Update settings based on that data ENDIF
At Startup: Read settings.xml file Update settings based on that data IF Update is requested Convert settings into XML Write out the XML file as settings.xml ENDIF IF Default options are requested Load the default.xml file Update settings based on that data ENDIF
Use Network Connection Read request from client IF licom_compr_request HTTP header is not present Abandon all operations for this request, just route the request through ELSE Load the requested file and determine its data-type IF file can be compressed Load config file Set appropriate HTTP headers Pass control to LCM Compressor module ENDIF Route out data towards client ENDIF
Use Network Connection IF request is being sent ADD licom_compr_request HTTP header ENDIF IF response is being read Read HTTP headers IF licom_compressed HTTP header is not present Abandon all operations for this response, just route the response through ELSE Pass control to LCM De-Compressor module ENDIF Route in data towards browser ENDIF
Read data (file and its format) from higher module (LCM Server Interfacer) Load the appropriate compression table Perform compression Return compressed data to higher module (LCM Server Interfacer)
Read data (file and its format) from higher module (LCM Client Interfacer) Load the appropriate de-compression table Perform de-compression Return de-compressed data to higher module (LCM Client Interfacer) |
| 7. AppendicesN/A |