Boost logo

Boost :

From: Michel André (michel.andre_at_[hidden])
Date: 2005-04-16 13:44:02


Boris wrote:
> Michel André wrote:
>
>>[...] Another slight mishap is that the things you call acceptor and
>>connector arent acceptors and connectors in the sense of the original
>>pattern (http://www.cs.wustl.edu/~schmidt/PDF/Acc-Con.pdf or POSA 2)
>>as I interpret it.
>
>
> I read the 17 pages for a better understanding. And I think you are right
> that we use different definitions. In the paper acceptor and connector are
> factories while in the class hierarchy at
> http://www.highscore.de/boost/net/basic.png they are an endpoint of a
> communication link. While I understand that the acceptor-connector pattern
> makes sense I think we should use it in a level > 0. If you look at the
> connector for example (in the acceptor-connector pattern) it is used to
> establish a connection and then passes over the connection to a service
> handler to do the processing. If level 0 should be similar to Berkeley
> sockets (and as far as I understand this is one goal of level 0) I don't
> know why the connector shouldn't be able to do the processing after the
> connection is established. In this level processing basically means calling
> read() and write(). A service handler in the acceptor-connector pattern is
> probably something bigger than a socket? Using the acceptor-connector
> pattern in level 0 would work but would also make the design more
> complicated as it should be to convince network programmers to switch over
> to the C++ network library.

It's all in a name ;) . Then I don't think they should be called
connector and acceptor in level 0 since I was associating it to the
patterns in POSA2 which I guess a lot of people are familiar with. And
if we are going to implement these in level 1 it might be confusing to
have the names with a different implementation in level0. I also think
there are a lot of good ideas to use from POSA2 and ACE.

The service handler is the implementation of the service and protocol
over a stream i.e http service handler for an web server that parses and
responds to http requests.

/Michel


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk