Archived

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

collocation optimization per object

Is there anyway to defaultly set collocation off on all proxies to a specific object. The reason for this is this particular object is always represented as a blobject and collocation calls will always result in an exception.

I know it is possible to turn collocation off on each individual proxy, but this requires the developer to do this everytime he uses a proxy to that object.

I know it is also possible to turn it off for all proxies but this prevents collocation from working with other proxies.

Is there any built in way of setting this per object, maybe through slice meta directives?

Comments

  • matthew
    matthew NL, Canada
    Since collocation optimization is a local proxy setting it does not flow over the wire, so therefore we have to examine the various cases.

    How are you getting the proxy to this object? If you get it through a stringified proxy you can use the <name>.CollocationOptimization property (as long as you use Communicator.propertyToProxy.

    If you get the proxy from the object through some sort of factory method then disable collocation optimization on the proxy before returning it. If the object is collocated then, good, the proxy you are using will be have collocation optimization disabled (assuming that the factory is itself called with collocation optimization). If the proxy is remote then the remote process cannot possibly use collocation optimization.

    What does not work in this case is if you get the proxy from a third party (for example, IceGrid or a similar lookup service). In this case you have to manually disable the setting.