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

Generic server support #56

Closed
16 tasks done
timostamm opened this issue Dec 21, 2020 · 4 comments
Closed
16 tasks done

Generic server support #56

timostamm opened this issue Dec 21, 2020 · 4 comments
Labels
enhancement New feature or request
Milestone

Comments

@timostamm
Copy link
Owner

timostamm commented Dec 21, 2020

For clients, we generate a generic interface / implementation that is agnostic to the protocol.
The actual protocol implementation is delegated to a "transport".

A similar concept can be applied to servers. We generate a generic interface for a server, and provide the protocol in "backend" packages.

Proof of concept:

TODO

  • come up with sensible method signatures
  • adapter for unary
  • adapter for server streaming
  • adapter for client streaming
  • adapter for bidi streaming
  • check cancellation support
  • test deadlines
  • test error handling
  • fix UnhandledPromiseRejectionWarning when cancelling client call, see client-cancel-test.ts
  • generate generic server interfaces (proto-file-name.server.ts)
  • add plugin parameter "server_generic"
  • add server style GENERIC
  • example package
  • documentation (example-chat-system, MANUAL.md)
@timostamm timostamm added the enhancement New feature or request label Dec 21, 2020
timostamm added a commit that referenced this issue Dec 22, 2020
@timostamm
Copy link
Owner Author

Released in v2.0.0-alpha.9

timostamm added a commit that referenced this issue Dec 22, 2020
timostamm added a commit that referenced this issue Dec 22, 2020
@timostamm
Copy link
Owner Author

Updated in v2.0.0-alpha.10

timostamm added a commit that referenced this issue Dec 22, 2020
timostamm added a commit that referenced this issue Dec 22, 2020
timostamm added a commit that referenced this issue Dec 23, 2020
timostamm added a commit that referenced this issue Dec 31, 2020
@timostamm
Copy link
Owner Author

Deadline cancellation on server through grpc-backend do not work correctly. Getting the same error about incomplete chunked encoding as in smnbbrv/ngx-grpc#41

@timostamm
Copy link
Owner Author

Running with generic servers as experimental.

Fixed the readme of @protobuf-ts/grpc-backend, added the plugin option in the manual, added a very short section in the manual, making sure to note experimental status.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant