문제

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 ?

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top