CGI and ISAPI
A CGI stand-alone Web server application
is a console application
that receives client request information on standard input and passes the
results back to the server on standard output. Each request message is
handled by a separate instance of the application.
Advantage: Each request launches a independent process on the server, which
is closed after execution. It is no problem to use multiple copies of WebQuiz.exe
in different folders at the same time on the same server (e.g. using different
interface languages or different sets of quizzes).
Drawback: Each request must launch its own process on the server. The task
of creating a file, launching a separate process, executing the process,
and then writing and returning yet another file is relatively slow
An ISAPI Web server application is a DLL that is loaded by
the Web server. Each request message is automatically handled in a separate
Advantage: As WebQuiz.dll is loaded only once, a lot of file reading and
initialization tasks are omitted. It works much faster then the CGI application.
Drawback: WebQuiz.dll will be loaded into memory by the first request it
gets. It will remain there until you shut down the web server.
This means, you may use only one copy of WebQuiz.dll in only one folder.
You may not install ISAPI WebQuiz twice into two different folders on
the same server, to get for example two different interface languages.
If you request it, I will publish soon one or two additional issues
of ISAPI WebQuiz, which use other names for the WebQuiz.dll. So, you will
be able to install each issue once on the same server.
You can not update WebQuiz.dll with a new version, while it is still present
in memory. This means, you must shut down the web server or even reboot
the computer to delete or overwrite WebQuiz.dll.
The ISAPI - version uses two additional commands:
- /close (http://www.localhost/cgi-bin/WebQuiz/WebQuiz.dll/close) ends all
activities of WebQuiz.dll. This means for example, the database files are unlocked
and may be deleted. WebQuiz.dll remains resident in RAM.
- /initialize reinitialises all activities.
Update January 11, 2002