Live data from Hacker News

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

blog.davidsingleton.org

61–70 of 71 posts

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

#61

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…

we did this at Visto corp a few years back. we wrote our own UDP based protocol that acknowledged every packet. it worked really well in horrible network conditions and was incredibly slow everywhere else. roughly speaking it was a bit like "TCP with no sliding window" and we had trouble w/proxies in the carrier networks. this was pre-3G.

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

#62
post #49

Earlier quoted context omitted.

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…

Mobile also means "As in it's carried around as well as used in cars". It's a term for smartphone. They're using modern parlance to talk about smartphones, not radio parlance.

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

#63

Earlier quoted context omitted.

I probably missed half of what you were trying to explain there, but I didn't see a good solution. Are you suggesting we should give up speed for reliability at the PHY level?

It's a choice made at the PHY level and it's a tradeoff that's a little more complex than speed vs. reliability -- mobile operation introduces special challenges, as well as operation with weak signals (satellite), as well as operation in urban areas. There's a reason why Europe has 3 distinctly different digital television standards.

For TCP over 3G, could they just turn off reliability at the PHY level and let TCP do its thing?

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

#64
post #32
post #16

Earlier quoted context omitted.

I think this is a really good idea. Startup? PhD thesis?

Do tell how you reckon a start-up could bring to popularity, let alone monetize a new Internet protocol?

We're not talking about replacing TCP as the standard transport protocol. But if you're a mobile app developer and you control both the client (via a native app) and the server you can use whatever you want. If someone provided client and server implementations of a more efficient networking protocol it could become popular.

I have no idea about monetization though. I doubt just charging for the code would work.

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

#65
post #57
post #18

Earlier quoted context omitted.

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.

well, why not? Martian students will need to use something to transfer files. Perhaps SFTP?

The International Space Station still uses Kermit! At least they did in 2003:

http://www.spacedaily.com/news/iss-03zq.html

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

#66

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…

Yeah, but you don't need to do much to TCP to make it work perfectly well on wireless.

Let me repeat that: Don't fuck with TCP. TCP is fine. It's BUILT to deal with your lousy network, it's DESIGNED to deal with nuclear attacks from the Guys of the Bad Color, and (ironically) the worst thing you can do to TCP is to try to be nice to it.

"What about keep-alives?"

There are no keep-alives in TCP. If two hosts are in agreement about the address and port, they can keep a connection in an open state until the universe goes cold. (There may be keepalives necessary /above/ TCP, but TCP itself doesn't use 'em). Don't yammer something about your internal state every 30 seconds; you don't do it on the bus home, so don't do it on your network, either.

"Don't we need this proprietary fancy-schmancy buffering algorithm from FuppedUck Communications Consultants? They keep telling us we're toast without it."

No. Just run TCP. Spend money on decent routers.

"I'm feeling really nervous and I want to, like, disable Nagle for everything. Isn't that what you do? Turn Nagle off and maybe muck with the --"

You're from AT&T, aren't you?

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

#67
post #66

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…

Yeah, but you don't need to do much to TCP to make it work perfectly well on wireless. Let me repeat that: Don't fuck with TCP. TCP is fine. It's BUILT to deal with your lousy network, it's DESIGNED to deal with nuclear attacks from the Guys of the Bad Color, and (ironically) the worst thing you can do to TCP is to try to be nice to it. "What about keep-alives?" There are no keep-alives in TCP. If two hosts are in ag…

Not entirely true. TCP is certainly decent, but it's not designed to deal with networks where the delays are extremely transient and the capacity is variable. It's not designed for heavy buffering. And so on.

It can be fixed with congestion control protocols tacked on the side, I think, but it's designed for wired networking with slow transients in the performance profile.

It IS, however, better than anything that I'd be able to hack together quickly.

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

#69
The much worse problem is DNS. For big networks that pushes always the same two IPs (even without round-robin) it is a disaster. There are lags of servers, lags of network, dropped packets, useless overhead with EDNS and different packet sizes (timeouts and retransmitions) and above all, the practice by content providers and CDNs to use hundreds of changing in real time hostnames to implement load balancing and/or geoIP based assets loading. They use near zero TTLs which makes caching useless and dynamic sets.

Indian Airtel's network is a live example of that disaster. It is almost unusable, while they still actively promoting 3G and iPhones. ^_^

Post reply on HN