<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Arial","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Arial","sans-serif";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Arial","sans-serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
p.msochpdefault, li.msochpdefault, div.msochpdefault
        {mso-style-name:msochpdefault;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:10.0pt;
        font-family:"Times New Roman","serif";}
span.balloontextchar0
        {mso-style-name:balloontextchar;
        font-family:"Arial","sans-serif";}
span.balloontextchar00
        {mso-style-name:balloontextchar0;
        font-family:"Arial","sans-serif";}
span.emailstyle19
        {mso-style-name:emailstyle19;
        font-family:"Arial","sans-serif";
        color:windowtext;}
span.emailstyle20
        {mso-style-name:emailstyle20;
        font-family:"Arial","sans-serif";
        color:#1F497D;}
span.emailstyle24
        {mso-style-name:emailstyle24;
        font-family:"Arial","sans-serif";
        color:#1F497D;}
span.EmailStyle26
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle27
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>Michael,<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>We do this exact thing by not down to the layer level like you want.<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>We have two instances of mapserver setup on our webserver where one uses fcgi and other just uses the normal mapserver cgi.&nbsp; Then by geomoose application we can point it to which cgi we want to use depending on what the application is doing.&nbsp; It&#8217;s pretty easy to configure in IIS as a virtual directory or in apache&#8217;s conf file.<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>I don&#8217;t know if we&#8217;ve done enough testing or benchmarking to really know where it get&#8217;s us the biggest performance benefits.&nbsp; Most of the applications we host are pretty low volume.&nbsp; I think fcgi would have a much bigger impact on applications that have larger volumes of users simultaneously.<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>I basically wanted to let you know we are doing this and it does work.&nbsp; It would take some customization to get down to the layer level though.<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><div><p class=MsoNormal><b><span style='color:#1F497D'>Brian Fischer,</span></b><span style='font-family:"Calibri","sans-serif";color:#1F497D'> </span><span style='font-family:"Calibri","sans-serif";color:#595959'>CFM&nbsp; GIS Manager<br><b>Houston Engineering, Inc.</b><br>Phone:&nbsp;Direct: 763-493-6664 / W: 763.493.4522 / M: 763.229.2734<o:p></o:p></span></p></div><p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Reynolds, Michael J. (DOT) [mailto:Mike.Reynolds@state.mn.us] <br><b>Sent:</b> Monday, November 01, 2010 1:48 PM<br><b>To:</b> Dan Little; geomoose-users@lists.sourceforge.net<br><b>Subject:</b> Re: [Geomoose-users] fastcgi vs cgi<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>Right..I should have specified a bit more&#8230;<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>FastCGI is a way of enabling a server to kick off and persist an executable through several requests.<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>In the Geomoose/Mapserver environment that means that a request to &#8230;cgi-bin/mapserv.exe&#8230; becomes &#8230;fcgi-bin/mapserv.exe&#8230;<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>When the fastcgi method is used and Geomoose is loaded by the client the first layer requested triggers apache to load mapserv.exe and keep it running for x minutes/seconds.&nbsp; This instance is used for each of the following layers.&nbsp; Theoretically this saves time loading mapserv.exe for each and every defined map layer.&nbsp; In practice, in our environment, we&#8217;re seeing some nice speed improvements.&nbsp; Especially noticeable for large dataset display.<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>Also, mapserver map files can use the PROCESSING &quot;CLOSE_CONNECTION=DEFER&quot; map layer setting.&nbsp; This causes mapserver to not close the database connection (connection cache) for each layer until after it has finished processing the mapfile.&nbsp; When using FastCGI this supposedly means the connection is kept open while the mapserv cgi is still open; from map to map.<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>If correctly enabled on a server, fastcgi is an option.&nbsp; The normal cgi-bin requests are still possible.<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>In the geomoose application, it seems only configured in one place&#8230;so all requests would be one or the other.&nbsp; I&#8217;m sure there is probably a way to javascript or php a way to direct certain layers to fcgi-bin and others to cgi-bin.&nbsp; Possibly a meta varialble in the map file?<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>Why not send all map layers to fastcgi?&nbsp; I don&#8217;t know.&nbsp; I was hoping others who have experimented with fastcgi and geomoose could provide feedback.<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>My reference to WMS wasn&#8217;t too clear.&nbsp; We use ms4w/geomoose tool to provide wms service to other web clients, gis software, and sometimes geomoose itself.&nbsp; It&#8217;s not really a geomoose capability..but the map files are all stored in our geomoose app folder structure.&nbsp; It is Mapserver that really provides the wms.<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Dan Little [mailto:danlittle@yahoo.com] <br><b>Sent:</b> Monday, November 01, 2010 12:02 PM<br><b>To:</b> Reynolds, Michael J. (DOT); geomoose-users@lists.sourceforge.net<br><b>Subject:</b> Re: [Geomoose-users] fastcgi vs cgi<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><div><div><p class=MsoNormal><span style='font-size:10.0pt'>GeoMOOSE can use pretty much anything that serves up a WMS. &nbsp;Of course, FastCGI is really only a way of optimizing MapServer's performance. &nbsp;Most of GeoMOOSE is static HTML/JS/Images that won't see any benefit from FastCGI and I would not advise putting the PHP into FastCGI as PHP is already run as an Apache module.<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt'><o:p>&nbsp;</o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt'>You could set certain layers up as FastCGI, there is no limitation in GeoMOOSE. &nbsp;The only limitation is what you have the time/patience to configure.<o:p></o:p></span></p></div><blockquote style='border:none;border-left:solid #1010FF 1.5pt;padding:0in 0in 0in 4.0pt;margin-left:3.75pt;margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal><span style='font-size:10.0pt'><o:p>&nbsp;</o:p></span></p><div><p class=MsoNormal style='margin-bottom:12.0pt'><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> &quot;Reynolds, Michael J. (DOT)&quot; &lt;Mike.Reynolds@state.mn.us&gt;<br><b>To:</b> &quot;geomoose-users@lists.sourceforge.net&quot; &lt;geomoose-users@lists.sourceforge.net&gt;<br><b>Sent:</b> Mon, November 1, 2010 10:58:15 AM<br><b>Subject:</b> [Geomoose-users] fastcgi vs cgi</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p><div><p class=MsoNormal><span style='color:#1F497D'>Any comments about geomoose and fastcgi?&nbsp; </span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>&nbsp;</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>It would seem to be that if fastcgi is configured correctly that geomoose could be configured to use it. &nbsp;Once configured, ALL geomoose layers will be rendered using fastcgi.&nbsp; Is there a way to set just certain layers to use it?&nbsp; Is that necessary?</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>&nbsp;</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>&nbsp;</span><o:p></o:p></p></div></div></div></blockquote></div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p>&nbsp;</o:p></span></p></div></body></html>