Skip to content

Commit 4b19895

Browse files
authored
redap_tasks: introduce grpc definitions (#9359)
### Related * Part of [redap #276 ](rerun-io/dataplatform#276) <!-- Include links to any related issues/PRs in a bulleted list, for example: * Closes #1234 * Part of #1337 --> ### What This PR introduces gRPC definitions for the service that will enable interaction with redap persistent tasks. See [redap #276 ](rerun-io/dataplatform#276).
1 parent e208a25 commit 4b19895

File tree

3 files changed

+474
-0
lines changed

3 files changed

+474
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
syntax = "proto3";
2+
3+
package rerun.redap_tasks.v1alpha1;
4+
5+
import "rerun/v1alpha1/common.proto";
6+
7+
// `TasksService` is the service for submitting and querying persistent redap tasks.
8+
service TasksService {
9+
// Submit new tasks
10+
rpc SubmitTasks(SubmitTasksRequest) returns (SubmitTasksResponse);
11+
// Query the status of submitted tasks
12+
rpc Query(QueryRequest) returns (QueryResponse);
13+
}
14+
15+
message SubmitTasksRequest {
16+
repeated Task tasks = 1;
17+
}
18+
19+
// `SubmitTaskResponse` contains, for each submitted task
20+
// its submission outcome, encoded as a `RecordBatch`
21+
message SubmitTasksResponse {
22+
rerun.common.v1alpha1.DataframePart data = 1;
23+
}
24+
25+
// A task is a unit of work that can be submitted to the system
26+
message Task {
27+
// Unique identifier for the task
28+
string task_id = 1;
29+
// Type of the task
30+
string task_type = 2;
31+
// Task-type dependant data necessary to de-serialize the task
32+
bytes task_data = 3;
33+
}
34+
35+
// `QueryRequest` is the request message for querying tasks status
36+
message QueryRequest {
37+
// Empty queries for all tasks if the server allows it.
38+
repeated string task_ids = 2;
39+
}
40+
41+
// `QueryResponse` is the response message for querying tasks status
42+
// encoded as a record batch
43+
message QueryResponse {
44+
rerun.common.v1alpha1.DataframePart data = 1;
45+
}

crates/store/re_protos/src/lib.rs

+9
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ mod v1alpha1 {
4242

4343
#[path = "./rerun.frontend.v1alpha1.rs"]
4444
pub mod rerun_frontend_v1alpha1;
45+
46+
#[path = "./rerun.redap_tasks.v1alpha1.rs"]
47+
pub mod rerun_redap_tasks_v1alpha1;
4548
}
4649

4750
pub mod common {
@@ -110,6 +113,12 @@ pub mod sdk_comms {
110113
}
111114
}
112115

116+
pub mod redap_tasks {
117+
pub mod v1alpha1 {
118+
pub use crate::v1alpha1::rerun_redap_tasks_v1alpha1::*;
119+
}
120+
}
121+
113122
#[derive(Debug, thiserror::Error)]
114123
pub enum TypeConversionError {
115124
#[error("missing required field: {package_name}.{type_name}.{field_name}")]

0 commit comments

Comments
 (0)