Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
448 changes: 272 additions & 176 deletions cpp/beeremote.pb.cc

Large diffs are not rendered by default.

461 changes: 339 additions & 122 deletions cpp/beeremote.pb.h

Large diffs are not rendered by default.

2,418 changes: 2,057 additions & 361 deletions cpp/flex.pb.cc

Large diffs are not rendered by default.

10,650 changes: 6,359 additions & 4,291 deletions cpp/flex.pb.h

Large diffs are not rendered by default.

611 changes: 344 additions & 267 deletions go/beeremote/beeremote.pb.go

Large diffs are not rendered by default.

616 changes: 344 additions & 272 deletions go/beeremote/beeremote_protoopaque.pb.go

Large diffs are not rendered by default.

1,482 changes: 1,061 additions & 421 deletions go/flex/flex.pb.go

Large diffs are not rendered by default.

1,517 changes: 1,082 additions & 435 deletions go/flex/flex_protoopaque.pb.go

Large diffs are not rendered by default.

10 changes: 9 additions & 1 deletion proto/beeremote.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package beeremote;
option go_package = "github.com/thinkparq/protobuf/go/beeremote";

import "flex.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";

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

// Job contains all the data from the original request plus the job ID and
Expand Down Expand Up @@ -150,7 +158,7 @@ message Job {
// When all worker node(s) have accepted the job's work requests, but may be waiting on
// an available worker goroutine to pickup the request.
SCHEDULED = 3;
// When all work requests for this job are in progress.
// When any work requests for this job are in progress.
RUNNING = 4;
// TODO: https://github.com/ThinkParQ/bee-remote/issues/16
// A user manually requested the job be paused.
Expand Down
45 changes: 45 additions & 0 deletions proto/flex.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ syntax = "proto3";
package flex;
option go_package = "github.com/thinkparq/protobuf/go/flex";

import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";

// A WorkerNode is able to handle one or more types of work requests.
Expand Down Expand Up @@ -180,6 +181,34 @@ message WorkRequest {
optional RestorePolicy restore_policy = 13;
// Time in seconds to wait after a file is closed before replication begins.
optional uint32 cooldown_secs = 14;
// A work request scheduled for a future time is placed in the wait queue until it's expired.
google.protobuf.Timestamp ExecuteAfter = 15;
// delay_execution specifies a delay before execution. The executing node converts it to
// ExecuteAfter using its local time to avoid clock synchronization issues.
google.protobuf.Duration delay_execution = 16;
// bulk_info is optionally set when this work request belongs to a provider-controlled bulk
// operation. It carries builder-maintained metadata used to correlate the request with the
// provider's bulk operation and track its state within that operation.
optional BulkJobRequestInfo bulk_info = 17;
}

// BulkJobRequestInfo contains builder-maintained metadata for requests that participate in a
// provider controlled bulk operation.
message BulkJobRequestInfo {
// Builder-maintained in-mount path for provider bulk-operation state.
string state_mount_path = 1;
// Provider-defined bulk operation identifier for this request.
string operation = 2;
// Zero-based request index within the bulk operation.
int64 job_index = 3;
}

message BulkOperation {
string state_mount_path = 1;
uint32 rst_id = 2;
string operation = 3;
int64 next_job_index = 4;
optional string errors = 5;
}

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

message MockJob {
Expand Down Expand Up @@ -316,9 +350,15 @@ message Work {
// the ETag in that it is an application layer integrity check of the part's content.
string checksum_sha256 = 5;
bool completed = 6;
optional bool started = 7;
}
// Indicates whether the work is a job builder task.
bool job_builder = 6;
optional JobBuilderInfo job_builder_info = 7;
message JobBuilderInfo {
// Any bulk operations that were started.
repeated BulkOperation bulk_operations = 1;
}
}

// We use a common configuration update request/response types for all worker
Expand Down Expand Up @@ -410,6 +450,7 @@ message RemoteStorageTarget {
POSIX posix = 5;
Azure azure = 6;
string mock = 7;
XtreemStore xtreemstore = 8;
}

// The S3 type uses the AWS S3 SDK under the hood. To support non-AWS S3
Expand Down Expand Up @@ -462,6 +503,10 @@ message RemoteStorageTarget {
S3 s3 = 1;
string account = 2;
}

message XtreemStore {
S3 s3 = 1;
}

message POSIX {
string path = 1;
Expand Down
11 changes: 10 additions & 1 deletion rust/beeremote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,15 @@ pub struct JobRequest {
/// Time in seconds to wait after a file is closed before replication begins.
#[prost(uint32, optional, tag = "14")]
pub cooldown_secs: ::core::option::Option<u32>,
/// delay_execution specifies a delay used to generate the execute-after
/// time for the work request by adding it to the current time.
#[prost(message, optional, tag = "15")]
pub delay_execution: ::core::option::Option<::prost_types::Duration>,
/// bulk_info is optionally included when the job request participates in a provider-controlled
/// bulk operation. It contains builder-maintained metadata needed to track the request within
/// that bulk operation.
#[prost(message, optional, tag = "16")]
pub bulk_info: ::core::option::Option<super::flex::BulkJobRequestInfo>,
#[prost(oneof = "job_request::Type", tags = "10, 11, 12")]
pub r#type: ::core::option::Option<job_request::Type>,
}
Expand Down Expand Up @@ -276,7 +285,7 @@ pub mod job {
/// When all worker node(s) have accepted the job's work requests, but may be waiting on
/// an available worker goroutine to pickup the request.
Scheduled = 3,
/// When all work requests for this job are in progress.
/// When any work requests for this job are in progress.
Running = 4,
/// TODO: <https://github.com/ThinkParQ/bee-remote/issues/16>
/// A user manually requested the job be paused.
Expand Down
65 changes: 64 additions & 1 deletion rust/flex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,18 @@ pub struct WorkRequest {
/// Time in seconds to wait after a file is closed before replication begins.
#[prost(uint32, optional, tag = "14")]
pub cooldown_secs: ::core::option::Option<u32>,
/// A work request scheduled for a future time is placed in the wait queue until it's expired.
#[prost(message, optional, tag = "15")]
pub execute_after: ::core::option::Option<::prost_types::Timestamp>,
/// delay_execution specifies a delay before execution. The executing node converts it to
/// ExecuteAfter using its local time to avoid clock synchronization issues.
#[prost(message, optional, tag = "16")]
pub delay_execution: ::core::option::Option<::prost_types::Duration>,
/// bulk_info is optionally set when this work request belongs to a provider-controlled bulk
/// operation. It carries builder-maintained metadata used to correlate the request with the
/// provider's bulk operation and track its state within that operation.
#[prost(message, optional, tag = "17")]
pub bulk_info: ::core::option::Option<BulkJobRequestInfo>,
#[prost(oneof = "work_request::Type", tags = "10, 11, 12")]
pub r#type: ::core::option::Option<work_request::Type>,
}
Expand Down Expand Up @@ -288,6 +300,33 @@ pub mod work_request {
Builder(super::BuilderJob),
}
}
/// BulkJobRequestInfo contains builder-maintained metadata for requests that participate in a
/// provider controlled bulk operation.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BulkJobRequestInfo {
/// Builder-maintained in-mount path for provider bulk-operation state.
#[prost(string, tag = "1")]
pub state_mount_path: ::prost::alloc::string::String,
/// Provider-defined bulk operation identifier for this request.
#[prost(string, tag = "2")]
pub operation: ::prost::alloc::string::String,
/// Zero-based request index within the bulk operation.
#[prost(int64, tag = "3")]
pub job_index: i64,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BulkOperation {
#[prost(string, tag = "1")]
pub state_mount_path: ::prost::alloc::string::String,
#[prost(uint32, tag = "2")]
pub rst_id: u32,
#[prost(string, tag = "3")]
pub operation: ::prost::alloc::string::String,
#[prost(int64, tag = "4")]
pub next_job_index: i64,
#[prost(string, optional, tag = "5")]
pub errors: ::core::option::Option<::prost::alloc::string::String>,
}
/// JobBuilderJob is a special type of job that creates job requests of any time.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BuilderJob {
Expand All @@ -299,6 +338,13 @@ pub struct BuilderJob {
/// Stores the number of failed job requests.
#[prost(int32, tag = "3")]
pub errors: i32,
/// Stores the number of jobs that were not created due to another job or process holding the
/// file access lock.
#[prost(int32, tag = "5")]
pub conflicts: i32,
/// Any bulk operations that are started.
#[prost(message, repeated, tag = "4")]
pub bulk_operations: ::prost::alloc::vec::Vec<BulkOperation>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MockJob {
Expand Down Expand Up @@ -426,6 +472,8 @@ pub struct Work {
/// Indicates whether the work is a job builder task.
#[prost(bool, tag = "6")]
pub job_builder: bool,
#[prost(message, optional, tag = "7")]
pub job_builder_info: ::core::option::Option<work::JobBuilderInfo>,
}
/// Nested message and enum types in `Work`.
pub mod work {
Expand Down Expand Up @@ -461,6 +509,14 @@ pub mod work {
pub checksum_sha256: ::prost::alloc::string::String,
#[prost(bool, tag = "6")]
pub completed: bool,
#[prost(bool, optional, tag = "7")]
pub started: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct JobBuilderInfo {
/// Any bulk operations that were started.
#[prost(message, repeated, tag = "1")]
pub bulk_operations: ::prost::alloc::vec::Vec<super::BulkOperation>,
}
#[derive(
Clone,
Expand Down Expand Up @@ -672,7 +728,7 @@ pub struct RemoteStorageTarget {
/// in the rst package for additional details.
///
/// Ref: <https://groups.google.com/g/protobuf/c/ojpYHqx2l04>
#[prost(oneof = "remote_storage_target::Type", tags = "4, 5, 6, 7")]
#[prost(oneof = "remote_storage_target::Type", tags = "4, 5, 6, 7, 8")]
pub r#type: ::core::option::Option<remote_storage_target::Type>,
}
/// Nested message and enum types in `RemoteStorageTarget`.
Expand Down Expand Up @@ -778,6 +834,11 @@ pub mod remote_storage_target {
#[prost(string, tag = "2")]
pub account: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct XtreemStore {
#[prost(message, optional, tag = "1")]
pub s3: ::core::option::Option<S3>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Posix {
#[prost(string, tag = "1")]
Expand All @@ -801,6 +862,8 @@ pub mod remote_storage_target {
Azure(Azure),
#[prost(string, tag = "7")]
Mock(::prost::alloc::string::String),
#[prost(message, tag = "8")]
Xtreemstore(XtreemStore),
}
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
Expand Down
Loading