开发者

multiple Thrift services on one transport

开发者 https://www.devze.com 2022-12-25 04:32 出处:网络
Just seeking confirmation here : apache Thrift protocol does not seem to support running multiple services on one transport endpoint ? ( a socket, file, whatever )

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 lik开发者_JAVA百科e 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 ?


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).


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 ;-)

0

精彩评论

暂无评论...
验证码 换一张
取 消