buttplugio / buttplug

Rust Implementation of the Buttplug Sex Toy Control Protocol
https://buttplug.io
Other
894 stars 65 forks source link

Why aren't we using gRPC? #670

Open qdot opened 1 week ago

qdot commented 1 week ago

Way back when Buttplug started, flying json over websockets seemed like the best idea 'cause gRPC didn't seem to support the streaming we needed. It does now. There's some issues with flying the connection from the web (maybe doing gRPC over websocket?) but otherwise... might be worth trying in Buttplug v5? Would save everyone the issues with our json schema shit.

blackspherefollower commented 1 week ago

The biggest reason that jumps out at me for keeping with JSON over gRPC is language support. Sure gRPC is available in most of the common general purpose languages (although I really don't recommend trying to put together the build chain to get it working in C++) but a LOT of Buttplug client usage ends up in game mods, some having to be written in the game's specific scripting language or are limited to the environments native capabilities (as in, you're not allowed to load external libraries). JSON and WebSocket support are typically far more common in those environments than gRPC or the ability to load in external libraries.