Skip to content

Commit 4b1f16b

Browse files
committed
feat(rst): TODO update commit - add support for bulk job request and xtreemstore
TODO: * Update commit to reflect final changes. * Break into muliple commits if reasonable.
1 parent ae240cc commit 4b1f16b

12 files changed

Lines changed: 11862 additions & 6224 deletions

cpp/beeremote.pb.cc

Lines changed: 272 additions & 176 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cpp/beeremote.pb.h

Lines changed: 339 additions & 122 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cpp/flex.pb.cc

Lines changed: 2057 additions & 361 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cpp/flex.pb.h

Lines changed: 6359 additions & 4291 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/beeremote/beeremote.pb.go

Lines changed: 344 additions & 267 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/beeremote/beeremote_protoopaque.pb.go

Lines changed: 344 additions & 272 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/flex/flex.pb.go

Lines changed: 999 additions & 359 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/flex/flex_protoopaque.pb.go

Lines changed: 1020 additions & 373 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

proto/beeremote.proto

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package beeremote;
33
option go_package = "github.com/thinkparq/protobuf/go/beeremote";
44

55
import "flex.proto";
6+
import "google/protobuf/duration.proto";
67
import "google/protobuf/timestamp.proto";
78

89
// Externally facing RPCs and messages clients and worker nodes use to interact
@@ -102,6 +103,13 @@ message JobRequest {
102103
optional flex.RestorePolicy restore_policy = 13;
103104
// Time in seconds to wait after a file is closed before replication begins.
104105
optional uint32 cooldown_secs = 14;
106+
// delay_execution specifies a delay used to generate the execute-after
107+
// time for the work request by adding it to the current time.
108+
optional google.protobuf.Duration delay_execution = 15;
109+
// bulk_info is optionally included when the job request participates in a provider-controlled
110+
// bulk operation. It contains builder-maintained metadata needed to track the request within
111+
// that bulk operation.
112+
optional flex.BulkJobRequestInfo bulk_info = 16;
105113
}
106114

107115
// Job contains all the data from the original request plus the job ID and
@@ -150,7 +158,7 @@ message Job {
150158
// When all worker node(s) have accepted the job's work requests, but may be waiting on
151159
// an available worker goroutine to pickup the request.
152160
SCHEDULED = 3;
153-
// When all work requests for this job are in progress.
161+
// When any work requests for this job are in progress.
154162
RUNNING = 4;
155163
// TODO: https://github.com/ThinkParQ/bee-remote/issues/16
156164
// A user manually requested the job be paused.

proto/flex.proto

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ syntax = "proto3";
33
package flex;
44
option go_package = "github.com/thinkparq/protobuf/go/flex";
55

6+
import "google/protobuf/duration.proto";
67
import "google/protobuf/timestamp.proto";
78

89
// A WorkerNode is able to handle one or more types of work requests.
@@ -180,6 +181,34 @@ message WorkRequest {
180181
optional RestorePolicy restore_policy = 13;
181182
// Time in seconds to wait after a file is closed before replication begins.
182183
optional uint32 cooldown_secs = 14;
184+
// A work request scheduled for a future time is placed in the wait queue until it's expired.
185+
google.protobuf.Timestamp execute_after = 15;
186+
// delay_execution specifies a delay before execution. The executing node converts it to
187+
// execute_after using its local time to avoid clock synchronization issues.
188+
google.protobuf.Duration delay_execution = 16;
189+
// bulk_info is optionally set when this work request belongs to a provider-controlled bulk
190+
// operation. It carries builder-maintained metadata used to correlate the request with the
191+
// provider's bulk operation and track its state within that operation.
192+
optional BulkJobRequestInfo bulk_info = 17;
193+
}
194+
195+
// BulkJobRequestInfo contains builder-maintained metadata for requests that participate in a
196+
// provider controlled bulk operation.
197+
message BulkJobRequestInfo {
198+
// Builder-maintained in-mount path for provider bulk-operation state.
199+
string state_mount_path = 1;
200+
// Provider-defined bulk operation identifier for this request.
201+
string operation = 2;
202+
// Zero-based request index within the bulk operation.
203+
int64 job_index = 3;
204+
}
205+
206+
message BulkOperation {
207+
string state_mount_path = 1;
208+
uint32 rst_id = 2;
209+
string operation = 3;
210+
int64 next_job_index = 4;
211+
optional string errors = 5;
183212
}
184213

185214
// JobBuilderJob is a special type of job that creates job requests of any time.
@@ -189,6 +218,11 @@ message BuilderJob {
189218
int32 submitted = 2;
190219
// Stores the number of failed job requests.
191220
int32 errors = 3;
221+
// Stores the number of jobs that were not created due to another job or process holding the
222+
// file access lock.
223+
int32 conflicts = 5;
224+
// Any bulk operations that are started.
225+
repeated BulkOperation bulk_operations = 4;
192226
}
193227

194228
message MockJob {
@@ -316,9 +350,15 @@ message Work {
316350
// the ETag in that it is an application layer integrity check of the part's content.
317351
string checksum_sha256 = 5;
318352
bool completed = 6;
353+
optional bool started = 7;
319354
}
320355
// Indicates whether the work is a job builder task.
321356
bool job_builder = 6;
357+
optional JobBuilderInfo job_builder_info = 7;
358+
message JobBuilderInfo {
359+
// Any bulk operations that were started.
360+
repeated BulkOperation bulk_operations = 1;
361+
}
322362
}
323363

324364
// We use a common configuration update request/response types for all worker
@@ -410,6 +450,7 @@ message RemoteStorageTarget {
410450
POSIX posix = 5;
411451
Azure azure = 6;
412452
string mock = 7;
453+
XtreemStore xtreemstore = 8;
413454
}
414455

415456
// The S3 type uses the AWS S3 SDK under the hood. To support non-AWS S3
@@ -462,6 +503,10 @@ message RemoteStorageTarget {
462503
S3 s3 = 1;
463504
string account = 2;
464505
}
506+
507+
message XtreemStore {
508+
S3 s3 = 1;
509+
}
465510

466511
message POSIX {
467512
string path = 1;

0 commit comments

Comments
 (0)