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

add network crdt api #171

Closed
wants to merge 4 commits into from
Closed
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
18 changes: 18 additions & 0 deletions proto/decentraland/kernel/apis/engine_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,15 @@ message CrdtSendToResponse {
repeated bytes data = 1;
}

message CrdtSendToNetworkRequest {
bytes data = 1;
string client_id = 2;
}
message CrdtSendToNetworkResponse {
// list of CRDT messages coming back from the renderer
repeated bytes data = 1;
}

message CrdtGetStateRequest {}
message CrdtGetStateResponse {
// returns true if the returned state has scene-created entities
Expand All @@ -87,6 +96,11 @@ message CrdtMessageFromRendererRequest {}
message CrdtMessageFromRendererResponse {
repeated bytes data = 1;
}
message IsServerRequest {}
message IsServerResponse {
bool is_server = 1;
repeated string clients = 2;
}

service EngineApiService {
// support for legacy SDK events.
Expand All @@ -102,6 +116,10 @@ service EngineApiService {
// like raycast responses or the player's position
rpc CrdtSendToRenderer(CrdtSendToRendererRequest) returns (CrdtSendToResponse) {}

// TBD: wip
rpc CrdtSendNetwork(CrdtSendToNetworkRequest) returns (CrdtSendToNetworkResponse) {}
rpc IsServer(IsServerRequest) returns (IsServerResponse) {}

// retrieves the current _full_ state of the entities from the renderer. This function is used to hidrate
// the state of the scenes when the code of the worker is stopped/resumed
rpc CrdtGetState(CrdtSendToRendererRequest) returns (CrdtGetStateResponse) {}
Expand Down
Loading