dictQuery - What is it?

This program was developed to deliver fast answers to queries adressed to the LEO German/English dictionary.

Overal Design

The program is implemented as a specialized multithreaded HTTP server. Everything needed to process a query is held in memory - no disk access is done (besides logging). To speed up the lookup of words and to enable the folded match of german umlauts and sharp s (ß), a specialized bigramm index is used. All URL's not handled by this server, are proxied to another server. Due to this uniq design, most queries are completely processed in less than 10ms on a 300MHz machine.

The implementation language of the whole thing is C and most of the code is organized in seperate libraries:

lstr
This library implements length controlled strings. The procedures ensure that no overflow occurs and allocate and deallocate space as needed.
tstr
A library on top of lstr, to implement tagged strings. A tagged string manages named positions in a string. The procedures of this library supply operations like insertion, deletion etc. on these named positions without the need to fiddle with real (numeric) indices into strings. This library is used to generate the HTML code.
PAWS
The name is an acronym for Put a WEB Server in your application. It is a multithreaded library implementing the basic blocks of a HTTP server.
vpset
Implements set operations on dynamicly allocated sets.
bgi
Implements on top of vpset an indexing scheme based on bigramms to quickly locate potential hits for a given search string.
errlog
As the name induces: a small library to gather errors and messages in a uniform manner and at a central place.
dbg
debugging macros and procedures to parse options from the commandline to set/reset bits that control what debug output should be generated.

All these library components existed before I started to implement this server. Only the multithreading capability was added to PAWS due to the requirement of this program. Most of the remaining code is configuration of the program, and putting everything together.


Brought to you by dictQuery-4.88.