OSC (Open Sound Control) is just awesome. It's basically a lightweight protocol on top of UDP packets. It's not hard to roll your own implementation if there isn't one for your platform. It's lacking a lot of features you'd need for a scalable system, but when you just need a few systems to send realtime messages to each other, it's tough to beat.
I've used it a lot for the original designed use-case (sending parameter updates between controllers and music synths), but also a bunch of other things (sending tracking information from a python computer vision script to a Unity scene).
Yeah really is a cool protocol. I use it with my Behringer X Touch Compact to control the grandMA3 onPC software to get physical playbacks.
X Touch MIDI goes into a piece of software called open stage control https://openstagecontrol.ammd.net/ which runs https://github.com/xxpasixx/pam-osc which then translates the MIDI messages to the correct OSC commands to send to grandMA3. Then on the grandMA3 side there is a lua plugin that sends OSC commands back out to open stage control to set fader positions and LED status.
I love the ease and flexibilty OSC, but like a lot of lazy artsy coders, I hard code my IPs in my microcontrollers, and bring my own wifi router so that all my stuff just works on stage, but every time I boot this stuff, it's always a bit of a gamble. Interchangeability and interoperability is just not a thing when building this way.
I kinda dig this concept of O2 (https://rbdannenberg.github.io/o2/) layered over OSC for easy interoperability, but it also seems like a lot of work, and I'd rather spend my time making music.
I'm not a fan of MIDI, but it does kind of blow my mind when things just work. Having OSC be as plug-n-play as MIDI would be awesome!