Services
The service definitions here are based on the Protobuf files available at https://protos.trustworthy.ai
.
TrustworthySearch Services
The main trustworthy search API.
Services
StartJob
starts a job using aJobRequest
object and returns aJob
object (unary RPC)OpenSimStream
takesJob
as an argument and creates a stream with which a client can receive simulations to run until the job is finished (server streaming RPC)UploadSimResult
is the way a client uploads aSimReult
from jobs asynchronously (unary RPC)KillJob
takes aJob
as an argument and lets you stop a job before it is finished (unary RPC)GetJobResult
takes aJob
object as an argument and gets analysis from a finished job as aJobResult
(server streaming RPC)EstimateRiskBudget
estimates the budget needed for a RISK job based on aBudgetRequest
object and returns aBudget
(unary RPC)
Definition
service TrustworthySearch {
rpc StartJob(JobRequest) returns (Job);
rpc OpenSimStream(Job) returns (stream SimParams);
rpc UploadSimResult(SimResult) returns (Empty);
rpc KillJob(Job) returns (Empty);
rpc GetJobResults(Job) returns (stream JobResult);
rpc EstimateRiskBudget(BudgetRequest) returns (Budget);
}
Simulator Services
A simulator worker can run multiple jobs being sent to it by multiple brokers (each of which is uniquely defined by its port). It is not necessary to use the Simulator service for managing your simulation workers. This implementation is provided in order to demonstrate TrustworthySearch on several example problems
Services
Simulate
simulates a rollout using aBrokerSimParams
object (unary RPC)BatchSimulate
simulates a batch of rollouts using aBatchBrokerSimParams
object (unary RPC)RegisterBroker
ties a worker to a specific broker using theBrokerPort
(unary RPC)DeregisterBroker
decouples a worker from a specific broker using theBrokerPort
(unary RPC)
Definition
service Simulator {
rpc Simulate(BrokerSimParams) returns (Empty);
rpc BatchSimulate(BatchBrokerSimParams) returns (Empty);
rpc RegisterBroker(BrokerPort) returns (Empty);
rpc DeregisterBroker(BrokerPort) returns (Empty);
}
Example
See the next section, Simulation, for more details on our example implementation of the broker/worker distributed simulation scheme.