3 ms·
Why wouldn't you write a web server backend in Haskell? What is more adequate than Haskell for web server backends and why? You give no support to the claim th
by codygman 13y ago
Why wouldn't you write a web server backend in Haskell? What is more adequate than Haskell for web server backends and why?
You give no support to the claim that "There are more adequate tools than Haskell for writing web server backends".
- freyrs3 13y agoI'm surprised by this statement as well, considering the rather remarkable performance that Warp server[1] has been able to achieve. Writing highly concurrent servers is arguably one of Haskell's biggest strength. 1: http://aosabook.org/en/posa/warp.html http://aosabook.org/en/posa/warp.html
- platz 13y agoWarp seems plenty fast, but still didn't seem to do as well as I'd hoped, in this particular example, I wonder if they're doing it wrong. http://www.techempower.com/benchmarks/ http://www.techempower.com/benchmarks/ https://github.com/TechEmpower/FrameworkBenchmarks/blob/master/wai/bench/wai.hs https://github.com/TechEmpower/FrameworkBenchmarks/blob/mast...
- codygman 13y agoWarp didn't do as well I had hoped either. Keep an eye on the next tech empower web benchmark though because ghc 7.8 and mio made a lot of stuff faster.
- jonnybgood 13y agoThe JVM, for one. The JVM far exceeds Haskell in this regard. Superior libraries and equal if not better performance. I didn't say you couldn't, but for production purposes if I had to choose.
- codygman 13y agoDefine superior. Making such bold claims without any proof/examples is very poor form.
- danieldk 13y agoSuperior is indeed difficult to define. I think most Haskell libraries define far more elegant abstractions than their Java counterparts. However, as a user of both Haskell and the JVM, there are some things to be said for the Java library ecosystem. For instance, the most widely-used Java libraries are often more mature, maintained better (usually because its authors are paid to do so), and more API-stable (for most of my Haskell code, a dependency version bump usually implies updating my own code). Of course, this is all reasonable, since the Haskell ecosystem exploded far more recently than Java's. The older Haskell pages (bytestring, text, vector) tend to be very stable and predictable. Another aspect where the JVM is currently ahead is VM monitoring. E.g. if there is a bottleneck, I can easily attach Visual VM or even my IDE to a running Tomcat and peek around. The JVM can do code hotswap (even more effectively with JRebel and LiveRebel). Note: I posted this to provide some balance to the discussion. I believe Haskell is superior in many other respects, such as the type system, REPL-driven development, web frameworks with type-safe URLSs, etc.
- rtpg 13y agoJVM might have superior libraries (though I think that is debatable) but Haskell's performance is pretty top notch. If any compiler is approaching the sufficiently smart compiler, it's the GHC