The next time you are building a software system and have to exchange data start with using a simple plain text protocol and then add in the complexity for optimization later. All of these protocols can be sent as plain text data over a TCP or UDP. They are easily inspected, small, and direct.
Handy guide, and a very nice #NoBullshit site from Blain Smith.
https://chanc.ee/20210315-plain-text-protocols.html