I see from http://social.msdn.microsoft.com/Forums/en/roboticsdss/thread/3169a539-f536-4b9d-bae7-01212a857660 and also from my own experience of using and debugging DSS services that DSS makes use of cloning for intra node communication and cloning + serialization for inter node communication. I request your help in understanding this mechanism. For intra node communication, I understand that DSS makes use of only cloning because we are transferring objects in the same process space (there is no need for communicating it over the network) and we do not want any unwanted shared memory dependencies. However, during inter node communication, why do we need to clone + serialize? From my understanding of serialization, when you serialize an object, the output you get at the end of serialization is completely independent of the object being serialized and can be used in isolation to construct a new object. Also, during serializing, I do not think we are going to update the original object and we are merely going to read from it. In such a scenario, will serialization alone not suffice? Why do we need to clone before serializing?
Thanks,
Venkat
In general, DSS serializes messages using the generated proxy types, so if a message is constructed using the original type it will first be transformed to the proxy type (which is implicitly a clone operation) before serializing. On the other hand if a message is constructed using a proxy type then there is no separate cloning step prior to serialization (a good reason to use proxy types for partners).
If a message type (or more strictly the message body type) implements IDssSerializable, then the behavior depends on the specific implementation of the type (because this bypasses the usual proxy mechanisms)