cobra scgi code
Posted:
Tue Jul 07, 2009 9:05 am
by todd.a
I have added the code for a SCGI (simple common gateway interface) handler that allows you to integrate SCGI support in web application server or other variants of web stacks. You can find the source at
http://bitbucket.org/webnov8/cobra-scgi/.
Feel free to provide comments and suggestions. If you are interested in contributing let me know and I can add you as a writer.
Re: cobra scgi code
Posted:
Tue Jul 07, 2009 9:38 pm
by Charles
Let me expand on what this means. Various web servers such as Apache, lighttpd and nginx have support for SCGI which allows you to have HTTP requests to the web server sent out to a program (which is often called the application server) to create a response. The communication is done via a socket and follows a particular protocol. Your program then sends an HTTP response back with headers and content (often <html> ... </html>, CSS, images, etc.).
With webnov8's library, you can easily set up such a program/appserver in Cobra. You write a Cobra method that takes the HTTP request and returns the response as a string. Inside that method, you can do whatever you like.
So you can generate dynamic content from Cobra behind Apache and other web servers.
Re: cobra scgi code
Posted:
Wed Jul 08, 2009 2:40 am
by Charles
I'm happy to report that I got this working locally on my Mac. It's pretty exciting to be able to put a Cobra app server behind any popular web server.
Also, I have fleshed out the docs quite a bit at
http://bitbucket.org/webnov8/cobra-scgi/wiki/Home.
And webnov8 is close to checking in some fancier features for the sample program.
And you guys are missing all the fun on
irc.
G'night.
Re: cobra scgi code
Posted:
Tue Jul 21, 2009 4:20 pm
by todd.a
Note that the library has been renamed to Overlap. Updated url
http://www.bitbucket.org/webnov8/overlapThe reasons include being able to use the real acronyms inside of the project, like a class name SCGI without conflicting, and also being able to name the DLL after the namespace without a bunch of uppercased letters. Also for wsgi and fastcgi to be named after the acronym pronounciation.