[tahoe-dev] uTP (low extra delay transport)
ghazel at gmail.com
ghazel at gmail.com
Sat Jun 5 08:26:52 PDT 2010
On Tue, Jun 1, 2010 at 6:55 PM, Brian Warner <warner at lothar.com> wrote:
> On 5/28/10 12:09 PM, ghazel at gmail.com wrote:
>>>
>>> How does the uTP event loop work? Have you tried or been able to make it
>>> work as a twisted ITransport?
>>
>> There is a periodic call you may insert in to any event loop.
>
> Does this introduce latency, or limit the overall transfer speed (i.e.
> no rx progress is made until the periodic call fires, imposing an
> artificially high RTT)? Or is it the case that the receive-side can be
> used in two different modes?:
>
> 1: use the periodic call for receive: easy but limits transfer speed
> 2: use callback for receive: slightly harder but no latency
>
> Or do you need the periodic call even if you're calling the
> recievedPacket function each time a new packet arrives?
Packet reception is handled through a callback, and responses are
usually sent immediately from within that stack. The periodic call is
to for check timeouts. So, that includes packet timeouts and
retransmissions and loss and such. Without frequent loss, this
shouldn't affect throughput. Timeouts are based on multiple RTTs
anyway, and latency measurements for the congestion controller are
based on timestamps inserted at send time and checked at recv time, so
they are unaffected by the timer.
>> I was able to get it running on Twisted very easily, using the direct
>> uTP API. I built an ITransport out of it, which wasn't too much
>> trouble, and even took a swing at the
>> Client/Server/Connection/Connector pile of objects to implement
>> reactor.connectUTP and reactor.listenUTP. Those have a lot of edge
>> cases around when the connection is lost or manually closed, which
>> I'll need to test, but it seems to work at a basic level.
>
> Awesome. I'd want to copy that code into Foolscap to approach this
> stuff, or get it into Twisted itself. Is it part of the uTP repo?
They will be part of the uTP repo, yes. I'll post here when it's available.
-Greg
More information about the tahoe-dev
mailing list