Attempt to update wwan throttling code so that 3g performs better than 2g, but both still work #171

Open
wants to merge 1 commit into
from

1 participant

@binduwavell

Simple algorithm that attempts to make wwan bandwidth throttling code be reasonably fast on 3G, but still fall back on bad 3G or 2G/EDGE connection. I'm not super familiar with the ASI code base, so I'm not certain if this is the most general way of solving this issue, but it has worked very well in our testing. I create a new request object for each connection and turn the throttling on each time. I'm guessing there is a better place to reset the throttle and the low bandwidth strike count.

I've done a bunch of snooping around the net, it appears that AT&T is doing some sort of throttling for 2G/3G connections. I've seen comments about 5MB/5Min. In my testing this seems to be quite accurate for 2G connections. However, it's clearly possible to transfer quite a bit faster on 3G without being disconnected. The high speed throttle included here is really a first shot at finding a constant for 3G that is as reliable as the one you already had for 2G.

Based on all of my tests, I've been able to shield my iPhone on both 2G and 3G to get crappy reception and then make sure my connections are not being forcibly terminated. I've been able to cause timeout over both 2G and 3G with this code without being disconnected by the network. Transfers over 3G when the signal is reasonable, is way faster than it was previously.

The file I've been testing with is about 1MB and my use case is 99% upload and 1% download, so there likely needs to be more testing in other scenarios.

Bindu Wavell Simple algorithm that attempts to make wwan bandwidth throttling code…
… be reasonably fast on 3G, but still fall back on bad 3G or 2G/EDGE connection. I'm not super familiar with the ASI code base, so I'm not certain if this is the most general way of solving this issue, but it has worked very well in our testing.
0cd9f57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment