scql icon indicating copy to clipboard operation
scql copied to clipboard

scql的engine在通信时,用的什么协议,数据格式是什么?

Open friendsAI opened this issue 1 year ago • 5 comments

Issue Type

Others

Have you searched for existing issues?

Yes

Link to Relevant Documentation

No response

Question Details

两个engine在通信的时候,走的是tcp协议嘛?数据格式是二进制嘛?

friendsAI avatar Aug 21 '24 10:08 friendsAI

另外,engine执行mpc协议通信的时候,涉及到底层mpc的通信,都是通过engine的通信代码执行的吧?

friendsAI avatar Aug 21 '24 12:08 friendsAI

通过抓包,看到了很多prpc协议的包。请问,应用层是用的prpc协议吗?

friendsAI avatar Aug 21 '24 14:08 friendsAI

@friendsAI engine 服务在代码实现层面使用的是 brpc 框架,可以配置是 http 协议,还是 baidu_std,或者其他的。

如果是 http,底层还是 tcp 协议。MPC 协议的通信,是通过 engine 的 link service 进行通信的。

tongke6 avatar Aug 22 '24 07:08 tongke6

if (iter != options_.end()) { options = iter->second; } else { SPDLOG_LOGGER_WARN( logger, "not found options for role={}, default use http protocal", static_cast(role)); options.brpc_options.protocol = "http:proto"; } 是在这段代码配置brpc 使用http协议嘛? 那什么情况会进入if分支呢?

friendsAI avatar Aug 22 '24 08:08 friendsAI

可以看下 https://github.com/secretflow/scql/blob/main/engine/exe/main.cc#L48 是怎么注册的

tongke6 avatar Aug 30 '24 10:08 tongke6