-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Integrate GRPC #2626
Comments
We don't have any objection to support this. Otherwise we will come back to this somewhere in the future. Thank you for the report and understanding! |
What made you to close the issue? So, I'll reopen it for the future consideration and you are free to elaborate more what is in your mind on the matter. Thanks for understanding |
@artembilan |
Well, have just bumped into this article from Twitter: https://medium.com/netifi/differences-between-grpc-and-rsocket-e736c954e60 So, quoting the first paragraph:
Therefore we can't just replace gRPC with RSocket, especially when another side is already on gRPC. Unless why day RSocket would provide a gRPC transport, but I doubt that since there is a special Protobuf model in between. Any other thoughts? |
There is already some work done here, to have a spring starter for grpc. Might be good to adopt it into spring project. |
Thank you for sharing that with us. |
The LogNet gRPC starter doesn't seem to be actively developed anymore. Like others have said, gRPC is an RPC framework that works over HTTP/2 with Protocol Buffers as the data exchange format. So, I'm not sure what it would mean to integrate gRPC into Spring Integration. However, what might make sense is the use of Protobufs as a message encoding format. Luckily, Spring already has a ProtobufHttpMessageConverter, which can be used with Spring Integration. |
Thanks, @meltsufin , for feedback! Does it mean that there is just enough to use existing |
Well, no, I don't think you'd be communicating "over gRPC protocol". You'd just be encoding the messages the same as gRPC would. It's like when you encode messages as XML, you don't actually implement SOAP. Does it make sense? |
Thanks. That makes sense. So, we indeed need something what really connects and sends & receives Protobuf messages over gRPC. |
I'm not sure what kind of gRPC support in Spring Integration would be useful. gRPC heavily relies on code-generation and compile-time binding. It's possible to do runtime introspection of a gRPC service like gRPC CLI but that will have performance implications for production apps. |
Yeah... OK. So, there is no a generic way to interact with gRPC with some message abstraction, like we do with What you say reminds me an Apache CXF project (https://cxf.apache.org/) when we generate model and services according provided WSDL. This way we really are good to use a generated gRPC service though a Correct me if I'm wrong. Thanks |
I'm hardly a gRPC expert. So take my opinion with a grain of salt. :) I think you're correct in comparing it to CXF. @saturnism WDYT? |
communicating w/ a gRPC service usually end up using a generated stub, so it ends up looking like any other Java API calls. It is possible to make a gRPC call w/o the stub, and use the underlying protocol to send the payload, using something like ClientCall. All the stubs basically generate the underlying ClientCall. |
OK. Great! So, technically we don't need to go a generic So, having such a feedback it sounds like Won't Fix from this project perspective and nothing more than some doc or blog post somewhere to demonstrate gRPC from Spring Integration. |
That's my thought. But I wonder if @zhongyang0316 has a different use case in mind. Does the regular gRPC stubs work for the use case? |
Glad to see that the Spring community is interested in getting gRPC support.
|
@tzolov I see you were assigned to this topic, is there any plan in your mind? I'm happy to help as well. |
Thank you for proposing the help! As you see we already have a Protobuf support in Spring Integration: https://docs.spring.io/spring-integration/docs/current/reference/html/message-transformation.html#Protobuf-transformers. For channel adapters (gateways) we can borrow some ideas from Spring Cloud Function project: https://github.com/spring-cloud/spring-cloud-function/tree/main/spring-cloud-function-adapters/spring-cloud-function-grpc Feel free to contribute whatever you can: https://github.com/spring-projects/spring-integration/blob/main/CONTRIBUTING.adoc ! |
Thanks @artembilan. I'm exploring some ideas and prototyping, will get back soon. |
GRPC is very popular now and many projects need to be integrated. Is there any intention to integrate GRPC?
The text was updated successfully, but these errors were encountered: