Christopher Kohlhoff: Thinking Asynchronously: Designing Applications with Boost.Asio

CppNow · 27K views · 2013 · 1:32:29

Open on YouTube

C, C++, Rust, Go & systems languagesSoftware architecture & designNetworking & internet infrastructuretalk

Why Stack Overflow recommends it

Stack Overflow users link it when answering Boost.Asio questions, since the library's own author explains composed operations and strands, and it works as a learning resource beyond the official docs.

Recommended by 3 people across 3 different months, 2012 to 2016.

What it is

A BoostCon/C++Now talk by Christopher Kohlhoff, the author of Boost.Asio, on how to design applications with an asynchronous mindset. It covers alternative designs, common pitfalls, composed operations, strands, and performance and scalability tools. It assumes basic familiarity with Asio.

What people said

Recommends Ghita · 2012-02 · Stack Overflow · on “Best documentation for Boost:asio?”

I came along to 3 videos that I've found helpful once you get past the official boost asio overview: Thinking asynchronously - designing applications with asio [this video] Are you ready for ipv6 [LINK] Why c-0x is the awesomest language for network programming [LINK] And Thinking asynchronously slides [LINK] Are you ready for ipv6 slides [LINK] Why c-0x is the awesomest language for network programming slides [LINK]

Recommends Vikas · 2012-10 · Stack Overflow · on “Why do I need strand per connection when using boost::asio?”

I believe it is because the composed operation async_write [LINK] . async_write is composed of multiple socket::async_write_some [LINK] asynchronously. Strand is helpful to serialize those operations. Chris Kohlhoff, the author of asio, talks about it briefly in his boostcon talk [this video] at around 1:17.

Recommends David Schwartz · 2016-03 · Stack Overflow · on “asio::async_write and strand”

Listen to the author of ASIO. Listen from 1:18:00 to 1:18:50 [this video] as he explicitly states that the strand protects the internal composed operations and thus all the structures associated with the stream and the connection. This allows the whole connection and all its associated state to act as if it was single threaded.