3 ms·
Vert.x ( http://vertx.io/ http://vertx.io/ ) is an interesting point in this discussion that was released after the paper was written. It uses the async reactor
by RyanZAG 11y ago
Vert.x ( http://vertx.io/ http://vertx.io/ ) is an interesting point in this discussion that was released after the paper was written. It uses the async reactor pattern, but allows multiple reactors to run - 1 per CPU core. It also handles events and state so that each unit runs only within a single thread which completely eliminates the need to worry about threat synchronization. Basically a multithreaded node.js engine. Along with using javascript or Java8 lambdas and promises, it makes for very nice code.
The async style also allows for faster code in fairly typical web server cases. Consider a request that needs to do an HTTP lookup and 3 database calls. In a blocking I/O case, this needs a memory heavy thread and each I/O operation must be done sequentially even if we need the result from all 4 operations to give the result. With async I/O, we can send off all 4 operations without requiring the memory usage of a thread, and all 4 operations complete much faster as they run in parallel.