airavata-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Supun Nakandala <>
Subject Integrating a thrift javascript client sdk with angularjs
Date Mon, 17 Mar 2014 18:37:09 GMT
Hi All,

I was able to do successful POC on the $subject (the source code is
available at [1]). I implemented a simple thrift API (thrift descriptor
[2]) for echo function. The server side was implemented in java and for the
client side I used javascript.

Important points WRT to thrift
    ->Thrift javascript client can be used only against a http server. So I
wrapped the[3] inside[4] and
deployed in tomcat server.
    ->Thrift client sdk currently supports only AJAX based communication.

Important points WRT to thrift client and angular integration
    ->Thrift js client can be used for the communication with the server
within angular. But the problem is, since thrift client is not part of
angular, when we do the ajax communication and update the model the changes
will not be updated in the DOM. The reason is angular is not aware of the
events triggered outside of the framework. But this can be overcome by
wrapping thrift client inside an angular service and using promises in
angular to notify the success of ajax calls and then manually updating the

The thrift client that I created for this service can be found at[5]. This
thrift client is wrapped inside this angular service[6] and that service is
used in controller [7]. I have also attached screen shots of the demo.

Hope Shameera, Sanchit, Viknes or Vijayendra can provide feedback on this
POC and evaluate whether this POC is sound enough to guaranty that web
based experiment builder can be integrated with the thrift client sdk.

Thank you.
Supun Nakandala

[1] -
[2] -
[3] -
[4] -
[5] -

[6] -

[7] -

View raw message