[Twisted-Python] Deferreds and progress

Itamar Turner-Trauring itamar at futurefoundries.com
Thu Jul 26 15:15:40 EDT 2012


On Thu, Jul 26, 2012 at 2:44 PM, Tobias Oberstein <
tobias.oberstein at tavendo.de> wrote:

>
> Thanks for pointing. So if something like this is added to Twisted, it
> will be within producer/consumer, and not added to Deferred?
>
> The reason I am asking: Autobahn implements RPC over WebSocket, and people
> have been asking why RPC results
> can't be delivered in parts, as progress. However, an Autobahn RPC returns
> a Deferred, not a producer.
>

A replacement API for producer/consumer.

You might say, I just want streaming results... but then you really want to
pause upstream if you can't handle it, and you want to be able to chain
streams of data (which is where Protocols fail), and so you end up with a
more complex API than "call this function with data every time it
arrives".  And that's the goal of that ticket.

Of course, if you want something super simple, you can implement if you
want for your code only.

-- 
Itamar Turner-Trauring, Future Foundries LLC
http://futurefoundries.com/ — Twisted consulting, training and support.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20120726/9e6d7a95/attachment.htm 


More information about the Twisted-Python mailing list