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 Query (no stream) handler in Wasm Query Service #17

Open
jubeless opened this issue Mar 20, 2023 · 1 comment
Open

Add Query (no stream) handler in Wasm Query Service #17

jubeless opened this issue Mar 20, 2023 · 1 comment

Comments

@jubeless
Copy link
Contributor

jubeless commented Mar 20, 2023

The current WASM query implementation registers all services as streams

for _, methodConfig := range config.Methods {
handler, err := wasmEngine.GetHandler(methodConfig, protoCodec, logger)
if err != nil {
return nil, fmt.Errorf("failed to get handler: %w", err)
}
grpcService.Streams = append(grpcService.Streams, grpc.StreamDesc{
StreamName: methodConfig.Name,
Handler: handler.handle,
ServerStreams: true,
})
}

Irrelevant of the proto specification

service TestService {
rpc TestGet(GetTestRequest) returns (stream Tuple);
rpc TestGetMany(TestGetManyRequest) returns (stream Tuples);
rpc TestPrefix(TestPrefixRequest) returns (stream Tuples);
rpc TestScan(TestScanRequest) returns (stream Tuples);
}

There is no point in supporting stream since our current WASM query handler returns a single message. We should either support both or migrate everything to a single message request response.

@jubeless
Copy link
Contributor Author

Close with commit 9fdb804

@jubeless jubeless reopened this Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant