Live data from Hacker News

Why mobile apps suck when you're mobile (TCP over 3G)

blog.davidsingleton.org

51–60 of 71 posts

Re: Why mobile apps suck when you're mobile (TCP over 3G)

#51
post #49

Earlier quoted context omitted.

The article misses that this is fundamentally an issue with the PHY level of "mobile" broadband systems. If you've got a very simple radio, say, a ham 2 meter handset, you find there are interference patterns caused by multipath interference that cause the signal to get stronger and weaker as you move half a wavelength this way or that way. This causes a fluttering noise when you're listening to somebody transmitting…

I don't think you understood the article. It is not about the physical restrictions and trade-offs of mobile broadband. It is about the inefficiency of TCP on such connections. Current TCP implementations are optimized for wired networks which usually have fixed bandwidth and latency. They use dropped packages for congestion avoidance, interpreting package loss as a signal to slow down transmission. Wireless networks…

Yes, I do recognize that.

In the big picture, however, it's generally better to fix the part of a system that's broken (the PHY) than it is to try to compensate for the underlying problem in upper layers.

It's also good to be careful about your terms. "Mobile" means operation out of a car or other motorized moving platform. "Portable" means a device that's being carried by a pedestrian. When the bandwidth of a radio channel gets wide, these become very different environments.

All I can say about new protocols is that you can go to your local Uni and find (quite literally) a ton of conference proceedings on this very topic. It seems that somebody has been funding a ludicrous amount of research on TCP replacements for decades without anything practical coming out of it.

Out of all that literature you ought to be able to find something that works or find a good reason why it can't be done.

Re: Why mobile apps suck when you're mobile (TCP over 3G)

#52
post #20

Don't worry, our Lisp startup (www.teclo.net) is fixing TCP over mobile networks, it will all be fine soon enough. :-)

perhaps you could explain a bit more about how you're solving the issue?

As noted elsewhere in this thread, the properties of wireless networks conflict badly with the design principles of TCP. We have a custom TCP stack that replaces some of the standard TCP algorithms with new ones carefully tuned for mobile broadband. It can act as a transparent proxy, presenting a standard stack towards the internet and a optimized one towards the radio network. The packet stream is still standard TCP though, so no client changes are needed.

The product is deployed in some >10Gbps networks, and shows very impressive gains for real live traffic.

Re: Why mobile apps suck when you're mobile (TCP over 3G)

#53
post #52

Earlier quoted context omitted.

perhaps you could explain a bit more about how you're solving the issue?

As noted elsewhere in this thread, the properties of wireless networks conflict badly with the design principles of TCP. We have a custom TCP stack that replaces some of the standard TCP algorithms with new ones carefully tuned for mobile broadband. It can act as a transparent proxy, presenting a standard stack towards the internet and a optimized one towards the radio network. The packet stream is still standard TCP…

thanks for the explanation :) does your layer only sit between the mobile and the point at which the network becomes a wired connection? like, just the other side of the cell towers?

Re: Why mobile apps suck when you're mobile (TCP over 3G)

#54
post #52

Earlier quoted context omitted.

As noted elsewhere in this thread, the properties of wireless networks conflict badly with the design principles of TCP. We have a custom TCP stack that replaces some of the standard TCP algorithms with new ones carefully tuned for mobile broadband. It can act as a transparent proxy, presenting a standard stack towards the internet and a optimized one towards the radio network. The packet stream is still standard TCP…

thanks for the explanation :) does your layer only sit between the mobile and the point at which the network becomes a wired connection? like, just the other side of the cell towers?

No, it'd be somewhere in the core network. Ideally next to the GGSN.

Re: Why mobile apps suck when you're mobile (TCP over 3G)

#55
This is exactly what CouchDB, and Mobile Couchbase for Android and iOS, is designed to fix.

Networks are slow. Mobile networks are slower. The most robust fix to the problem is to "optimistically replicate" your application data to the end user's device, so that the network latency does not become part of the user experience.

This is a strong fit for applications like CRM or geographically constrained apps, as the data sets are small enough to fit completely on your devices. For larger data sets the issue becomes: which subset of the data should be copied to the device ahead of time.

The user should never needs to wait on the network. All data operations are played against the local Couch, which handles asynchronously transmitting changes to and from the remote server, in the background. This pattern makes it much easier for app developers to make responsive applications, where users are never left waiting on multi-second round trip times.

Re: Why mobile apps suck when you're mobile (TCP over 3G)

#56
Is there any way round this for HTML5 apps? I know you can save an app icon on iphone but when you launch it just launches safari which seems to make a network request to check if the site is up to date? (Sorry, I'm a bit naive about all this HTML5 stuff.) e.g. Gmail in safari on iphone is useless when you get long latency situations like this. Is there a way round that?

Re: Why mobile apps suck when you're mobile (TCP over 3G)

#57
post #18
post #14

We should probably get these long round-trip protocol issues ironed out before we build our galactic internet

TCP is already out as a protocol for our galactic internet, see relevant comment from Linux TCP implementation: /* * [...] Note that 120 sec is defined in the protocol as the maximum * possible RTT. I guess we'll have to use something other than TCP * to talk to the University of Mars. * PAWS allows us longer timeouts and large windows, so once implemented * ftp to mars will work nicely. */

I sincerely hope ftp is a distant memory by the time the University of Mars opens.

Re: Why mobile apps suck when you're mobile (TCP over 3G)

#58
I'm in a start up that's developed techniques using UDP to allow someone to roam across wifi - in other words we have managed to reduce the tcp delays and time outs to provide consistent and reliable handoffs between wifi zones and devices - regardless what of the network provider. The technology also allows hot handover between femto and wifi too. Right now we're mostly focused on a mobile app to improve broadband delivery of content to mobile users in shopping malls, commercial zones, etc. but that's low hanging fruit. Eventually we believe that this can be integrated in mobile apps to let others us this for true mobility while running broadband services.

Re: Why mobile apps suck when you're mobile (TCP over 3G)

#59

There were plenty of wireless-optimized TCP replacements proposed back in the days when WAP and XHTML Mobile were the hottest things around, but none took root as operators, web servers and browsers needed to adopt them in tandem. Now that smartphone apps are widespread and someone developing a service can control both sides of the connection, there's definitely room for someone to devise a really good TCP replacemen…

The mobile OS should be able to fix this. One method would be to disable the reliable delivery mechanism in the 3G code. Another method would be to use huge retransmission timeouts at the TCP level for connections going over 3G, so the TCP level seldom retransmits packets. If the 3G implementation provides completely reliable connections, the OS could fake the TCP implementation and just use that implementation direc…

TCP is end to end. 3G is just carries data to your service provider. So wouldn't faking TCP screw up the communication between the mobile service provider and the server you're communicating with?

Re: Why mobile apps suck when you're mobile (TCP over 3G)

#60

Very interesting and sheds some light on the weird latency issues I see here in Rwanda, where 3G issues aren't limited to being on moving trains. Sometimes pinging shows crazy return times of 30000-60000ms. Other times they're only 200-400ms but every other ping packet times out, i.e. one packet through, next one drops, and so on. Still trying to figure out exactly what's happening then.

Bufferbloat means when you refuse to drop packets, you get longer latencies: http://www.bufferbloat.net/

Why you'd have big buffers sometimes and not others, I have no idea.

Post reply on HN