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 ?
5
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.