Single Object Invocation
When objects stored in the ScaleOut distributed data grid are large and complex, a conventional CRUD (Create/Read/Update/Delete) access model can be inefficient when only a small portion of an object’s state needs to be accessed. Invoking a method directly on the ScaleOut hosts where the object resides is often faster than pulling the entire object to a client to access its members.
The ScaleOut service provides the cache.singleInvoke operation, allowing a method to be invoked directly on the server where an object resides. This server-side method can receive an abitrary argument object from the caller and return an arbitrary payload (a “result object”) back to the caller.
Conceptually, a Single Object Invocation operation is similar to a post event operation, with two important differences:
cache.postEvent operations are handled sequentially for a given key, whereas cache.singleInvoke operations may execute different handlers on the same key in parallel to handle simultaneous requests.
cache.postEvent is intended for streaming event scenarios, and the caller will not receive a result value back from the handler. cache.singleInvoke operations can return values back to the caller.