CGI->WEBrick?

O

objectuser

I have to work in a traditional (i.e., fork/exec) CGI environment. I
would like to use WEBRick because it supports servlets (which is
something I understand).

Is there a way to use the WEBRick servlet stuff inside a CGI
environment? This seems like a reasonable thing to do, but everything
I read on WEBRick starts with the WEBRick HTTP server. I would like to
use it from the servlet environment down. I'd also like to be able to
move back and forth between CGI and FastCGI, if possible.

Also, I would like to know where to look for any sort of web framework
that works inside traditional CGI (it would be cool, of course, if it
also worked in FastCGI with no changes). Is WEBRick the best choice?
What does Rails use (I understand it runs under FastCGI)?

Thanks for any help or guidance.

--Kevin
 
J

James Britt

objectuser said:
Also, I would like to know where to look for any sort of web framework
that works inside traditional CGI (it would be cool, of course, if it
also worked in FastCGI with no changes).

Nitro works under CGI, FastCGI, WEBrick, and ligHTTP. Migration from
one to another is fairly painless.

You will probably want to get away from CGI if your application makes
use of much dynamic code invocation, O/R mapping, templating, and such
(pretty much true regardless of app framework), though Nitro makes it
very easy to start simple and evolve your application as requirements
dictate, only using the parts you actually need.


http://nitro.rubyforge.org/
http://www.navel.gr/nitro/



James
 
A

Aredridel

I have to work in a traditional (i.e., fork/exec) CGI environment. I
would like to use WEBRick because it supports servlets (which is
something I understand).

Is there a way to use the WEBRick servlet stuff inside a CGI
environment? This seems like a reasonable thing to do, but everything
I read on WEBRick starts with the WEBRick HTTP server. I would like to
use it from the servlet environment down. I'd also like to be able to
move back and forth between CGI and FastCGI, if possible.

It sounds like WEBrick is too low-level for what you want -- though
writing a CGI proxy to connect to a webrick server is possible.

Something more abstract like Nitro, IOWA or Rails might fit the bill better.
 
O

objectuser

Yeah, traditional CGI sucks, but I'm stuck with it for the time being.
I do have to connect to a database, which will make it suck more (is
there even a way to do connection pooling?).

I'll check out Nitro. So, basically, WEBrick is not really what I'm
looking for--it really can't be used without the HTTP server portion?
I'm getting this from your post, as well as that of Aredridel's (thanks
to you both).

--Kevin
 
O

objectuser

That looks cool, too, but I can't even run a server. These are all
restrictions of our hosting provider. I can use traditional CGI and
.... that's about it. If it's too slow, we might have to switch
providers, but we like everything else about them ...

Thanks, again!

--Kevin
 
A

Aredridel

That looks cool, too, but I can't even run a server. These are all
restrictions of our hosting provider. I can use traditional CGI and
.... that's about it. If it's too slow, we might have to switch
providers, but we like everything else about them ...

Ah, fun.

Yeah. Webrick -is- the HTTP server, so that's a no-go. CGI as the
interface is what you're stuck with, but there's a ton of usable
abstractions on top of that . It's quite a restriction, but won't
prevent all utility.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top