add example for thrift protocol