Do we really need to batch subcommands in generic commands? #678
Labels
Features
New things to add to the project
Library - Core
Tasks/Bugs pertaining to the core portion of the library
In messages like ScalarCmd (and the upcoming LevelCmd), RotateCmd, etc, we have the format of a main command that provides context, then subcommands held in the main command to update specific actuators. This was originally added for the ability to batch commands and update different actuators in the same message. However, I'm not sure anyone really uses this.
For developers on the client side, they don't know when a command needs to be batched for optimization sake (i.e. when multiple commands are packed into a single command at the line protocol level, possibly saving us extra bluetooth calls or whatever), and it's not really something I want to expose to them because that's a lot of extra work. Ideally we'll handle that for them via things like #673. However, if we do implement sending all updates out on the server side on intervals instead of immediately, it means we could also just do away with batching in messages altogether and make the protocol a very simple-to-implement one command = one actuator update format, or pack at the message level (since we technically take multiple buttplug messages in an array as part of a single packet, not that anyone ever does that) if someone really wants to optimize.
The text was updated successfully, but these errors were encountered: