Skip to content

Conversation

@steinybot
Copy link
Collaborator

@steinybot steinybot commented Jul 5, 2025

Fixes #390

/claim #390

Problem

Built-in support in Kyo for gRPC.

Solution

The code generation uses paiges which I don't love. I started using Scalameta but it doesn't support comments. It is possible this has changed since then. Either way, perhaps switching back to Scalameta would be a better choice. This code got a bit funky.

This is similar to zio-grpc although their ServerLayer and ServiceList stuff seemed unnecessary.

I am using the high level API. In future I'll try implementing it using ServerCallHandler which would probably give much better flow control and backpressure. It seems to still be pretty performant even without it (I need to run the benchmarks again).

Notes

TODO during PR:

  • Rename ArenaBench2
  • Rerun benchmarks
  • Check for IOs
  • Update READMEs
  • Ensure everything has ScalaDocs
  • Ensure that the example compiles as part of the build
  • Decide what to use for the StreamChannel capacity
  • Make sure that the right stuff is private
  • Figure out what to do with the kyo version in the example project
  • Remove closeAwaitEmptyFiber

TODO after PR:

  • Reimplement the code gen using scalameta instead of paiges (ideally with a version of scalameta that supports comments)
  • Implement ServerCallHandler like ZIO does
  • Support Metadata and Attributes
  • Make sure observers backpressure and can be interrupted correctly.
  • Potentially split kyo-grpc-core into client / server
  • Potentially split kyo-grpc-core-gen into client / server / shared
  • Add link to https://grpc.io/docs/languages/
  • Check all of these https://grpc.io/docs/guides/
  • Split CodeGenerator into client / server
  • Add JS client tests

@ghostdogpr ghostdogpr mentioned this pull request Aug 24, 2025
@steinybot
Copy link
Collaborator Author

Back on this again finally. I have reimplemented a lot of stuff to support metadata and backpressure. I am redoing all the test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gRPC Support

2 participants