title: Difference between proactor pattern and synchronous model in web server
body: <p>In synchronous model, when a client connects to the server, both the client and server have to sync with each other to finish some operations. </p>
  
  <p>Meanwhile, the asynchronous model allows client and server to work separated and independently. The client sends a request to establish a connection and do something. While the server is processing the request, the client can do something else. Upon completion of an operation, the completion event is placed onto a queue in an Event Demultiplexer, waiting for a Proactor (such as HTTP Handler) to send the request back and invoke a Completion Handler (on the client). The terms are used as in boost::asio document <a href="http://www.boost.org/doc/libs/1_47_0/doc/html/boost_asio/overview/core/async.html">The Proactor Design Pattern: Concurrency Without Threads</a>.</p>
  
  <p>By working this way, the asynchronous model can accepts simultaneous connections without having to create a thread per connection, thus improve overall performance. In order to achieve the same effect as asynchronous model, the first model (synchronous) must be multi-threaded. For more detail, refer to: <a href="http://www.google.com/url?sa=t&amp;source=web&amp;cd=1&amp;sqi=2&amp;ved=0CBsQFjAA&amp;url=http://www.cs.wustl.edu/~schmidt/PDF/proactor.pdf&amp;rct=j&amp;q=proactor%20pattern&amp;ei=iE6MTredOuiViQfmv5XmBw&amp;usg=AFQjCNFoNeWioIF2nqgsmIsjIi403tXOhQ&amp;sig2=vrccRX1YLUI_nDv0addKcw&amp;cad=rja">Proactor Pattern</a> (I actually learn proactor pattern which is used to asynchronous model from that document. In here it has description on a typical synchronous I/O web server).</p>
  
  <p>Is my understanding on the subject correct? If so, which means the asynchronous server can accepts request and return results asynchronously (the first connection request the service on web server does not need to be the first to reply to)? In essence, asynchronous model does not use threading (or threading is used in individual components, such as in the Proactor, Asynchronous Event Multiplexer (boost::asio document) component, not by creating an entire client-server application stack, which is describe in the multi-threaded model in Proactor Pattern document, section 2.2 - <strong>Common Traps and Pitfalls of Conventional Concurrency Models</strong>). </p>