一种传输上的多个 Thrift 服务
只是在这里寻求确认: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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
正确的。据我了解,只有第二个
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).多路复用服务(本质上这就是您想要在这里做的)现在正在集成。已经有多种语言可用的补丁,要么已经被接受,要么正在审查过程中。
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 ;-)