Basic remote object API
Description
The Distributed feature provides a basic API for accessing remote objects. Some of the commonly used methods include--
globalAt: aKey
Answers the current value of the global value named by aKey in the object space represented by the receiver.
globalAt: in DsObjectSpace
globalAt:ifAbsent: in DsObjectSpace
 
dsInSpace: anObjectSpace
Answers an appropriate representation of the receiver in the specified object space. This representation may be the receiver itself, or a proxy (DsRemoteObjectPointer) to a remote object. If necessary, a copy of the receiver is made.
dsInSpace: in Object
dsInSpace: in Class
 
SST equivalent
Client object spaces can access remote global objects directly, without the need to have them exported on the server object space. The following API is defined to access remote globals.
sstGlobalIn: space
Answers a reference to the remote global object in @space whose global name is the receiver.
sstGlobalIn: in String
sstGlobalIn:context: in String
Example code to access a remote Array class in the object space remoteOS is as follows: #Array sstGlobalIn: remoteOS
Porting guidelines
Migration of the API for accessing remote global objects is straightforward. You can convert the Distributed feature globalAt: methods directly to the SST globalIn: methods.
Converting the Distributed feature dsInSpace: API depends on its use. If you use it for classes, you can use the SST globalIn: API since classes are also global variables. If you use the dsInSpace: API to copy local objects to the remote object space, SST does not have an equivalent API. You may be able to achieve similar results by using the SST marshalling wrapper sstAsDeepValue. The wrapper causes the local object to be copied when passed as a parameter to the remote object space.
 
Last modified date: 07/02/2019