example apache thrift system in java/php/javascript