[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Simple and stable web server? Is there any?

Alexey Petrushin

4/1/2008 11:27:00 AM

Can you please advice a simple and stable web server in ruby?
Requirements:
-simplicity
-session management


In short i should implement an application with pure object database and
desktop app like GUI (i.e. ideally i should never work explicitly with
http and html and all this web stuff).

So, i don't need all these ActiveRecords, MVC, Actions and Controllers
and any 'Magic'.
Just simple and ready to usage webserver (with sessions)

Is there any suitable?

Thanks! :)

Candidates:
WEBRick - no session support
Mongrel - no session support
CGI - too old slow and complex and dinozauric

Maveric - bugs (session doesn't work)
RoR, Camping - too many magic and external stuff like ActiveRecords.

Right now it looks like there are nothing really usable (i mean well
documented and stable) for web dev in ruby world except RoR and MVC
model.

Hope, i miss something, and ruby is not only about RoR and MVC :)
--
Posted via http://www.ruby-....

6 Answers

Peter Hickman

4/1/2008 11:41:00 AM

0

Alexey Petrushin wrote:
> CGI - too old slow and complex and dinozauric
>

And it is not a web server either!

There are plenty of small, fast and stable web servers. tinyhttpd,
lighthttpd and they all can call ruby via CGI or even FastCGI. To
dismiss CGI as 'old' and 'dinozauric' (and I would certainly dispute
'slow' and 'complex') seems to me to say what you really want is
something COOL with a shallow learning curve.

If you find CGI 'complex' then I'm afraid no one can help you, have you
considered PHP :)


Alexey Petrushin

4/1/2008 12:15:00 PM

0

> There are plenty of small, fast and stable web servers. tinyhttpd,
> lighthttpd and they all can call ruby via CGI or even FastCGI.
Yes, but they are written not in ruby, so there always will be some
questions with deployment. Ind i gues there will be always question in
multi-platform deployment.
Probably late in production i switch to JRuby and Tomcat. But right now
i need simple and fast development, not performance.

> If you find CGI 'complex' then I'm afraid no one can help you, have you
> considered PHP :)
:) really i'm from java world, and about two month with ruby, trying to
use it for one new project.
No, for sure CGI isn't the choice, it's too old and low level.
--
Posted via http://www.ruby-....

James Tucker

4/1/2008 2:04:00 PM

0


On 1 Apr 2008, at 13:15, Alexey Petrushin wrote:
>> There are plenty of small, fast and stable web servers. tinyhttpd,
>> lighthttpd and they all can call ruby via CGI or even FastCGI.
> Yes, but they are written not in ruby, so there always will be some
> questions with deployment. Ind i gues there will be always question in
> multi-platform deployment.

mongrel
ebb
thin
webrick

all can be used with rack to make the interface simpler...

> Probably late in production i switch to JRuby and Tomcat. But right
> now
> i need simple and fast development, not performance.

Use rack, it will likely save you pain in the future.

>> If you find CGI 'complex' then I'm afraid no one can help you, have
>> you
>> considered PHP :)
> :) really i'm from java world, and about two month with ruby, trying
> to
> use it for one new project.
> No, for sure CGI isn't the choice, it's too old and low level.

no further comment on web servers...


Session management is not a web server function, really. I mean, sure,
it handles the headers etc, but it's very app specific as all of that
stuff is not in the required portion of the spec.


Anyway, take a look here:

http://macournoyer.wordpress.com/2008/02/09/the-flexible-thin-anorexic-gymnast-that-democratized-d...

You should find that a modern, easy to use ruby dsl powered setup for
your server needs.


HTH

Ezra Zygmuntowicz

4/1/2008 7:29:00 PM

0


On Apr 1, 2008, at 4:27 AM, Alexey Petrushin wrote:
> Can you please advice a simple and stable web server in ruby?
> Requirements:
> -simplicity
> -session management
>
>
> In short i should implement an application with pure object database
> and
> desktop app like GUI (i.e. ideally i should never work explicitly with
> http and html and all this web stuff).
>
> So, i don't need all these ActiveRecords, MVC, Actions and Controllers
> and any 'Magic'.
> Just simple and ready to usage webserver (with sessions)
>
> Is there any suitable?
>
> Thanks! :)
>
> Candidates:
> WEBRick - no session support
> Mongrel - no session support
> CGI - too old slow and complex and dinozauric
>
> Maveric - bugs (session doesn't work)
> RoR, Camping - too many magic and external stuff like ActiveRecords.
>
> Right now it looks like there are nothing really usable (i mean well
> documented and stable) for web dev in ruby world except RoR and MVC
> model.
>
> Hope, i miss something, and ruby is not only about RoR and MVC :)
> --
> Posted via http://www.ruby-....
>


Allow me to recommend you just use Rack. It will allow you to run on
any available ruby web server platform and has built in sessions and
params parsing.

sudo gem install rack


Cheers-

- Ezra Zygmuntowicz
-- Founder & Software Architect
-- ezra@engineyard.com
-- EngineYard.com


James Dinkel

4/1/2008 10:09:00 PM

0

Alexey Petrushin wrote:
> Can you please advice a simple and stable web server in ruby?
> Requirements:
> -simplicity
> -session management
>
>
> In short i should implement an application with pure object database and
> desktop app like GUI (i.e. ideally i should never work explicitly with
> http and html and all this web stuff).
>
> So, i don't need all these ActiveRecords, MVC, Actions and Controllers
> and any 'Magic'.
> Just simple and ready to usage webserver (with sessions)
>
> Is there any suitable?
>
> Thanks! :)
>
> Candidates:
> WEBRick - no session support
> Mongrel - no session support
> CGI - too old slow and complex and dinozauric
>
> Maveric - bugs (session doesn't work)
> RoR, Camping - too many magic and external stuff like ActiveRecords.
>
> Right now it looks like there are nothing really usable (i mean well
> documented and stable) for web dev in ruby world except RoR and MVC
> model.
>
> Hope, i miss something, and ruby is not only about RoR and MVC :)

The fact that you are calling CGI and RoR "webservers" would indicate
that you have no idea what you are talking about. Not that it's your
fault, it just makes it hard to figure out what it is you are asking
for.

For one thing, I don't see how you plan to write a web application
without touching html. No matter how you put together your app, no
matter what processing goes into the back end, you eventually have to
produce an html file to be sent to the browser. Unless maybe you want
to write the backend code and someone else write the html formatting,
which is exactly what Rails is good at - you write the model and
controller and someone else writes the view.
--
Posted via http://www.ruby-....

Alexey Petrushin

4/2/2008 5:01:00 AM

0

Thanks for help, probably rack is what i need :)

>For one thing, I don't see how you plan to write a web application
>without touching html.

c = Component.new('My Component')
l = Label.new(c, 'It's a label)
Button.new(c, 'Ok'){
l.text = 'new text'
}

and so on ...
--
Posted via http://www.ruby-....