Archived

This forum has been archived. Please start a new discussion on GitHub.

Method tokens: strings vs. indices

I see from the generated c++ code that Ice appears to send the string name of a method accross the wire to invoke it. Is there a reason you're not using integer indices instead? (To save network bandwidth and allow the possibility of constant time look-up of methods.)

Thanks,
John

Comments

  • marc
    marc Florida
    Using strings is more tolerant with respect to changes in the interfaces. It is also easier for debugging. For example, a router wouldn't know how to associate operation indexes with operation names, and therfore couldn't print any meaningful debug information.

    The overhead for strings as operation names is rather small. Usually the payload of a request dominates the transmission size, not the operation name. And the lookup is done with a sorted table, so this is not a bottleneck either.