Re: CGI "service".
Hi, I´m developing a web app in C++. But it loads a huge amount of from a Database to memory, and I can´t afford doing this everytime someone asks for the page. Is there a way to make the program to keep running, and reading requests made via CGI? Hi.. Maybe fastCGI can do what you are looking for.. (http://www.fastcgi.com/) "Performance. FastCGI processes are persistent-they are reused to handle multiple requests. This solves the CGI performance problem of creating new processes for each request." -- Øyvind Skaar | os _a odots.org | 482 78 480 | http://odots.org http://last.fm/user/%67%69%7A%7A%6C%6Fn | http://43things.com/person/%C3%B8s 6865792c207768617420646f20796f75206b6e6f772c 796f752772652061206e65726420746f6f202e2e ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: CGI "service".
Qua, 2006-04-26 às 12:07 -0300, Pgold escreveu: > Hi, I´m developing a web app in C++. But it loads a huge amount of > from a Database to memory, and I can´t afford doing this everytime > someone asks for the page. Is there a way to make the program to keep > running, and reading requests made via CGI? > If it helps, i´m running FreeBSD 6.0 with Apache 2.2. > > Greets, > Pedro. If the problem is keeping the data in memory, I don't think even mod_perl or mod_python will help you. Sugestion #1 - write an apache module; that will be always in memory. I'm not sure if it will be hard to compile. Sugestion #2 - forget about C++ and use mod_mysql or whatever is available for your DBMS. Sugestion #3 - split your web app in two parts: cgi scripts (or apache module) and a server app that keeps data in memory and responds to requests made by cgi scripts. Communication between the two can be made with pipes, sockets, shared memory or whatever you like. Sugestion #4 - load less data from the database; only that which you need to generate output. (For example, for an SQL database, use WITH, HAVING, OFFSET and LIMIT wisely). Any more sugestions? -- Miguel ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: CGI "service".
On Apr 26, 2006, at 11:07 AM, Pgold wrote: Hi, I´m developing a web app in C++. But it loads a huge amount of from a Database to memory, and I can´t afford doing this everytime someone asks for the page. Is there a way to make the program to keep running, and reading requests made via CGI? If it helps, i´m running FreeBSD 6.0 with Apache 2.2. Look into WebObjects, mod_perl or mod_python, or even fastcgi. -- -Chuck ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
CGI "service".
Hi, I´m developing a web app in C++. But it loads a huge amount of from a Database to memory, and I can´t afford doing this everytime someone asks for the page. Is there a way to make the program to keep running, and reading requests made via CGI? If it helps, i´m running FreeBSD 6.0 with Apache 2.2. Greets, Pedro. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"