Results 1 to 2 of 2

Thread: Method tokens: strings vs. indices

  1. #1
    JohnBates is offline Registered User
    Join Date
    May 2003
    Posts
    2

    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

  2. #2
    marc's Avatar
    marc is offline ZeroC Staff
    Name: Marc Laukien
    Organization: ZeroC, Inc.
    Project: The Internet Communications Engine
    Join Date
    Feb 2003
    Location
    Florida
    Posts
    1,860
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Efficiency with very long strings
    By myrosia in forum Help Center
    Replies: 1
    Last Post: 10-22-2009, 11:17 AM
  2. waitForShutdown method
    By sionscone in forum Help Center
    Replies: 3
    Last Post: 10-16-2007, 06:42 AM
  3. Cannot send strings with embedded \0
    By blair in forum Bug Reports
    Replies: 3
    Last Post: 08-14-2007, 03:00 PM
  4. win32/ question on passing and returning strings
    By stephan in forum Help Center
    Replies: 2
    Last Post: 01-04-2004, 02:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •