Subject: Re: [Boost-bugs] [Boost C++ Libraries] #2832: Asio sync IO functions need timeout parameters
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-01-17 13:27:16
#2832: Asio sync IO functions need timeout parameters
-----------------------------------------------------+----------------------
Reporter: Stephan Menzel <stephan.menzel@â¦> | Owner: chris_kohlhoff
Type: Bugs | Status: closed
Milestone: Boost 1.39.0 | Component: asio
Version: Boost 1.38.0 | Severity: Problem
Resolution: wontfix | Keywords:
-----------------------------------------------------+----------------------
Comment (by Stephan Menzel):
Well, things have been quiet around here and I would like to add a few
words since so many of you have commented here.
I have reconsidered my original opinion. I believe now it was part wishful
thinking and part misconception of what asio is. I have been using boost
for a long time now and I remember, in the first of those years I often
thought: All this is great but what's seriously missing here is
networking. No matter how much boost principles, types and libs were
weaved into every part of my software I was always forced to drop out and
become platform dependent or DIY when it came to networking. And I
happened to do most of my work with networks. So when I stumbled across
the first versions of asio (not part of boost then) I was excited and
adopted early on. Later, it would become part of boost and I thought:
Finally! Boost has gotten its networking! And this is how I thought about
boost.asio, leading me to above statements. And yet, this was wrong. It
has always been and still is "ASIO" as in "asynchronous IO" and not
boost.network or whatever. So Chris suggesting to be asynchronous whenever
this topic came up was right from his perspective. When you wanna do async
io, you may choose this but when you wanna do generic networking sync and
async, asio probably ain't what you are looking for. Sadly, this would
imply that boost still lacks generic networking but I wouldn't go this
far. There have been efforts with cpp-netlib but I don't really see that
happening. As a result of this ticket here I have reduced the extent of
asio's usage in my projects. Away from "using asio and its types whenever
it comes to networking" to "using ASIO behind the hood when it comes to
asychronous operations". In this regard, ASIO is still an awesome lib.
Nowadays, I mostly use the io_service class directly for thread
multiplexing and de-multiplexing. It never let me down and is well
documented. A little networking now and then but not as much as I used to.
I now often go native for that. I still believe that in the brutish
realities of commercial software development it is not option to simply
expect to go asynchronous everywhere. Large scale legacy products need
refurbishing and maintenance, blocking third party calls will force
constraints on your architecture as well as decisions made in the past
that may be gradually changed towards an asynch architecture but rarely in
one big haul. So exitsing synchronous parts and components will still need
to have their place and pure async is certainly not the answer to
everything.
So after all I'm OK with asio not implementing those timeouts. I still
believe the sync operations are useless without it but I respect the "a"
in "asio" and don't have to use it. Let's see if cpp-netlib or anything
like that make it into boost eventually. Would still be good to have sync
and async networking in one go. As for asio, it became such an important
part of all I do with threads and actions and such... Wouldn't miss it.
Stephan
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/2832#comment:16> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:11 UTC