Project introduction:

This project uses a language-based technique to unify two seemingly opposite programming models for building massively concurrent network services: the event-driven model and the multithreaded model.  The result is a unified concurrency model providing both thread abstractions and event abstractions.  We implemented the unified concurrency model in Haskell, a pure, lazy, functional programming language.

Our implementation demonstrates how to use these techniques by building an application-level thread library with support for multiprocessing and asynchronous I/O mechanisms in Linux.  The thread library is type-safe, is relatively simple to implement, and has good performance.  Application-level threads are extremely lightweight (scaling to 10,000,000 threads!) and our scheduler, which is implemented as a modular and extensible event-driven system, outperforms NPTL in I/O benchmarks.

Documentation:

"Combining Events and Threads for Scalable Network Services --- Implementation and evaluation of monadic, application-level concurrency primitives", by Peng Li and Steve Zdancewic, 2007

Software:

The source code package can be downloaded here. It contains the application-level thread library, a simple web server and a HTTP load generator.  For more information, see the READ_ME file.

To compile and run the source code, you will need the Linux 2.6 kernel, GHC 6.6, and the Linux asynchronous I/O library (libaio).

This material is based upon work supported by the National Science Foundation under Grant No. 0541040.