# Simple and stable web server? Is there any?

**URL:** <https://www.ruby-forum.com/t/simple-and-stable-web-server-is-there-any/133541>\
**Category:** Ruby\
**Created:** [April 1, 2008, 1:27pm UTC](https://www.ruby-forum.com/t/simple-and-stable-web-server-is-there-any/133541 "2008-04-01T13:27:10Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![axyd80](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/82dd89/32.png) [@axyd80](https://www.ruby-forum.com/u/axyd80)\
**Post date:** [April 1, 2008, 1:27pm UTC](https://www.ruby-forum.com/t/simple-and-stable-web-server-is-there-any/133541/1 "2008-04-01T13:27:10Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![axyd80](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/82dd89/32.png) [@axyd80](https://www.ruby-forum.com/u/axyd80)\
**Post date:** [April 1, 2008, 1:41pm UTC](https://www.ruby-forum.com/t/simple-and-stable-web-server-is-there-any/133541/2 "2008-04-01T13:41:51Z")

</div>

Alexey P. 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 🙂

---

<div class="post-metadata">

**Author:** ![axyd80](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/82dd89/32.png) [@axyd80](https://www.ruby-forum.com/u/axyd80)\
**Post date:** [April 1, 2008, 2:15pm UTC](https://www.ruby-forum.com/t/simple-and-stable-web-server-is-there-any/133541/3 "2008-04-01T14:15:04Z")

</div>

> 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.

---

<div class="post-metadata">

**Author:** ![axyd80](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/82dd89/32.png) [@axyd80](https://www.ruby-forum.com/u/axyd80)\
**Post date:** [April 1, 2008, 9:29pm UTC](https://www.ruby-forum.com/t/simple-and-stable-web-server-is-there-any/133541/4 "2008-04-01T21:29:58Z")

</div>

On Apr 1, 2008, at 4:27 AM, Alexey P. wrote:

> ## Mongrel - no session support
> 
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

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 Z.  
– Founder & Software Architect  
– removed\_email\_address@domain.invalid  
– [EngineYard.com](http://EngineYard.com)

---

<div class="post-metadata">

**Author:** ![axyd80](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/82dd89/32.png) [@axyd80](https://www.ruby-forum.com/u/axyd80)\
**Post date:** [April 2, 2008, 12:09am UTC](https://www.ruby-forum.com/t/simple-and-stable-web-server-is-there-any/133541/5 "2008-04-02T00:09:12Z")

</div>

Alexey P. 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.

---

<div class="post-metadata">

**Author:** ![axyd80](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/82dd89/32.png) [@axyd80](https://www.ruby-forum.com/u/axyd80)\
**Post date:** [April 2, 2008, 7:01am UTC](https://www.ruby-forum.com/t/simple-and-stable-web-server-is-there-any/133541/6 "2008-04-02T07:01:11Z")

</div>

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 …

---

<div class="post-metadata">

**Author:** ![axyd80](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/82dd89/32.png) [@axyd80](https://www.ruby-forum.com/u/axyd80)\
**Post date:** [April 1, 2008, 4:05pm UTC](https://www.ruby-forum.com/t/simple-and-stable-web-server-is-there-any/133541/7 "2008-04-01T16:05:00Z")

</div>

On 1 Apr 2008, at 13:15, Alexey P. 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:

> **[The Flexible Thin Anorexic Gymnast that Democratized Deployment](https://macournoyer.wordpress.com/2008/02/09/the-flexible-thin-anorexic-gymnast-that-democratized-deployment/)**
>
> Thin is fast, I don’t think I need to prove that again. But what I’d like to showcase now is Thin extensibility. Most of it is due to Thin being based on Rack. It’s also why lots …

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

HTH
