Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement simple networking layer for RaftMetadataStore #1866

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
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
205 changes: 205 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion crates/admin/src/cluster_controller/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@ where
}
}
Ok(cluster_state) = cluster_state_watcher.next_cluster_state() => {
scheduler.on_cluster_state_update(cluster_state).await?;
if let Err(err) = scheduler.on_cluster_state_update(cluster_state).await {
warn!("Could not perform scheduling operation: {err}");
}
}
Some(cmd) = self.command_rx.recv() => {
self.on_cluster_cmd(cmd, bifrost_admin).await;
Expand Down
7 changes: 7 additions & 0 deletions crates/metadata-store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,25 @@ restate-rocksdb = { workspace = true }
restate-types = { workspace = true }

anyhow = { workspace = true }
assert2 = { workspace = true }
async-trait = { workspace = true }
bytes = { workspace = true }
bytestring = { workspace = true }
derive_builder = { workspace = true }
derive_more = { workspace = true }
futures = { workspace = true }
http = { workspace = true }
humantime = { workspace = true }
hyper = { workspace = true }
hyper-util = { workspace = true }
prost = { workspace = true }
prost-types = { workspace = true }
protobuf = "2.28.0"
raft = { version = "0.7.0" }
rocksdb = { workspace = true }
schemars = { workspace = true, optional = true }
serde = { workspace = true }
slog = { version = "2.7.0" }
static_assertions = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true }
Expand All @@ -43,6 +48,8 @@ tonic-health = { workspace = true }
tower = { workspace = true }
tower-http = { workspace = true, features = ["trace"] }
tracing = { workspace = true }
tracing-slog = { version = "0.3.0" }
ulid = { workspace = true, features = ["serde"] }

[dev-dependencies]
restate-core = { workspace = true, features = ["test-util"] }
Expand Down
6 changes: 6 additions & 0 deletions crates/metadata-store/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,11 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
.protoc_arg("--experimental_allow_proto3_optional")
.compile(&["./proto/metadata_store_svc.proto"], &["proto"])?;

tonic_build::configure()
.bytes(["."])
.file_descriptor_set_path(out_dir.join("raft_metadata_store_svc.bin"))
.protoc_arg("--experimental_allow_proto3_optional")
.compile(&["./proto/raft_metadata_store_svc.proto"], &["proto"])?;

Ok(())
}
24 changes: 24 additions & 0 deletions crates/metadata-store/proto/raft_metadata_store_svc.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Copyright (c) 2024 - Restate Software, Inc., Restate GmbH
//
// This file is part of the Restate service protocol, which is
// released under the MIT license.
//
// You can find a copy of the license in file LICENSE in the root
// directory of this repository or package, or at
// https://github.com/restatedev/proto/blob/main/LICENSE

syntax = "proto3";

import "google/protobuf/empty.proto";

package dev.restate.raft_metadata_store_svc;

// Grpc service definition for the RaftMetadataStore implementation.
service RaftMetadataStoreSvc {
rpc Raft(stream RaftMessage) returns (stream RaftMessage);
}

message RaftMessage {
bytes message = 1;
}

Loading
Loading