Figure out Thrift API + added a simple example.