I'm looking for the best way to deal with some cgi interaction issues. We
currently have a functioning application utilizing cfhttp calls to a cgi
program we've written. I'm not real comfortable with the way we've setup
the interaction between cold fusion and the cgi program. We wrote the cgi
program, and can modify it to produce the content in whatever format is
best (i hope <g>) The cgi program is used for data access to proprietary
databases that cold fusion cannot access directly. There are no other data
sources set-up within cold fusion. We are using version 4.0.1. The cgi
programs and databases are currently located on the same server as the
webserver. We will be moving them to a different machine shortly as part of
this speed-up process.
This is the way the program is structured.
cold fusion calls the cgi program through cfhttp
the cgi program returns data to cold fusion in the form of cftags i.e.
<cfset this = that>
etc.
the return data is stored in a variable filecontent
filecontent is then sent through ben forta's execute.cfm tag as a cfinclude:
<cfset ExecuteTempDir=expandpath("./execute/")>
<cfset lDeleteFile=TRUE>
<CFSET ExecuteCode="#filecontent#">
<CFINCLUDE Template="#mydirectory#/cftags/Execute.cfm">
The result is that all the cfsets are executed and included in the calling
page right where the cfhttp call is made.
While this is working well, this method seems to have some significant
drawbacks:
1. by including the randomly named .cfm files which are generated by the
execute.cfm tag, it seems to me, we are effectively defeating cold fusions
templace caching ability.
2. I'm not comfortable with the scalability of this approach. We had a
website that generated 120,000 hits over a 2 day span, and the cf service
had to be cycled a couple of times a day. While we've taken a look at the
cf code for memory leaks, are locking all our variables, and are also
making extensive use of the request scope, we're still seeing a
significant increase in memory usage on the server commensurate with with
traffic. we are using very little in the way of session and application
variables, and no client variables.
As i was writing this, i noticed i was taking filecontent and copying it's
contents to the variable executecode with the statement:
<CFSET ExecuteCode="#filecontent#">
since the variable filecontent could contain up to 50k or 100k worth of
data, i guess one of the speed-ups i could do would be to put the
information that comes back from the cgi program directly into the variable
executecode, thereby saving the memory that duplicating the 50 or 100k of
data is taking. (duh)..
Since i can structure the information returned by the cgi program in any
manner we choose, i'm wondering what alternatives i might have that would
not require the use of the execute tag, and could result in less load on
the server.
Thanks in advance for any thoughts you might have on this issue...
Brian L. Wolfsohn http://www.cus.com
CUS Business Systems Ft.Lauderdale,FL
Software for Auctioneers (954) 565-5600 Email:[EMAIL PROTECTED]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists