Ruby 中使用 Thrift 实现 RPC 调用
Thrift 框架简介
Apache Thrift 是 Facebook 实现的一种高效的、支持多种编程语言的远程服务调用的框架。
详情参考官方文档
定义 .thrift 文件
namespace rb model
struct User {
  1: i32 id,
  2: string name,
}
service UserStorage {
  void set_user(1: User user),
  User get_user(1: i32 id),
}
Copyright © 2015 Powered by MWeb, Theme used GitHub CSS.
