一种传输上的多个 Thrift 服务

发布于 2024-08-27 04:27:02 字数 299 浏览 4 评论 0原文

只是在这里寻求确认:apache Thrift 协议似乎不支持在一个传输端点上运行多个服务? (套接字,文件,等等)

我似乎无法弄清楚如何在 Thrift 中做这样的事情:

service otherService {
    void dosomething()
}

service rootService {
    otherService getOtherService()
}

似乎没有任何传入和传出服务句柄的概念,最终受到协议的限制。看起来您无法在一个传输管道上运行两项服务。正确的 ?

Just seeking confirmation here : apache Thrift protocol does not seem to support running multiple services on one transport endpoint ? ( a socket, file, whatever )

I cant seem to figure out how to do something like this in Thrift:

service otherService {
    void dosomething()
}

service rootService {
    otherService getOtherService()
}

There does not seem to be any concept of passing in and out service handles, ultimately limited by the protocol. Looks like you can not run two services on one transport pipe. Correct ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

十级心震 2024-09-03 04:27:02

正确的。据我了解,只有第二个 service 会由 thrift 生成,这就是启动您用首选语言(java、python 等)创建的服务器时所绑定的内容。

Correct. As I understand it, only the second service would be generated by thrift, and this is what would be bound when starting the server you create in your preferred language (java, python, etc).

当梦初醒 2024-09-03 04:27:02

多路复用服务(本质上这就是您想要在这里做的)现在正在集成。已经有多种语言可用的补丁,要么已经被接受,要么正在审查过程中。

https://issues.apache.org/jira/browse/THRIFT-563是一个很好的起点。

PS:欢迎审稿人和贡献;-)

Multiplexed Services (in essence that's what you want to do here) are being integrated right now. There are already patches for a number of languages available, either already accepted or in the process of being reviewed.

https://issues.apache.org/jira/browse/THRIFT-563 is a good place to start.

PS: Reviewers and contributions are welcome ;-)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文