[Async-sig] Some thoughts on asynchronous API design in a post-async/await world

Glyph Lefkowitz glyph at twistedmatrix.com
Mon Nov 7 14:54:36 EST 2016


> On Nov 5, 2016, at 5:09 PM, Nathaniel Smith <njs at pobox.com> wrote:
> 
> I just posted a long blog/essay that's probably of interest to folks here:
> 
>  https://vorpus.org/blog/some-thoughts-on-asynchronous-api-design-in-a-post-asyncawait-world/
> 
> The short version: I think curio something important to teach us; I
> tried to figure out what that is and how we can learn from it.

I still haven't had time to read the whole thing yet (there's quite a lot to unpack here!) but I think that <https://github.com/twisted/tubes> might be of interest in examining ways to deal with backpressure that are more declarative; flows are set up ahead of time and then manipulated explicitly as flows, rather than relying on the imperative structure of pseudo-blocking in coroutines.

I should note that while Tubes's present implementation is Twisted-specific, the Twisted-specific bits are all around the edges of the system.  The core has been explicitly factored to be usable on any event-driven architecture, as long as you have a notion of backpressure and a way to ingest and send data.

-glyph


More information about the Async-sig mailing list