Hacker News new | ask | show | jobs
by sgtnoodle 1274 days ago
Seems like a good case for protobufs. Maybe there weren't any good IDLs back when they originated the protocol, though.

It seems like there's an easy way to retrofit the protocol without breaking it for older clients (as long as older clients truncate packets once a message type is unknown). Put a new message type at the end of the packet, with a list of message start offsets in it. By including its own offset as the last element, the start of the list is easily found. The first message offset could be omitted, since it is implicitly zero.