Forums

cobra scgi code

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

cobra scgi code

Postby todd.a » Tue Jul 07, 2009 9:05 am

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.
todd.a
Site Admin
 
Posts: 81
Location: Chicago, IL

Re: cobra scgi code

Postby Charles » Tue Jul 07, 2009 9:38 pm

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.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: cobra scgi code

Postby Charles » Wed Jul 08, 2009 2:40 am

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.
Charles
 
Posts: 2515
Location: Los Angeles, CA

Re: cobra scgi code

Postby todd.a » Tue Jul 21, 2009 4:20 pm

Note that the library has been renamed to Overlap. Updated url http://www.bitbucket.org/webnov8/overlap

The 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.
todd.a
Site Admin
 
Posts: 81
Location: Chicago, IL


Return to Discussion

Who is online

Users browsing this forum: No registered users and 14 guests