Concurrency

software-development

Multiple processes
Multiple threads
Event Loop

http://www.playframework.com/
http://nodejs.org/
http://twistedmatrix.com/trac/

http://engineering.linkedin.com/play/play-framework-async-io-without-thread-pool-and-callback-hell

Most developers are used to working with Threaded servers: they dedicate one thread to each request, and that thread does all the processing for the request until a response is sent. Any I/O, such as a call to a remote service, is typically synchronous, which means the thread will become blocked and sit around idle until the I/O completes.

By contrast, Evented servers typically use only a single thread per CPU core. The idea is to ensure that these scarce threads are never blocked: all I/O is asynchronous, so instead of waiting, the thread can process other requests, and only come back to the current one when the response from the I/O call is ready.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License