[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Why create web servers?

Vince Panuccio

11/8/2006 3:26:00 AM

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.

--
Posted via http://www.ruby-....

13 Answers

Wilson Bilkovich

11/8/2006 3:30:00 AM

0

On 11/7/06, CatLady [] <totalharmonicdistortion@hotmail.com> wrote:
> theres stable and fully featured servers already out there

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

x1

11/8/2006 3:32:00 AM

0

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

On 11/7/06, CatLady [] <totalharmonicdistortion@hotmail.com> 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?
>
> Sorry for posting this here, I dont really see this as a rails question.
>
> --
> Posted via http://www.ruby-....
>
>

Vince Panuccio

11/8/2006 3:45:00 AM

0

Wilson Bilkovich wrote:
> On 11/7/06, CatLady [] <totalharmonicdistortion@hotmail.com> wrote:
>> theres stable and fully featured servers already out there
>
> This piece here is a statement that not everyone agrees with.

Great answer Wilson

--
Posted via http://www.ruby-....

Jeremy Tregunna

11/8/2006 3:56:00 AM

0


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.

--
Jeremy Tregunna
jtregunna@blurgle.ca



Chilkat Software

11/8/2006 4:13:00 AM

0


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


At 09:56 PM 11/7/2006, you wrote:


>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.
>
>--
>Jeremy Tregunna
>jtregunna@blurgle.ca
>
>
>
>
>
>
>--
>No virus found in this incoming message.
>Checked by AVG Free Edition.
>Version: 7.1.409 / Virus Database: 268.13.31/522 - Release Date: 11/7/2006


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.13.31/522 - Release Date: 11/7/2006



Alex Fenton

11/8/2006 5:04:00 AM

0

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

Vince Panuccio

11/8/2006 6:03:00 AM

0

I dont have a problem with the fun part :-)

Thanks Alex

--
Posted via http://www.ruby-....

Devin Mullins

11/8/2006 6:15:00 AM

0

???

If you're just looking for a use case, Google "mousehole".

(Don't stare at it -- you'll go blind.)

Devin

Gabriele Marrone

11/8/2006 12:53:00 PM

0


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 :)

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

Well, I guess this is the right ML :)

--
Gabriele Marrone


David Vallner

11/8/2006 11:01:00 PM

0

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?
>
> Sorry for posting this here, I dont really see this as a rails question.
>

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 Vallner