MSQL Code Review
These notes reflect information gained informally over the past few months
of using MSQL at the E831 experiment, as well as a rapid (20 minute) 'formal'
scan through all the C source code files for MSQL and its support programs.
The version reviewed is 1.0.7
Style
- The product organization is conventional,
with /doc and /src holding the usual
things, and /targets holding things generated by the local installation.
- The usual README files, installation installation instructions,
Makefile, etc are all present and do what you would expect.
- Subroutine names are mnemonic and clear.
- The code is well structured, making good use of indentation,
and with sparse but adequate comments.
- MSQL source includes internal version identifiers (RCS style)
- MSQL source uses include files in a conventional and appropriate manner.
- There are 16312 lines of C source code,
with 1578 lines of header files.
The MSQL client and server part of this is under 12,000 lines of C,
with under 600 lines of header.
Substance
- MSQL is very portable.
It runs under AIX, BSD Unix, HP-UX, IRIX, Linux, OSF/1, Solaris, Ultrix
and others.
We have tested it locally on IRIX and Solaris.
- MSQL was easily tailored to fit in the Fermilab UPS product structure.
We have written a short
Fermilab installation guide.
- MSQL uses mmap to improve speed when reading the database files.
The size of the memory mapped cache is adjustable.
- We quickly found and fixed one bug in version 1.0.5.
The source code proved to be accessible.
The bug was fixed (for the next release)
within days of being reported to the author.
- Documentation is well written, clear and short.
It is available as Postscript, Text and HTML formats.
- We have successfully used the Client-Server part of MSQL
to implement our HVSERVER system.
- MSQL does its own command parsing,
with code written in a style like the output of LEX.
- MSQL users only standard Unix tools for code generation and operation.
All configuration tools are part of the MSQL distribution.
- The important internal limits ( clients, fields, etc)
are easily expandable.
The defaults are large enough for any intended E831 usage.
- The auxiliary utility programs are well written,
and are widely used as coding examples for private applications.