you need to go study the principles of Unix if you don't understand why having the messages in JSON is better..
the default websockets use Flate compression and this is pretty decent at deduplicating the high entropy pubkeys
if you want to make a relay and client that works with a binary format, go make it, but you will have a bad time if its primary support of JSON is not kept fully up to date, interoperability > all
by obscuring data in a binary format you create all kinds of problems with interoperability, debugging, and so on, i'm not saying don't do it, but it's a low priority compared to fully supporting the easy to debug human readable format, even if json is shitty for certain parts of it syntax it's still readable
here's the principles of unix, summarised by Brave's AI:
-----
Write programs that do one thing and do it well: Focus on simplicity and single-purpose tools.
Write programs to work together: Design tools to be modular and interoperable.
*Write programs to handle text streams: Use text as a universal interface for data exchange and processing.*
Additional Principles
From “The Art of Unix Programming” by Eric S. Raymond:
Rule of Clarity: Clarity is better than cleverness.
Rule of Composition: Design programs to be connected with other programs.
Rule of Separation: Separate policy from mechanism; separate interfaces from engines.
Key Concepts
*Plain text: Store data in plain text files.*
Hierarchical file system: Organize files and directories in a hierarchical structure.
Treat devices and IPC as files: Use a file-like interface for device management and inter-process communication.
Use software tools: Prefer small, specialized programs (tools) over monolithic applications.
Command-line interface: Use a command-line interpreter to string together tools and execute tasks.
Notational Conventions
this is the right answer
i don't see how anyone could disagree
Out of curiosity: what do you think of systemd?
🫂
i don't really like it, i prefer the old days of rc.d
systemd is too complex
Good text. I'm almost there with our new relay. Last step missing is group multiple tools on the command line.
Yeah, this approach allows for "small specialized programs".
Such as: a binary protocol to optimize send and receive speed and bandwidth, primarily over mobile networks.
Protocols have different design goals.
yes, but don't turn it into a waste of dev resources like Wayland or most of Linux