in reply to Where is concurrency going? Is Perl going there?

While I don't pretend to understand much about it, a couple of weeks ago in the CB, TimToady linked to an article about unifying events and lightweight threads as the probable future of concurrency in Perl6. It makes for an interesting read.

From the paper "Combining Events and Threads for Scalable Network Services (PDF) --- Implementation and evaluation of monadic, application-level concurrency primitives", by Peng Li and Steve Zdancewic, 2007 :

This paper proposes to combine two seemingly opposed programming models for building massively concurrent network services: the event-driven model and the multithreaded model. The result is a hybrid design that offers the best of both worlds—the ease of use and expressiveness of threads and the flexibility and performance of events.
This paper shows how the hybrid model can be implemented entirely at the application level using concurrency monads in Haskell, which provides type-safe abstractions for both events and threads. This approach simplifies the development of massively concurrent software in a way that scales to real-world network services. The Haskell implementation supports exceptions, symmetrical multiprocessing, software transactional memory, asynchronous I/O mechanisms and application-level network protocol stacks. Experimental results demonstrate that this monad-based approach has good performance: the threads are extremely lightweight (scaling to ten million threads), and the I/O performance compares favorably to that of Linux NPTL.

Clint

  • Comment on Re: Where is concurrency going? Is Perl going there?