|
Boost : |
From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2005-12-14 18:01:56
"Peter Dimov" <pdimov_at_[hidden]> wrote
> Arkadiy Vertleyb wrote:
>
> > My problem with the current approach is that synchronous operations
> > seems to be viewed as second-class citizens. I understand that this
> > is caused by the fact that asio is about the asynchronous IO. But
> > asio is presented as the "best C++ networking library around", and in
> > networking both synchronous and asynchronous approaches are used, and
> > neither is superior for all possible cases.
> >
> > Consider "Patterns for concurrent and networked objecs" by D.
> > Schmidt, at al. Quite a few patterns described there are related to the
> > synchronous processing.
> >
> > I think a little refactoring might lead to a better solution than
> > trying to add synchronous operations on top of existing asio.
>
> I think that we should be careful not to break something that has been
> proven to work well because a little refactoring "might" lead to a better
> solution (unless the author agrees, of course.)
> The argument that asio is presented as "the best networking C++ library
> around" is not enough of an excuse.
Anything should be done only if the author agrees.
All I was trying to say is that, as a potential client of the library
(everybody does some networking now and then), I tried to map it to one of
the tasks I had in the past. I happen to have solved that task by using
synchronous operations + multiple threads (maybe because it is the most
intuitive way for a not very experienced network programmer, which I am, but
I still doubt very much that asynchronous approach would have been better).
So, when I am evaluating a "Networking Library", and see that it clearly
consideres one approach to networking inferior to the other one, and I think
they both are equaly important, that means that I am in fundamental
disagreement with the library author on the subject, and makes me wonder
whether this is the networking library I would like to see in Boost.
Besides nobody yet convinced me that socket should depend on demultiplexer.
The fact that it "has been proven to work well" is "not enough of an
excuse", IMO. Otherwise this review would not make any sense.
I totally appreciate the fact that the library has a lot of positive
reviews, and, as you say, proven to work well. All I want is that the
synchronous approach to networking was given enough attention, and added
cleanly rather than as a fast fix -- a wrapper around asynchronous stuff.
Regards,
Arkadiy
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk