Difference between synchronous (proactor pattern) and synchronous model in web server

Discussion in 'C Programming' started by Rickert, Oct 6, 2011.

  1. Rickert

    Rickert

    Joined:
    Oct 6, 2011
    Messages:
    1
    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.
    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 The Proactor Design Pattern: Concurrency Without Threads.

    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: Proactor Pattern (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).

    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 - Common Traps and Pitfalls of Conventional Concurrency Models).
    Rickert, Oct 6, 2011
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jakk
    Replies:
    4
    Views:
    12,113
  2. ckyz
    Replies:
    0
    Views:
    4,531
  3. BIG BOY
    Replies:
    13
    Views:
    36,810
    manoj212077
    Sep 19, 2009
  4. John
    Replies:
    1
    Views:
    336
    Richard Senior
    Apr 27, 2007
  5. Christopher

    Proactor

    Christopher, Nov 2, 2011, in forum: C++
    Replies:
    2
    Views:
    254
    Christopher
    Nov 3, 2011
Loading...

Share This Page