Skip to content

proto: add FindRange, FindSpace and UpdateRanges #6

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

Merged
merged 1 commit into from
Apr 9, 2025
Merged
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
78 changes: 78 additions & 0 deletions aeon_internal.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,46 @@ syntax = "proto3";

import "aeon_error.proto";
import "aeon_value.proto";
import "aeon_schema.proto";

package aeon;

// Internal API to Aeon - a distributed database based on Tarantool.
service InternalService {
// Get the gRPC server sideservice configuration.
rpc GetConfig(GetConfigRequest) returns (GetConfigResponse) {}
// Find space by name in space cache.
rpc FindSpace(FindSpaceRequest) returns (FindSpaceResponse) {}
// Find range by space name and a key in range cache.
rpc FindRange(FindRangeRequest) returns (FindRangeResponse) {}
// Update space cache.
rpc UpdateCache(UpdateCacheRequest) returns (UpdateCacheResponse) {}
}

// Description of a range.
message Range {
// The shard where the range is located.
string shard = 1;
// The range ID.
string id = 2;
// The space to which the range belongs.
string space = 3;
// Format of the space.
repeated FieldDef format = 4;
// Key definition of the space.
repeated KeyPartDef key_def = 5;
// Minimum key of the range.
Tuple key_begin = 6;
// Supremum key of the range, not included into the range.
Tuple key_end = 7;
// The state of the range.
string state = 8;
// The epoch of the range.
uint64 epoch = 9;
// The timestamp of the last change to the range.
uint64 timestamp = 10;
// The context of the range.
Value context = 11;
}

// Get the gRPC server sideservice configuration.
Expand Down Expand Up @@ -44,3 +77,48 @@ message GetConfigResponse {
// The gRPC server sideservice configuration.
Config config = 2;
}

// Find space by name in space cache.

message FindSpaceRequest {
// Name of the space to find.
string name = 1;
}

message FindSpaceResponse {
// Error information. Set only on failure.
Error error = 1;
// Name of the found space.
string name = 2;
// Format of the found space.
repeated FieldDef format = 3;
// Key definition of the found space.
repeated KeyPartDef key_def = 4;
// The engine of the found space.
Engine engine = 5;
}

// Find range by space name and a key in range cache.

message FindRangeRequest {
// The name of the space in which to search for the range.
string space = 1;
// Key from the range.
Tuple key = 2;
}

message FindRangeResponse {
// Error information. Set only on failure.
Error error = 1;
// Description of the found range.
Range range = 2;
}

// Update space and range caches.

message UpdateCacheRequest {}

message UpdateCacheResponse {
// Error information. Set only on failure.
Error error = 1;
}