How not to design a wire protocol

How not to design a wire protocol

The only two we’re going to care about here is VN, which is a three-bit protocol version field normally set to 0b100 = 4, and mode – three more bits of packet type. Adding a new field to a JSON datagram, or more generally any other kind of self-describing protocol), is not difficult. A TCP equivalent of the NTPv4 packet protocol would either have been fixed at 48 bits no extension forever or have needed to give you some way to compute the expected packet length from data that’s within a minimum-size distance of the start of packet.

Source: esr.ibiblio.org