Thrift-like API definitions/generation for seamlessly sharing APIs between client/server