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

feat: add rpc component of dubbo #3833

Open
wants to merge 2 commits into
base: 2023.x
Choose a base branch
from

Conversation

CheerWinLi
Copy link

@CheerWinLi CheerWinLi commented Aug 24, 2024

Describe what this PR does / why we need it

about the thoughts on issue #3750

Describe how you did it

不同RPC协议的本质区别在于序列化和数据格式,在原有的springcloud的REST/HTTP协议上添加dubbo(triple)和grpc协议,sca体系中,微服务之间的调用多为feign调用,为了不改变sca体系中client跟sever原有的rest风格(使用springboot)开发习惯,feign进行http请求关键的部分在Feign.Client中,我们实现Feign.Client,在execute方法中,建立与server的netty连接,通过这个netty我们将http请求涉及的(url,body,method,headers,封装为HttpMetadata对象)通过rpc协议(triple,grpc)进行传输,在server侧根据获取到的httpMetadata对象构建http请求,交由server侧的spring调用链(dispatcherServlet)进行处理

The fundamental differences between different RPC (Remote Procedure Call) protocols lie in their serialization and data formats. The existing Spring Cloud framework, which primarily uses the REST/HTTP protocols, can be extended by adding support for protocols like Dubbo (Triple) and gRPC, In the SCA system, the invocation between microservices is mostly done through Feign calls. In order to not change the original REST style (using SpringBoot) development habits of the client and server in the SCA system, the key part of Feign's HTTP request is in the Feign.Client. We implement the Feign.Client, and in the execute method, we establish a Netty connection with the server. Through this Netty, we encapsulate the HTTP request-related information (URL, body, method, headers) into an HttpMetadata object, and then transmit it through the RPC protocol (Triple, gRPC). On the server side, we construct the HTTP request based on the obtained HttpMetadata object and pass it to the Spring call chain for processing(dispatcherServlet)

@CLAassistant
Copy link

CLAassistant commented Aug 24, 2024

CLA assistant check
All committers have signed the CLA.

@yuluo-yx yuluo-yx added area/dubbo Tagged as dubbo-related issue/pr area/spring cloud area/glcc glcc 赛题 labels Aug 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dubbo Tagged as dubbo-related issue/pr area/glcc glcc 赛题 area/spring cloud
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants