ray/protos/orchestra.proto
2016-03-17 22:32:31 -07:00

163 lines
4 KiB
Protocol Buffer

syntax = "proto3";
import "types.proto";
message AckReply {
string errormsg = 1;
}
message RegisterWorkerRequest {
string worker_address = 1;
string objstore_address = 2;
}
message RegisterWorkerReply {
uint64 workerid = 1;
}
message RegisterObjStoreRequest {
string address = 1;
}
message RegisterObjStoreReply {
uint64 objstoreid = 1;
}
message RegisterFunctionRequest {
uint64 workerid = 1;
string fnname = 2;
uint64 num_return_vals = 3;
}
message RemoteCallRequest {
Call call = 1;
}
message RemoteCallReply {
repeated uint64 result = 1;
}
message PullObjRequest {
uint64 workerid = 1;
uint64 objref = 2;
}
message PushObjRequest {
uint64 workerid = 1;
}
message PushObjReply {
uint64 objref = 1;
}
message ObjReadyRequest {
uint64 objref = 1;
uint64 objstoreid = 2;
}
message WorkerReadyRequest {
uint64 workerid = 1;
}
message ChangeCountRequest {
uint64 objref = 1;
}
message SchedulerDebugInfoRequest {
bool do_scheduling = 1;
}
message FnTableEntry {
repeated uint64 workerid = 1;
uint64 num_return_vals = 2;
}
message SchedulerDebugInfoReply {
repeated Call task = 1;
repeated uint64 avail_worker = 3;
map<string, FnTableEntry> function_table = 2;
}
service Scheduler {
// Register a new worker with the scheduler
rpc RegisterWorker(RegisterWorkerRequest) returns (RegisterWorkerReply);
// Register an object store with the scheduler
rpc RegisterObjStore(RegisterObjStoreRequest) returns (RegisterObjStoreReply);
// Tell the scheduler that a worker can execute a certain function
rpc RegisterFunction(RegisterFunctionRequest) returns (AckReply);
// Asks the scheduler to execute a task, immediately returns an object reference to the result
rpc RemoteCall(RemoteCallRequest) returns (RemoteCallReply);
// increment the count of the object reference
rpc IncrementCount(ChangeCountRequest) returns (AckReply);
// decrement the count of the object reference
rpc DecrementCount(ChangeCountRequest) returns (AckReply);
// request an object reference for an object that will be pushed to an object store
rpc PushObj(PushObjRequest) returns (PushObjReply);
// request delivery of an object
rpc PullObj(PullObjRequest) returns (AckReply);
// used by an object store to tell the scheduler that an object is ready
rpc ObjReady(ObjReadyRequest) returns (AckReply);
// used by the worker to report back and ask for more work
rpc WorkerReady(WorkerReadyRequest) returns (AckReply);
// get debugging information from the scheduler
rpc SchedulerDebugInfo(SchedulerDebugInfoRequest) returns (SchedulerDebugInfoReply);
}
message DeliverObjRequest {
string objstore_address = 1; // objstore to deliver the object to
uint64 objref = 2; // reference of object that gets delivered
}
message RegisterObjRequest {
uint64 objref = 1; // reference of object that gets registered
}
message RegisterObjReply {
uint64 handle = 1; // handle to memory segment where object is stored
}
message ObjChunk {
uint64 objref = 1;
uint64 totalsize = 2;
bytes data = 3;
}
message GetObjRequest {
uint64 objref = 1;
}
message GetObjReply {
string bucket = 1;
uint64 handle = 2;
uint64 size = 3;
}
message ObjStoreDebugInfoRequest {
repeated uint64 objref = 1; // get protocol buffer objects corresponding to objref
}
message ObjStoreDebugInfoReply {
repeated uint64 objref = 1; // list of object references in the store
repeated Obj obj = 2; // protocol buffer objects that were requested
}
service ObjStore {
// Request to deliver the data that comes with an object reference to another object store
rpc DeliverObj(DeliverObjRequest) returns (AckReply);
// Accept incoming data from another object store
rpc StreamObj(stream ObjChunk) returns (AckReply);
// Get debug info from the object store
rpc ObjStoreDebugInfo(ObjStoreDebugInfoRequest) returns (ObjStoreDebugInfoReply);
}
message InvokeCallRequest {
Call call = 1;
}
message InvokeCallReply {
}
service WorkerService {
rpc InvokeCall(InvokeCallRequest) returns (InvokeCallReply);
}