Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have across a thread mentioning that Erlang would not be suited for a web application serving files.

I was curious whether anyone had any experience building such webservice with erlang? Would Haskell be more suited for this, if so how ?

share|improve this question

closed as not constructive by Martijn Pieters, Glenn Nelson, Dynamic, Walter, ChrisF Feb 9 '13 at 23:47

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

"Is a car better than a truck to take a shower?" –  Florian Margaine Feb 9 '13 at 15:35
depends if you need to get from A to Z while taking the shower –  Alexander Koch Feb 9 '13 at 15:50
@FlorianMargaine: what makes you think either Erlang or Haskell would be unsuitable for web programming? –  tdammers Feb 9 '13 at 20:07
@FlorianMargaine Both languages are perfectly suitable for web programming, so I don't get your point. –  Andres F. Feb 9 '13 at 20:19
"Web application serving files". I'm sorry, but this falls off as a web server, not web programming. –  Florian Margaine Feb 9 '13 at 20:39
add comment

1 Answer

up vote 2 down vote accepted

I don't have much experience with Erlang, but I know that Haskell is very well suited to making a simple web server. Take a look at Warp[PDF], a Haskell web server. It has very good performance, and should be easy to configure for serving static files. There is already a package called warp-static that is set up for serving files already; you can look at the source to get a good idea of what it takes.

I think Haskell will likely have better performance than Erlang for this sort of task, especially with Haskell's new (as of GHC 7.0) IO manager. Then it has the usual other advantages over Erlang like the type system, nice syntax, functional purity and so on.

As an aside, if you want Erlang-like distributed concurrency, take a look at Cloud Haskell. It's a system for writing distributed programs in Haskell that is very heavily influenced by Erlang.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.