본문 바로가기

프로그램언어/boost

[ Boost ] boost::asio Part2

Boost 목록
 

링크 : http://tingcobell.tistory.com/295

p.s 참 내용이 어렵네요..ㅠ_ㅠ


이해돕기
링크 : http://serverprogramminggem.springnote.com/pages/3912089 




The Proactor Design Pattern: Concurrency Without Thread

boost.asio 라이브러리는 side-by-side 동기/비동기 동작을 제공하고 있습니다. 
Proactor design pattern [ POSA2 ]에 기본적으로 비동기에 제공되고 있습니다.
(제가 가지고 있는 책이라 생각해서 열심히 찾아봤는데 POSA1이였네요..ㅠ_ㅠ)


Proactor and Boost.asio

boost.asio 에서  the Proactor Design pattern 실행되는 것을 보여주고 있는 그림입니다.


 Proactor design pattern (adapted from [POSA2]) 

— Asynchronous Operation

Defines an operation that is executed asynchronously, such as an asynchronous read or write on a socket.

— Asynchronous Operation Processor

Executes asynchronous operations and queues events on a completion event queue when operations complete. From a high-level point of view, services likestream_socket_service are asynchronous operation processors.

— Completion Event Queue

Buffers completion events until they are dequeued by an asynchronous event demultiplexer.

— Completion Handler

Processes the result of an asynchronous operation. These are function objects, often created using boost::bind.

— Asynchronous Event Demultiplexer

Blocks waiting for events to occur on the completion event queue, and returns a completed event to its caller.

— Proactor

Calls the asynchronous event demultiplexer to dequeue events, and dispatches the completion handler (i.e. invokes the function object) associated with the event. This abstraction is represented by the io_service class.

— Initiator

Application-specific code that starts asynchronous operations. The initiator interacts with an asynchronous operation processor via a high-level interface such asbasic_stream_socket, which in turn delegates to a service like stream_socket_service.





'프로그램언어 > boost' 카테고리의 다른 글

[ boost ] boost.asio.buffer #1  (0) 2011.05.19
[ Boost ] boost::asio Part1.  (0) 2011.05.13
[ Boost ] boost::bind Part2  (0) 2011.05.12
[ Boost ] Boost::bind #1  (0) 2011.05.12
[ Boost ] Boost::thread #4  (0) 2011.05.12