[libdispatch-dev] GCD MPM for Apache
Robert N. M. Watson
robert at fledge.watson.org
Tue May 11 11:48:06 PDT 2010
I'm pleased to announce a new GCD-related software project, a GCD MPM for Apache. Apache Multi-Processing Modules (MPMs) allow operating systems to provide execution and concurrency structure to Apache: processes, threads, event management primitives, etc. It is intended to illustrate both GCD's programming model and programmability benefits, as well as how GCD can be integrated into a existing large-scale and thread-aware application. A quick skim of the code will bring to light some of its key benefits: a work model integrated with the GCD concurrency framework avoids complex utility libraries to distribute work and manage concurrency, and the integration of C Blocks into the programming language avoids the complexity-overhead of a message passing model. The GCD MPM is experimental and illustrative, but we hope it will also be useful in the future!
The patch and instructions for applying it can be found on the Mac OS X forge web page:
In the GCD MPM, connections are associated with dispatch queues, which enforce ordered processing of a connection, but allows connections to float across actual OS-provided threads via GCD. The web page says more about the approach, but one interesting observation is that the implementation is around 950 lines of code, vs. the threaded models which come in 1.6x-3x the number of lines.
Thanks to Apple for their support of this project!
University of Cambridge
More information about the libdispatch-dev