1. 5
    1. 3

      Haskell offers the best of both worlds here; there’s easy access to concurrency and parallelism as distinct concepts in the language/library with differing scheduling schemes; though both run on an n:m scheduler. This allows you to easily write stupidly concurrent applications using threads with the performance of event based systems running on multiple cores. For an example, the Nettle SDN controller is the world’s fastest, able to handle 20 million requests per second with 10ms latency on comodity hardware (beefy hardware, but standard in this sort of space).

      We also show that with Mio, McNettle (an SDN controller written in Haskell) can scale effectively to 40+ cores, reach a thoroughput of over 20 million new requests per second on a single machine, and hence become the fastest of all existing SDN controllers. [1]

      The results of this work are now available in GHC 7.8, though the previous IO manager was no slouch either.

      For those interested in the topic of concurrency and parallelism in Haskell, Simon Marlow’s book [2] is excellent at describing the what and how of both aspects, and how they’re implemented. The book is free to read online through that link too.

      [1] http://haskell.cs.yale.edu/wp-content/uploads/2013/08/hask035-voellmy.pdf [2] http://chimera.labs.oreilly.com/books/1230000000929

    2. 1

      Clojure also has both of these: when you want concurrency, you have N:M threading using the clojure.core.async library, which lets you write tasks that are compiled to lightweight coroutine-based state machines. When you want parallelism, you have clojure.core.reducers, which lets you leverage fork-join parallelism for collection processing.