Why create web servers?

Hi,

Im just starting to get my feet wet with Ruby amd im having trouble
understanding why someone would want to implement there own web server.

I know theres a WEBrick object and a few others out there that allow you
to create web servers with ease, but why would anyone want to do that
when theres stable and fully featured servers already out there?

Sorry for posting this here, I dont really see this as a rails question.

On 11/7/06, CatLady [] [email protected] wrote:

theres stable and fully featured servers already out there

This piece here is a statement that not everyone agrees with.

http://en.wikipedia.org/wiki/Web_server

Wilson B. wrote:

On 11/7/06, CatLady [] [email protected] wrote:

theres stable and fully featured servers already out there

This piece here is a statement that not everyone agrees with.

Great answer Wilson

I don’t think it was criticism on CatLady’s part. I think she’s
just wondering how it could be that there’s a market for such
a thing. Like her, I would assume that not too many people
would even consider such a task. The fact that WEBrick exists
implies that lots of people are interested in creating web servers,
and that’s what spawned the question (that’s my guess…)

-Matt

On 06-11-07, at 22:26, CatLady [] wrote:

Hi,

Im just starting to get my feet wet with Ruby amd im having trouble
understanding why someone would want to implement there own web
server.

I know theres a WEBrick object and a few others out there that
allow you
to create web servers with ease, but why would anyone want to do that
when theres stable and fully featured servers already out there?

Why would you ever want to implement almost anything then? It’s
surely all been done before. Quite simply, either the existing
products don’t mesh well with peoples goals, they just want to learn
how to build something like a web server, ease of integration into
their application (though this kinda fits in with my first point), or
hell, every now and then you need to just re-invent the wheel; if for
no other reason than to kill some time.

Surely, you’ve re-invented the wheel at some point in your life,
don’t be so quick to criticize.

I dont have a problem with the fun part :slight_smile:

Thanks Alex

Hi

CatLady [] wrote:

I know theres a WEBrick object and a few others out there that allow you
to create web servers with ease, but why would anyone want to do that
when theres stable and fully featured servers already out there?

A few possibilities:

  1. Because WEBrick comes with the standard library, it means other
    libraries can rely on it being there. For example, it’s used very
    effectively by rubygems to create a local documentation server.

  2. There’s situations where configurability and integration with Ruby is
    more important than performance or features. Rail’s use of WEBrick as a
    local testing server is an example of this (as well as of 1)).

  3. Performance or footprint might matter more than features. So you get
    specialised servers like mongrel, squid or lighthttpd.

  4. You might be interested in writing a custom protocol server. WEBrick
    is handy reference code for how to write a server for a well-documented,
    well-understood protocol.

  5. It might be fun to write a webserver.

Sorry for posting this here, I dont really see this as a rails question.

Don’t be sorry, it’s a good question and welcome here.

Alex

???

If you’re just looking for a use case, Google “mousehole”.

(Don’t stare at it – you’ll go blind.)

Devin

Il giorno 08/nov/06, alle ore 04:26, CatLady [] ha scritto:

Hi,

Im just starting to get my feet wet with Ruby amd im having trouble
understanding why someone would want to implement there own web
server.

I know theres a WEBrick object and a few others out there that
allow you
to create web servers with ease, but why would anyone want to do that
when theres stable and fully featured servers already out there?

You could want (as I do) to develop Rails applications on your
desktop box without installing and running an overkill webserver just
for that purpose.
You could need (as I do) a quick and clean way to install a webdav
server on a unix box where you don’t have root access (or you don’t
want to mess with the existent production web server), I get a
headache just thinking about installing Apache2 with PREFIX=~…

I’m sure many people out there have other reasons :slight_smile:

Sorry for posting this here, I dont really see this as a rails
question.

Well, I guess this is the right ML :slight_smile:

On 11/8/06, Wilson B. [email protected] wrote:

On 11/7/06, CatLady [] [email protected] wrote:

theres stable and fully featured servers already out there

This piece here is a statement that not everyone agrees with.

Might you have the kindness to indicate a single example of a statement
everyone agrees with?

Sorry folks couldn’t resist.

Robert


The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all progress
depends on the unreasonable man.

  • George Bernard Shaw

CatLady [] wrote:

Getting WEBrick to serve HTML is only about umpty times easier to get
Apache to serve Ruby. Of the reasons mentioned before, the Ruby
integration is by far the most valuable. WEBrick is mostly a development
server, not a production server - you don’t need “full-featured”, you
don’t need fast, nor a lot of other things. The advantage is that it
makes it trivially easy to launch said webserver from Ruby code, and
that it’s trivially easy to run arbitrary Ruby code as part of operation
of the webserver.

You’ll find that in fact, languages used for web programming -very-
often have webservers written in those precisely for the ease of
integration - Java has way too many servlet containers to mention (all
of which implement HTTP), Python has CherryPy (first one to come to
mind), Perl also probably has tons of those. They tend to make showing
results of code in the respective language just so much more
instantaneous that their existence is justified.

David V.

On 11/9/06, Robert D. [email protected] wrote:

Sorry folks couldn’t resist.
I just thought of one: Vim is better than Emacs.

On 09/nov/06, at 17:54, Wilson B. wrote:

I just thought of one: Vim is better than Emacs.

Yes, but just if you need a soap powder.

http://www.spesaonline.com/SOL/storefront.asp?
fromURL=TD&toURL=product.asp&catalog_name=Assortimento
+Milano&category_name=Piccole%20superfici&product_id=041310

On 11/9/06, Wilson B. [email protected] wrote:

Sorry folks couldn’t resist.

I just thought of one: Vim is better than Emacs.

As I formal proof of the incorrectness of this statement please ask
Richard :wink:


The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all progress
depends on the unreasonable man.

  • George Bernard Shaw

Robert D. wrote:

Sorry folks couldn’t resist.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

You yourself provided the example.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs