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

Problems in yacl/link/transport #90

Closed
maths644311798 opened this issue Jul 15, 2023 · 6 comments
Closed

Problems in yacl/link/transport #90

maths644311798 opened this issue Jul 15, 2023 · 6 comments
Assignees

Comments

@maths644311798
Copy link
Contributor

maths644311798 commented Jul 15, 2023

(1) You claim that the transport protocol is based on gRPC in www.secretflow.org.cn. But the code shows that it is based on bRPC. Why?

(2) Another problem is the function
`
explicit ChannelBrpc(size_t self_rank, size_t peer_rank, Options options,
bool exit_if_async_error = true)
: ChannelBase(self_rank, peer_rank, exit_if_async_error),
options_(std::move(options)) {}

explicit ChannelBrpc(size_t self_rank, size_t peer_rank,
size_t recv_timeout_ms, Options options,
bool exit_if_async_error = true)
: ChannelBase(self_rank, peer_rank, recv_timeout_ms, exit_if_async_error),
options_(std::move(options)) {}
`
But ChannelBase does not have such interface.

@6fj
Copy link
Member

6fj commented Jul 17, 2023

@usafchn could you please have a look?

@shaojian-ant
Copy link

(1) Brpc is compatible whith grpc if set the appropriate configuration, refer to https://github.com/apache/brpc/blob/master/docs/en/http_derivatives.md#h2grpc

(2) I don't fully understand your question. ChannelBrpc is a class inherited from ChannelBase, and it has some parameters in its construstors propagated to ChannelBase except the options parameters.

@maths644311798
Copy link
Contributor Author

Thanks. For the problem (2), I see that my copy of codes is not updated completely.

@maths644311798
Copy link
Contributor Author

I want to ask one moe question.
(3) What is the main advantage to design such a transport protocol instead of using TCP directly?

@shaojian-ant
Copy link

The word transport in our code does not mean the transport in the internet protocol stack. It use grpc/brpc to transport our data, so it is on application layer. By using grpc/brpc service framework, we need not consider a lot about sending/receiving messages, and it simplifies work on definition of our own application layer protocol, I think this is the main advantage.

@anakinxc
Copy link
Contributor

I want to ask one moe question.
(3) What is the main advantage to design such a transport protocol instead of using TCP directly?

Well, good question, this is more or less a practical thingy.

In thoery, one can always use socket directly. But in real world scenarios, due to complexity of network, using RPC is just a simpler and safer option with reasonable overhead for most cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants