in reply to Time to write a "serious" http server in Perl?

So - is it time to write a "serious" http server in Perl?

Writing an HTTP server in Perl doesn't magically solve any of the problem you perceive Apache 2 has.

Personally, if I wanted to write a small webserver that does a very specific thing, and it wouldn't have to handle a huge load, I'd write it in Perl. If I were to write a general purpose webserver having to handle a huge load, rival Apache2 and even implement more, the only language I'd consider using is C.

  • Comment on Re: Time to write a "serious" http server in Perl?

Replies are listed 'Best First'.
Re^2: Time to write a "serious" http server in Perl?
by jdrago_999 (Hermit) on Aug 11, 2008 at 15:49 UTC
    Perhaps writing another niche-focus http server would be the way to go.

    An http server that does what I want, and nothing more. I suppose only testing will show me the weaknesses in any approach I choose to take with this.
Re^2: Time to write a "serious" http server in Perl?
by dragonchild (Archbishop) on Aug 13, 2008 at 01:16 UTC
    Have you considered Erlang - yaws is written in it and seems to have very interesting initial performance statistics. While not as fast as C, it scales much better than C ever possibly could.

    My criteria for good software:
    1. Does it work?
    2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
      Considering that most (Unix) OSses are written in C, it would be irrelevant for a language to scale better than C ever could. Because if such a statement is true, it wouldn't help whatever application was written in Erlang, it couldn't display its superiour scalability - the limitations of the OS kick in.
        Considering that most (Unix) OSses are written in C, it would be irrelevant for a language to scale better than C ever could.

        Nonsense. A Unix-like OS is an opinionated, general purpose operating system intended to run a wide variety of applications equally well. A well-designed application tuned for a specific purpose written in an appropriate language may outperform a generic application written in C. Go look at the language used for the best FFT libraries on your system; I bet there's Fortran involved. Then look at some of the compile-time optimizations you get in languages where explicit or even implicit purity by default allows for automatic memoization and expression elimination. Throw in automatic parallelization, and you can beat C in terms of performance, scalability, and ease of development.

        If you're discussing a single machine, sure. However, Erlang's major claim to fame is that it scales (nearly) effortlessly across a cluster of machines and does so for (nearly) anything written in it. And it does so with fault tolerance, load balancing, and failover built into the VM. Given that I haven't built a production system that had only one machine for any given part of the application stack, this sounds rather appealing, don't you think?

        My criteria for good software:
        1. Does it work?
        2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?
Re^2: Time to write a "serious" http server in Perl?
by Anonymous Monk on Aug 11, 2008 at 09:20 UTC
    the only language I'd consider using is C
    Is that because you don't know C++ or even D?
      All I know about D is that it isn't supported widely enough to consider it for a large scale project that should run on a large number of platforms. (I assume you are talking about D and not D or D.)

      And I know enough C++ to not consider it.

        But why wouldn't you consider C++?

        And why not Java (sorry, couldn't resist that one) ?