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

gRPC server currently doesn't support client-side streaming #1882

Closed
lhr0909 opened this issue Mar 30, 2019 · 2 comments
Closed

gRPC server currently doesn't support client-side streaming #1882

lhr0909 opened this issue Mar 30, 2019 · 2 comments

Comments

@lhr0909
Copy link

lhr0909 commented Mar 30, 2019

I'm submitting a...


[ ] Regression 
[ ] Bug report
[x] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

Currently the gRPC server implementation, the call.request is being passed in, however, for client-side streaming (and bi-directional streaming), there isn't request field in the call, but rather call itself is a readable stream on its own.

Reference:

in grpc-node package:
https://github.com/grpc/grpc-node/blob/master/packages/grpc-native-core/index.d.ts#L385
https://github.com/grpc/grpc-node/blob/master/packages/grpc-native-core/index.d.ts#L462

in nestjs-microservices package:
https://github.com/nestjs/nest/blob/master/packages/microservices/server/server-grpc.ts#L134
https://github.com/nestjs/nest/blob/master/packages/microservices/server/server-grpc.ts#L144

Expected behavior

NestJS handlers should be able to detect whether or not the grpc call has client-side streaming, and pass call directly.

Minimal reproduction of the problem with instructions

N/A

What is the motivation / use case for changing the behavior?

We are already doing great work encapsulating gRPC microservices, it would be cool to have full client-side streaming support. I am not sure if we should go full-on observable style for processing the client-side streaming calls, but I am all for it since I am in love with Rx and NestJS is already converting server-side streaming handshake to use observables.

Environment


Nest version: 5.x, 6.x

 
For Tooling issues:
- Node version: XX  
- Platform:  

Others:

@lhr0909
Copy link
Author

lhr0909 commented Mar 30, 2019

Oops, I should really look at #1568 first, closing this for now.

@lhr0909 lhr0909 closed this as completed Mar 30, 2019
@lock
Copy link

lock bot commented Sep 23, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant