add thrift library and a example