CppCon 2018: R. Leahy “The Networking TS in Practice: Testable, Composable Asynchronous I/O in C++”

preview_player
Показать описание
Robert Leahy “The Networking TS in Practice: Testable, Composable Asynchronous I/O in C++”


As the ISO Standard C++ Networking TS nears inclusion in C++20, Boost Asio, its foundation, has been available for some time; but in-depth coverage of how to use it is sparse. Asio’s own documentation, while thorough and detailed, is far from prescriptive, and offers few footholds for the beginner seeking to use and extend Asio in components of a larger software architecture. How can a library use Asio, or the TS, adding value and simplicity for users without hiding its power or sacrificing performance?

This talk provides all the context and prescriptive guidance required to get started building software components based on Asio and the Networking TS, ripe for reuse and composition. It covers in detail the guarantees Asio offers, and the patterns Asio uses: Why they are important, how to use and extend them, and how to present them to users of your components. It further demonstrates patterns and practices for constructing testable Asio- and Networking TS-based components.

The talk also includes an overview of how the Networking TS is evolving on its way to inclusion in the Standard, becoming more general and integrating with other Standard Library features, particularly the Parallelism TS and its executors, so that come C++20 your libraries will be ready to pivot from Asio to the Standard painlessly.

Robert Leahy, Maystreet LLC
Software Engineer

A graduate of the University of Victoria where he specialized in graphics, gaming, and digital geometry processing he spent 4.5 years in full stack web development before switching to develop infrastructure software for high frequency trading in early 2016 where he's focused on improving code quality and developer productivity while continuing to deliver and exceed performance needs and expectations.

*-----*
Рекомендации по теме
Комментарии
Автор

FANTASTIC presentation. At first, I thought he was going to be a bit stiff, but it soon became evident that this guy is all business and serious about teaching the audience. It was great that he didn't allow questions to slow down the presentation or take it off topic, as so many others do. I loved it. Probably one of the all-time best CppCon topics.

bimmerboard
Автор

Great talk. Can't wait to try this out in 5 years!

iddn
Автор

Very useful and practical and good speaker.

mrlithium
Автор

I do enjoy his style of speaking. Makes it easy to follow and pay attention

Dargaaz
Автор

So much content in this talk. Need to go back and rewatch a couple more times.

etorrie
Автор

The more recordings I watch, the more I regret that I was not at the conference. Great talk!

simfoo
Автор

It would be nice to extend the IO model to other IO types.

zhaoli
Автор

As awesome as the presentation was, this talk confused me more, than what I already knew about the Networking TS. It's own style of thinking. I'm used to synchronous or concurrent, but this is a model I yet have to grasp.

OperationDarkside
Автор

I've been testing similar code with the standalone asio, and I do think there is a bit of hand waving that happened during the mock_async_stream section for testing the async code.

Robert correctly notes that the completion handler for the stream won't be called until the io_context is polled, but the synchronous code inside the write_some function is executed as soon as async_write is called on that stream.

One might have expected that you could chain multiple async_writes together, with none of the buffers being written to until the io_context is polled, but really they are executing immediately. The fact that an io_context is used for the executor doesn't actually prevent work from being done until the io_context is polled.

loomismeister
Автор

I don't get why async_wait_then_write is a free function and not a member function. Can someone please explain?

lefteriseleftheriades
Автор

I created a reactor asio (no boost only pure standard cpp17) from scratch 2 years ago and proactor pattern 1 year ago with working http, tls and other protocols pending support. Works on mac, windows and linux and uses cpp17. Curious if somebody will be interested to hire me for this? Thank you for reading

beaujamo