Home Help Center

A question about collocated invocations.

OrNotOrNot Member Bin.LiOrganization: GE HealthcareProject: Enterprise solution
hi,there,
Can anybody explain the "collocated invocation" to me please? I can not understand it. What is the meaning of the "collocate" in Ice? :confused: Any help is appreciated.

Thanks in advance.

Best regards--OrNot

Comments

  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    collocated means that the proxy and the servant are hosted by the same communicator. If you only have one communicator then this in effect means that the proxy and servant are in the same process.

    If the proxy and servant are collocated Ice can bypass all of the network completely and make much more direct calls on the servant which is much faster.

    See 29.17 in the Ice manual for more details.

    Regards, Matthew
  • OrNotOrNot Member Bin.LiOrganization: GE HealthcareProject: Enterprise solution
    Thank you Mattew. :) .
  • NarendranathNarendranath Member
    Collocate

    Invoking an operation on a proxy instructs the Ice run time to send a message
    to the target object. The target object can be in another address space or can be collocated (in the same process) as the caller—the location of the target object is transparent to the client. If the target object is in another (possibly remote) address space, the Ice run time invokes the operation via a remote procedure call; if the target is collocated with the client, the Ice run time uses an ordinary function call instead, to avoid the overhead of marshaling.
  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    As Matthew pointed out, we use "collocate" to mean "share the same communicator", which is stronger that just reside in the same process, since you can create several communicator objects in the same process.

    You can also disable the collocation optimization for "remote" calls (or calls through proxies) between a client and server that share the same communicator:
    newProxy = proxy->ice_collocationOptimization(false)
    (see 29.8 in the Ice manual)

    This is for example useful if you want to use a separate thread to run your oneway local operation.

    Cheers,
    Bernard
Sign In or Register to comment.