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

Feature: gRPC Web #9

Merged
merged 1 commit into from
Jun 27, 2022
Merged

Feature: gRPC Web #9

merged 1 commit into from
Jun 27, 2022

Conversation

sgammon
Copy link
Member

@sgammon sgammon commented Jun 25, 2022

Ready for review Powered by Pull Request Badge

This changeset introduces support for gRPC Web via a pure Kotlin server-side implementation for the JVM.

At runtime, the gRPC server is observed by a bean creation listener, which then informs a new RPC runtime layer of services which should be eligible for dispatch via gRPC Web.

A controller registered for the user is then responsible for decoding requests, resolving/dispatching them, and encoding the resulting response back to the client, all in a manner compliant with the gRPC Web Protocol.

Changelog

  • Add RPC runtime layer, bean observer
  • Add initial structure to decode and encode gRPC Web traffic
  • Register central AppExecutor for use with user's gRPC server note: this was a bad idea
  • Ability to decode RPCs
  • Ability to encode RPCs
  • Small testsuite for encoding back and forth
  • Safe dispatch of RPCs
  • Protocol document-based testsuite
    • Basic success cases
    • Complex success cases
    • Goldens nah
    • Basic failure cases
    • Complex failure cases
  • New module merge checklist
    • Logging review
    • Module-level docs note: future PR
    • Dependency review
  • JS-side library build note: future PR
  • Consideration for web-side tests note: future PR
  • Full client tests note: future PR

@sgammon sgammon self-assigned this Jun 25, 2022
@elide-dev elide-dev deleted a comment from github-actions bot Jun 25, 2022
@elide-dev elide-dev deleted a comment from github-actions bot Jun 25, 2022
@elide-dev elide-dev deleted a comment from github-actions bot Jun 25, 2022
@sgammon sgammon force-pushed the feat/grpc-web branch 4 times, most recently from 454c8e2 to 9fe0ff9 Compare June 26, 2022 02:46
@codecov-commenter
Copy link

codecov-commenter commented Jun 26, 2022

Codecov Report

❗ No coverage uploaded for pull request base (v3@27488fb). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##             v3       #9   +/-   ##
=====================================
  Coverage      ?   66.04%           
  Complexity    ?      160           
=====================================
  Files         ?       27           
  Lines         ?     1125           
  Branches      ?       95           
=====================================
  Hits          ?      743           
  Misses        ?      359           
  Partials      ?       23           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 27488fb...3e473e0. Read the comment docs.

@sgammon sgammon force-pushed the feat/grpc-web branch 10 times, most recently from 798e7fa to 178a88a Compare June 27, 2022 00:58
@sgammon sgammon added module:rpc Modules, changes, and issues relating to the Elide RPC layer feature Large PRs or issues with full-blown features platform:jvm PRs and issues relating to JVM support. 🚧 WIP Works-in-progress. Blocks merge labels Jun 27, 2022
@sgammon sgammon added this to the Alpha 1: Initial Release milestone Jun 27, 2022
@sgammon sgammon force-pushed the feat/grpc-web branch 2 times, most recently from 3e473e0 to 96a59ce Compare June 27, 2022 08:53
@sgammon sgammon removed the 🚧 WIP Works-in-progress. Blocks merge label Jun 27, 2022
This changeset introduces support for gRPC Web via a pure Kotlin
server-side implementation for the JVM.

At runtime, the gRPC server is observed by a bean creation listener,
which then informs a new RPC runtime layer of services which should
be eligible for dispatch via gRPC Web.

A controller registered for the user is then responsible for
decoding requests, resolving/dispatching them, and encoding the
resulting response back to the client, all in a manner compliant
with the [gRPC Web Protocol][1].

Changes enclosed:
- Add RPC runtime layer, bean observer
- Add initial structure to decode and encode gRPC Web traffic
- Add testsuite for decoding and processing gRPC Web traffic
- Ability to encode/decode trailer-equipped responses
- Error cases in testsuite

[1]: https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-WEB.md
@sgammon sgammon marked this pull request as ready for review June 27, 2022 09:13
@sgammon sgammon merged commit d43bbe5 into v3 Jun 27, 2022
@sgammon sgammon deleted the feat/grpc-web branch June 27, 2022 09:14
@sonarcloud
Copy link

sonarcloud bot commented Jun 27, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@sgammon sgammon mentioned this pull request Jul 4, 2022
30 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Large PRs or issues with full-blown features module:rpc Modules, changes, and issues relating to the Elide RPC layer platform:jvm PRs and issues relating to JVM support.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants