Thrift dev,

I was wondering why the decision was made to serialize method names as
strings. A helpful thrifter on IRC (JensG) pointed me to
https://thrift.apache.org/static/files/thrift-20070401.pdf, which states
that hashing method names was considered, but was found to be problematic.

I can't argue with that, but I do wonder why we can't simply tag each
method with a ": 1", ": 2", etc. like we do with struct members and method
arguments.

I've also been using service multiplexing and noticed that service names
are sent as strings with each method call as well. It would seem that
tagging services with integers could be a good feature as well, given that
varint encoding would then take the (service name, method name) tuple down
to two bytes in many cases.

The reason I ask is that I'm using thrift over BLE (bluetooth low energy),
so my MTUs are small enough that a few extra bytes leads to extra packets,
which increases latency.

Thanks,
David

Reply via email to