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 10 commits into
base: main
Choose a base branch
from
Draft
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.

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_protos(&["./proto/metadata_store_svc.proto"], &["proto"])?;

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

Ok(())
}
24 changes: 24 additions & 0 deletions crates/metadata-store/proto/metadata_store_network_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.metadata_store_network_svc;

// Grpc service definition for the metadata store network implementation.
service MetadataStoreNetworkSvc {
rpc ConnectTo(stream NetworkMessage) returns (stream NetworkMessage);
}

message NetworkMessage {
bytes payload = 1;
}

Loading