-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
feat(grpc): Support for manual duplex streaming connections for GRPC methods defined as stream <-> stream with proto service #1292
Conversation
… to method handler - Will determine which type of streaming is preselected by developer and act accordingly
- Local system reports that `asyncfunction` should be used for assert - Travis builder reports that `function` should be used for such assert Changing back to follow Travis environment to define tests.
Pull Request Test Coverage Report for Build 1322
💛 - Coveralls |
@kamilmysliwiec Hi, can I ask when this PR will be merged or get into the discussion? As of now we using manual |
Hi @anton-alation, |
@kamilmysliwiec Sorry for such late answer, I was busy with holidays and wrestling Kafka :) Let me check on how actually decorators passing values to routing templates in Nest (last time I was checking it a bit abstracted) and I will get back with some solution for that (only if you don't want to implement it by yourself). As well on new decorator names, it can be: Happy holidays! |
Sure thing, I hope you had good holidays! Either |
@anton-alation any update? Really need grpc client stream. I'm totally blocked ATM. Also a decorator is nice but I really need to be able to create the client's manually too. |
@woodcockjosh we using this branch code for us already 2 months. I will be providing gists later to patch the code, and will be updating this PR to work through annotations next week. Sorry that it took so long, we been struggling with kafka-node driver issues so I was busy making it all work together nicely :) |
A bit of patience, the code is half-way done, had a bit of a lag figuring on how tests are organized. ETA next week for tested PR. |
@kamilmysliwiec added new PR with TS-Decorator |
I believe that this one can be closed now then? @anton-alation |
Sure. |
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. |
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue 1286: #1286
Issue 1264: #1264
As described in both Issues
ServerGrpc.createStreamServiceMethod
by current design doesn't provide incoming stream for manual dispatch to amethodHandler
, while it still can satisfyClient Unary -> Server Stream back
type of case, full-duplex connections like(stream Message) returns (stream Message)
cannot be dispatched.What is the new behavior?
New behavior updating current design by providing framework users to decide on how to dispatch events on stream handler by passing stream handler on stream occasion directly to the method handler.
Using this approach developer can do something as following:
If handler Promised return value is
null
then Framework dispatcher will treat this action as a manual control of the stream and will not try to make any further dispatch for expected Promise or Observable. Rest will stay on the side of the implementation.If handler Promised return value is an Observable function or Promise, then behavior would be done as it was defined before this fix: Framework dispatcher expects Promise or Observable and then dispatch writes back to stream based on data presented in Observable or Promise passed back from the handler.
Does this PR introduce a breaking change?
Other information