Server Smalltalk Guide : Marshaling : By-value marshaling
By-value marshaling
Using a by-value marshaling scheme, all message arguments are passed as deep copies. This strategy is suitable for many server applications where object identity is not important. It has the drawback that message size is typically increased since all objects reachable from the message object are copied and transferred to the remote machine. It can also be an advantage since the message will be executed entirely local to the remote machine since there are no remote references. Whether or not this behavior is desired is specific to particular applications.
Message marshalers which support by-value configurations (both of the standard SST marshaler do so) expose standard ones to you through a class method as specified below:
byValueConfiguration
Answers a configuration object which represents the by-value configuration for instances of the receiver. All objects marshaled with marshalers instantiated through this configuration will do deep marshaling.
The configuration returned by this method should be installed on an invocation handler configuration where it is used to build the relevant structures when the handler is started.
Tip icon
If you use by-value marshaling, you must remember that object identity is maintained only within the scope of a single message send. That is, if the first and second arguments of a message are identical at the sender, they will be identical at the receiver. This property is not true if the same object were passed in a subsequent message send.
Last modified date: 04/21/2020