We found that we could wrap many Thrift calls into JSON using a JavaScript ORB bridge. We're using this in our Java service:
http://jabsorb.org/
We were able to wrap our Thrift service implementation classes with a JSONRPCBridge using a fairly small Servlet.
This works great for relatively small data exchanges. This is basically unusable for any large binary data, since JSON just doesn't have a good way to store a big blob of bytes.
Swaroop C H wrote:
Hello all, This might be a dumb question, but how do people deal with the issue of interaction between Ajax and Thrift-based APIs? For example, a web application usually has a web-based frontend usually written in Ajax as well as an API that is available for third-party applications and for the company's own mobile / desktop clients. If the Ajax cannot access the API directly, then a wrapper (that works with Ajax) would have to be written for every single service call. How do people usually solve this "problem"? Please excuse me if I have not articulated this concern properly. Regards, Swaroop Books and Blog - http://www.swaroopch.com Company - http://www.ionlab.in
