4 ms·
Sadly, we're moving away from text protocols. SPDY and WebSockets are binary. I've telneted many times to debug HTTP issues, and I wonder what am I going to do
by pornel 15y ago
Sadly, we're moving away from text protocols. SPDY and WebSockets are binary.
I've telneted many times to debug HTTP issues, and I wonder what am I going to do with SPDY problems.
- zokier 15y agonote: > Only use binary protocols where the performance is so sensitive that it's worth the implementation and debugging downside SPDY was created explicitly to improve performance.
- nknight 15y agoMost of SPDY's "speediness" comes from fundamental design properties, not its regrettably atextual implementation. From Google's perspective, this level of optimization is appropriate -- they have scaling problems most of us could only dream of. From everyone else's perspective, however, it's very over-engineered.
- pornel 15y agoThere are surely huge wins from having single TCP/IP stream and gzipping all of it including headers, but I wonder how much difference binary format makes on top of that? Maybe you save 100B per request? On a large page that makes 100 requests? 10KB. When you've got one stream that eliminates roundtrip time/TCP/IP slow start that's simply 80milliseconds on a basic 1Mbit broadband.
- kijin 15y agoAt Google's scale, you might want to multiply that by a trillion or two.
- pyre 15y agoI don't think that binary is necessarily a bad thing. It doesn't work in all cases, but one of the major reasons that people don't want binary is because of proprietary formats. If the binary format is open, it can be easy to write open-source/well-polished tools for debugging/viewing them. Maybe not as simple and ubiquitous as netcat or telnet, but it works. The biggest downside is lack of easy transparency which can results from a format/protocol being proprietary, or just obscure to the point that no one remembers the details and the documentation is lost.
- masklinn 15y ago> Sadly, we're moving away from text protocols. SPDY and WebSockets are binary. Nothing prevents your WS payload from being textual, as far as I know.
- pornel 15y agoYou can use textual payload, but the WS protocol itself (aside from pretend-HTTP handshake) is binary and your payload may be masked on the wire too. http://tools.ietf.org/html/rfc6455#section-5.2 http://tools.ietf.org/html/rfc6455#section-5.2 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-------+-+-------------+-------------------------------+ |F|R|R|R| opcode|M| Payload len | Extended payload length | |I|S|S|S| (4) |A| (7) | (16/64) | |N|V|V|V| |S| | (if payload len==126/127) | | |1|2|3| |K| | | +-+-+-+-+-------+-+-------------+ - - - - - - - - - - - - - - - + | Extended payload length continued, if payload len == 127 | + - - - - - - - - - - - - - - - +-------------------------------+ | |Masking-key, if MASK set to 1 | +-------------------------------+-------------------------------+ | Masking-key (continued) | Payload Data | +-------------------------------- - - - - - - - - - - - - - - - +
- pagekalisedown 15y agoI use to worry too, but then I learned to use Wireshark and all was well again.
- DougWebb 15y agoFor HTTP, Fiddler is great too. It can already handle parsing a bunch of formats into an easier-to-read display, so I imagine it'll handle SPDY and WebSockets too if it doesn't already.
- VMG 15y agoFor performance-critical applications, I think binary encoding is warranted. After all Ethernet/TCP/IP are binary as well.