Method invocation
Method invocation is the object analog of Remote Procedure Call (RPC) in traditional systems. As discussed in
Actors, it allows normal Smalltalk messages to be sent to objects outside of the current VM and image. SST preserves Smalltalk messaging semantics by implementing method invocation using a synchronous Request > Execute > Reply cycle: a request is sent to some object, the corresponding method is executed and the result replied to the requester.
Method invocation is built on top of the communications components, discussed previously, and the marshaling component, which is discussed in
Marshaling. Requests and replies are represented explicitly by
SstRequest and
SstReply objects. Requests are marshaled into communication messages, and then converted into wire-format protocol by the message assembler and sent to a remote endpoint. The wire-format representation is retrieved at the destination, converted back to a communications message and unmarshaled, giving a Smalltalk request which is then executed. A similar mechanism is used to return the result as replies are really just requests to return a value to the original sender.
For many applications, this level of capability is sufficient. In some cases, however, you need to control how and when requests are sent and satisfied, and their results returned.
Getting started with SST briefly outlines the system components and how they fit together and interact. The fine details are covered in this and subsequent sections. In particular, this section details invocation handlers and dispatchers.
The classes and methods directly related to method invocation are contained in the SstMethodInvocation and SstLPMethodInvocation applications.
Last modified date: 09/19/2018