3 ms·
Can attest to Haskell and Snap being excellent for small web services where you need a boost - especially when concurrency is involved. Wrote two small service
by bobfunk 16y ago
Can attest to Haskell and Snap being excellent for small web services where you need a boost - especially when concurrency is involved.
Wrote two small services for http://www.webpop.com http://www.webpop.com in Haskell, both based on Snap. One for dynamically resizing images on the fly and one for handling uploads of large files and streaming them straight to Cloudfiles.
In both cases I started by trying node.js (both cases deals with either fetching or sending files from Cloudfiles so IO operations is what takes time) since the problems seemed very suited for node's eventloop model. In both cases node.js really disappointed.
Ended up giving Snap a try and got really surprised at just how well it worked. Performance is amazing, it's not much more code than the node.js version and theres no endless nesting of callbacks. It handles high levels of concurrency incredibly well and both services ended up using around 8MB of memory each - even under load...
Main problem is the lack of libraries that you tend to take for granted in more webby languages, and obviously the learning curve is pretty steep (but also very rewarding).