Tokio is a Rust framework for developing applications which perform asynchronous I/O — an event-driven approach that can often achieve better scalability, performance, and resource usage than conventional synchronous I/O. Unfortunately, Tokio is notoriously difficult to learn due to its sophisticated abstractions. Even after reading the tutorials, I didn't feel that I had internalized the abstractions sufficiently to be able to reason about what was actually happening.
My prior experience with asynchronous I/O programming may have even
hindered my Tokio education. I'm accustomed to using the operating
system's selection facility (e.g. Linux epoll) as a starting point, and
then moving on to dispatch, state machines, and so forth. Starting with
the Tokio abstractions with no clear insight into where and how the
underlying epoll_wait() happens, I found it difficult to
connect all the dots. Tokio and its future-driven approach felt like
something of a black box.
posted at 2017-12-18 06:35:38 MST
by David Simmons
tags: rust tokio io
