It's too bad we won't see any playable twitch games in the browser until there is some way to do UDP. I don't see why browsers don't just allow UDP subject to same origin policy, perhaps only on pages which serve a special "X-Allow-UDP" header.
From what I understand, the only reason browsers shy away from being able to send UDP packets is fear of DDOS. This does not seem to be an issue if packets are only sent to same host that the page is served from.
WebRTC allows for general UDP packets (in the spec at least - haven't tried it in Chrome stable) so hopefully this will be a workable solution as it gets more support.
WebRTC is currently some weird wrapper around ICE and nat traversal protocols, not something that seems useful for sending generic javascript-land ArrayBuffers or similar.
Ya this appears to be the achilles heal of WebRTC and I was extremely disappointed (but not surprised) to hear that they chose to go this route of splitting data and media instead of layering media on top of data.
All I can think of is that there might be pressure from media companies and ISPs to block the media or data components.
This has happened before - we have UDP and TCP as independent protocols instead of having TCP built on UDP. This created the mess with firewalls and NAT that we have to live with today.
uTP (micro transport protocol) is a TCP implementation based on UDP. Used by the majority of BitTorrent clients. It seems to work pretty well.
It's interesting that you think TCP was a bad idea. Do you have any sources or reading material that you can share?
TCP is ok, but it has a lot of flaws with handshaking and long lag, and also is useless for things like gaming because it can't go through NAT (NAT itself is a disaster too). TCP has created an internet of second class citizens who can only download but can't upload. The worst thing is, IPv6 will repeat all the same mistakes, so I think of it as second class citizen 2.0.
If it were up to me, I would scrap the whole thing, especially the needlessly large UDP and TCP headers, and make a simpler scheme that only contains the destination IP address and maybe a small key that references metadata held in each endpoint's internal state. So the TCP protocol would only exist in each endpoint's TCP stack, not on the wire.
I don't really have any sources, but I lost two years of my life trying to write a windowed reliable transmission scheme over UDP that can punch through firewalls, basically what WebRTC is trying to do, and got thoroughly disillusioned with networking. It just never, ever, ever works 100% reliably, so you end up recreating the work that Skype did if you want a connection as reliable as TCP. I think that says a lot about the miserable state of networking today. I might get down voted for this, but I feel that what I've said is a statement of fact if you look at the hoops that P2P protocols have to go through today. That mess was never the intention of the original network architects (except for admins maintaining corporate firewalls who want their users to be second class citizens, who sadly had a hand in the NAT used in home broadband modems).
The creators have a blog entry about latency and websockets. With even a minimal amount of packetloss, TCP makes for really bad latency - http://blog.artillery.com/2012/06/websocket-performance.html
It's too bad we won't see any playable twitch games in the browser until there is some way to do UDP. I don't see why browsers don't just allow UDP subject to same origin policy, perhaps only on pages which serve a special "X-Allow-UDP" header.
From what I understand, the only reason browsers shy away from being able to send UDP packets is fear of DDOS. This does not seem to be an issue if packets are only sent to same host that the page is served from.