Why create web servers?

C

CatLady []

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

Jeremy Tregunna

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

Chilkat Software

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

Alex Fenton

Hi
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
 
D

Devin Mullins

???

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

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

Devin
 
G

Gabriele Marrone

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

David Vallner

--------------enigD9872AA7AD15A125D1159F77
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Hi,
=20
Im just starting to get my feet wet with Ruby amd im having trouble=20
understanding why someone would want to implement there own web server.=
=20
I know theres a WEBrick object and a few others out there that allow yo= u=20
to create web servers with ease, but why would anyone want to do that=20
when theres stable and fully featured servers already out there?
=20
Sorry for posting this here, I dont really see this as a rails question= =2E
=20

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


--------------enigD9872AA7AD15A125D1159F77
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)

iD8DBQFFUmGxy6MhrS8astoRAsVBAJsHL311WBU/Yo0hXtksz3HV6cltowCfRNx3
035x20SX9AGZIXuzXuZjUmg=
=hogn
-----END PGP SIGNATURE-----

--------------enigD9872AA7AD15A125D1159F77--
 
W

Wilson Bilkovich

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

Sorry folks couldn't resist.

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top