Question

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 ?

Was it helpful?

Solution

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

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top