Subject: is ruby CGI the good way
	Date: gio 04 apr 13 10:53:34 +0900

Quoting Ken Peng (yhpeng / orange.fr):

> We have a simple API plan, it does the standard web request/handle
> flow: get requests from users, do something with DB queries, return
> the results to users.
>
> I know well about CGI and ruby's CGI module. So it's quiet easy to
> write the API with CGI module with Apache as webserver.  But, does
> CGI have slow performance? What's the good alternative?

What do you need as performance? Lots of hits per second? Because, for
simple in-house use, with a few people making queries now and then,
Webrick does an excellent job. Webrick is the web server included in
the official Ruby code. Sadly, you won't find much documentation
around, but once you have overcome the initial learning step, things
go quite smooth - all you have to run is your Ruby process. 

Then, Ruby has a VERY VAST offer of solutions for web coding, even for
high-throughput sites. But it's a world that requires quite a long
learning process. You may want to read about Rack:

http://rack.github.com/

which is a common interface to various webserver engines, and maybe
Sinatra:

http://www.sinatrarb.com/

which is a simpler, more straightforward web framework than rails, and
is sitting on Rack.

Carlo

-- 
  *         Se la Strada e la sua Virtu' non fossero state messe da parte,
* K * Carlo E. Prelz - fluido / fluido.as             che bisogno ci sarebbe
  *               di parlare tanto di amore e di rettitudine? (Chuang-Tzu)