You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a controller class that takes grpc services and exposes the service as a REST endpoint to take in a JSON representation of the grpc service. It works with all GRPC services you'd register and have a corresponding client exposed.
You just add @GrpcRestExposed to the grpc service and it will register it as part of an endpoint that takes a POST of JSON:
/api/{service_name}/{method}
And it uses the proto buf to json API by google.
It's pretty straightforward - and it's working.
But I'd like some feedback before I start documenting and adding tests to get this added into micronaut.
I find this useful because I can define a slew of services and then they'll have a REST endpoint exposed. I'd love to expand this to create the service definition, but for now this works fine.
Thoughts?
I'll be glad to go over more detail, but my thought is to define a grpc service and allow it to be called via gRPC, rest, or a kafka listener. This way you have a single service that performs 3 flexible ways. I didn't do the kafka part yet (I'd create a topic that matches the response name), but I plan to.
The text was updated successfully, but these errors were encountered:
Feature description
https://gitlab.com/ragsearch/pipelines/grpc-rest-exposed
I created a controller class that takes grpc services and exposes the service as a REST endpoint to take in a JSON representation of the grpc service. It works with all GRPC services you'd register and have a corresponding client exposed.
You just add @GrpcRestExposed to the grpc service and it will register it as part of an endpoint that takes a POST of JSON:
/api/{service_name}/{method}
And it uses the proto buf to json API by google.
It's pretty straightforward - and it's working.
But I'd like some feedback before I start documenting and adding tests to get this added into micronaut.
I find this useful because I can define a slew of services and then they'll have a REST endpoint exposed. I'd love to expand this to create the service definition, but for now this works fine.
Thoughts?
I'll be glad to go over more detail, but my thought is to define a grpc service and allow it to be called via gRPC, rest, or a kafka listener. This way you have a single service that performs 3 flexible ways. I didn't do the kafka part yet (I'd create a topic that matches the response name), but I plan to.
The text was updated successfully, but these errors were encountered: