open a template file, read from the file, close the file, open a data file, read from the file, append to the file, close the file.
While going through a general code rewrite, I thought of setting up a file client/server based approach in which I create a server that reads the data and template files upon startup then binds to a port. The web code then acts as a client, requesting data or sending updates to the server as the case may be. Thus, template files only need to be read once. It seems that this is better than storing it all in shared Apache memory because then every Apache process doesn't need to know every file for every script/module.
I coded a test client and server using Net::EasyTCP and it works well. Bashing it with apache bench gives a worse median response time but a better mean response time than the original non-client/server version of the code.
My questions are:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: File Server for cgi scripts
by mortis (Pilgrim) on Aug 12, 2004 at 02:40 UTC | |
|
Re: File Server for cgi scripts
by derby (Abbot) on Aug 11, 2004 at 23:25 UTC | |
|
Re: File Server for cgi scripts
by tantarbobus (Hermit) on Aug 12, 2004 at 00:01 UTC | |
|
Re: File Server for cgi scripts
by exussum0 (Vicar) on Aug 12, 2004 at 11:04 UTC | |
|
Re: File Server for cgi scripts
by iburrell (Chaplain) on Aug 12, 2004 at 16:17 UTC | |
|
Re: File Server for cgi scripts
by perrin (Chancellor) on Aug 12, 2004 at 20:32 UTC | |
|
Re: File Server for cgi scripts
by Gilimanjaro (Hermit) on Aug 13, 2004 at 11:03 UTC |