My personal feeling is that I would not want to use
remote hello and remote database access from within
a CGI script due to the resource consumption...
CGI already involves a lot of fork()ing. Opening and
closing databases from the CGI program adds "load".
A remote hello and remote database access and remote
bye would even make things worse.
A more efficient approach might be to write a "remote
database gateway" program that runs in a seperate job
and keeps the database open all the time whereas the
(small) CGI programs contact this "database gateway"
via IPC (MSG files or BSD Sockets) and thus avoids to
open/close database and remote session so frequently.
Also see http://www.fastcgi.com for info on FastCGI.
There is quite interesting reading stuff on related
issues and FastCGI from Open Market and NCSA sounds
pretty promising to me...
Regards, Lars/iX Appel ;-)