Calling the PSM Operator
- Configure KCAL settings, such as communication APIs and node IDs (node 0: server, and node 1: client), through DataGuard APIs.
- Initialize the function group for the PSM operator. This function group includes all the public APIs for the PSM operator.
- Apply the settings to KCAL.
- Set the information about all nodes.
Compute node 0 (server)
- Call the offlineCalculate function API to construct bucket data, which is used for query on the client in the online phase.
- Call the serverCalculate function API to respond to a query from the client and return the query result.
Compute node 1 (client)
- Once the offline calculation on the server is complete, call the clientCalculate function API and enter data for query.
- Obtain the final result.
If either node (compute node 0 or 1) returns an error code when calling an API, the node needs to use a task scheduling mechanism to notify the other node to terminate the service process. For example, if compute node 1 returns an error code when calling the makeShare API and compute node 0 is waiting to receive shares, compute node 1, instead of the SDK itself, needs to notify compute node 0 to stop receiving.
Parent topic: Calling KCAL