Callbacks in Thrift Asynchronous Functions?

Posted by Roberto Aloi on Stack Overflow See other posts from Stack Overflow or by Roberto Aloi
Published on 2010-03-31T17:13:08Z Indexed on 2010/04/10 7:23 UTC
Read the original article Hit count: 576

Filed under:
|
|
|

Hi all,

In Thrift it is possible to use the oneway modifier to specify a call as asynchronous.

Apparently, it's not possible to define a callback, though, to be executed when the execution of the function is completed.

It seems that the only possibility I have is to give my Thrift client (PHP) some "server" capabilities, so that, when the heavy computation is completed on the server side, I can send a notification to it. This means that I should have a new .thrift file, with new definitions, new services and all the rest and that I should generate php-server side code with Thrift.

Even if this is feasible, it looks like an overkill to me and I'm wondering if there's a more clever way to implement the callback.

Looking forward for some feedback from you, guys.

© Stack Overflow or respective owner

Related posts about php

Related posts about thrift