Skip to content

Commit

Permalink
[RPC] Implement RPC call to register a Driver with the backend.
Browse files Browse the repository at this point in the history
  • Loading branch information
sukritkalra committed Feb 13, 2024
1 parent 0422552 commit 10c4f69
Showing 1 changed file with 26 additions and 5 deletions.
31 changes: 26 additions & 5 deletions rpc/protos/erdos_scheduler.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,20 @@ service SchedulerService {
// itself with the backend scheduler, and is intended as an EHLO.
rpc RegisterFramework(RegisterFrameworkRequest) returns (RegisterFrameworkResponse) {}

/// Deregisters the framework with the backend scheduler.
/// This is meant for the framework to signal its intent to shut down.
rpc DeregisterFramework(DeregisterFrameworkRequest) returns (DeregisterFrameworkResponse) {}

/// Registers the driver with the backend scheduler.
/// Drivers are long running entities that are allocated resources indefinitely
/// by the backend.
rpc RegisterDriver(RegisterDriverRequest) returns (RegisterDriverResponse) {}

// Registers a new application with the backend scheduler.
// This is the entry point for a new taskgraph (application) to register
// itself with the backend scheduler, and is intended as an EHLO.
rpc RegisterTaskGraph(RegisterTaskGraphRequest) returns (RegisterTaskGraphResponse) {}

/// Deregisters the framework with the backend scheduler.
/// This is meant for the framework to signal its intent to shut down.
rpc DeregisterFramework(DeregisterFrameworkRequest) returns (DeregisterFrameworkResponse) {}

/// Registers a new Worker with the backend scheduler.
/// This is invoked whenever a new Worker joins the framework.
rpc RegisterWorker(RegisterWorkerRequest) returns (RegisterWorkerResponse) {}
Expand Down Expand Up @@ -54,6 +59,22 @@ message DeregisterFrameworkResponse {
string message = 2;
}

/// Driver related RPC structures.
/// The following structures represent the data that a driver must pass to the
/// scheduling backend. This may involve things like the name of the driver, the
/// URI, the number of resources required by the driver, and other general
/// information.
message RegisterDriverRequest {
string uri = 2;
int32 cores = 3;
int32 memory = 4;
}

message RegisterDriverResponse {
bool success = 1;
string message = 2;
}

/// Application related RPC structures.
/// The following structures represent the data that an application (TaskGraph)
/// must pass to the scheduling backend.
Expand Down Expand Up @@ -82,4 +103,4 @@ message RegisterWorkerRequest {
message RegisterWorkerResponse {
bool success = 1;
string message = 2;
}
}

0 comments on commit 10c4f69

Please sign in to comment.