"Tubes": Create a composable, flow-control and back-pressure friendly way to arrange parsing, processing, and emitting data
|Reported by:||jknight||Owned by:||glyph|
|Cc:||glyph, exarkun, itamarst, radix, jknight, oubiwann, ashfall, twistedmatrix.com@…, tobias.oberstein@…, Julian+Twisted@…, free@…, daf@…||Branch:||
(diff, github, buildbot, log)
|Author:||ashfall, glyph||Launchpad Bug:|
Description (last modified by glyph)
The current producer/consumer API has a couple of problems:
- It's impossible to get notifications of buffer size changes, which is important for certain kinds of timeout logic. For example, if you buffer a bunch of output, and then time out if the peer is inactive (isn't reading any data), then you need to know not just when the buffer is empty but when some data is consumed.
- The streaming flag doesn't really make sense. It complicates the implementation of nested producers. While it doesn't actually break anything, it's just a bug. There's no reason to have it and it should be removed.
- It's awkward to chain producers and consumers with each other (XXX: this problem needs better documentation, use case, example of awkward code).
- IProtocol, ITransport, IProducer and IConsumer all have redundant "here's some data" / "there will be no more data" methods which are subtly different. These should be unified so that the protocol consuming data from the transport and the transport consuming data from the protocol look the same.
We should design an API which does not have these problems.
Change History (57)
comment:20 Changed 9 years ago by exarkun
- Owner changed from glyph to exarkun
- Priority changed from low to normal
comment:35 Changed 3 years ago by ashfall
- Branch changed from branches/tubes-1956 to branches/tubes-1956-2
comment:37 Changed 2 years ago by glyph
- Branch changed from branches/tubes-1956-2 to branches/tubes-1956-3
comment:40 Changed 2 years ago by glyph
- Summary changed from Make a less sucky producer/consumer API to "Tubes": Create a composable, flow-control and back-pressure friendly way to arrange parsing, processing, and emitting data
Changed 20 months ago by rwall
comment:49 Changed 19 months ago by glyph
- Branch changed from branches/tubes-1956-3 to branches/tubes-1956-4
comment:50 Changed 13 months ago by glyph
- Branch changed from branches/tubes-1956-4 to branches/tubes-1956-5
comment:51 Changed 11 months ago by glyph
- Branch changed from branches/tubes-1956-5 to branches/tubes-1956-6
comment:52 Changed 10 months ago by glyph
- Branch changed from branches/tubes-1956-6 to branches/tubes-1956-7
comment:55 Changed 4 months ago by glyph
- Branch changed from branches/tubes-1956-7 to branches/tubes-1956-8
Note: See TracTickets for help on using tickets.