refact thrift
add thrift example