Skip to content

[server] Move all remote storage access to content-service #3144

@csweichel

Description

@csweichel

Now that content-service is an actual stand-alone service, we should move all bucket store operations to that service, thereby removing the need to maintain TS implementations of bucket storage backends.

Server currently accesses bucket storage for two reasons:

  1. workspaces: server can offer workspaces for download or delete them
  2. vsix plugins in Theia: server supports the up-/download mechanism of VSIX plugins in Theia

The latter will likely be deprecated with the advent of Code, hence we don't need to consider that one here.
The former is more important. We could provide an interface like:

service WorkspaceService {
    // Download provides a URL from where the content of a workspace can be downloaded from
    rpc DownloadWorkspace(DownloadWorkspaceRequest) returns (DownloadWorkspaceResponse) {};
    
    // DeleteWorkspace deletes the content of a single workspace
    rpc DeleteWorkspace(DeleteWorkspaceRequest) returns (DeleteWorkspaceResponse) {};

    // DeleteUserContent deletes all content associated with a user.
    rpc DeleteUserContent(DeleteUserContentRequest) returns (DeleteUserContentResponse) {};
}

message DownloadWorkspaceRequest {
    string owner_id = 1;
    string workspace_id = 2;
}
message DownloadWorkspaceResponse {
    string url = 1;
}

message DeleteWorkspaceRequest {
    string owner_id = 1;
    string workspace_id = 2;
}
message DeleteWorkspaceResponse {}

message DeleteUserContentRequest {
    string owner_id = 1;
}
message DeleteUserContentResponse {}

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions