Thrift 和 Protocol Buffers 比较

 ThriftProtocol Buffers
BackersFacebook, Apache (accepted for incubation)Google
BindingsC++, Java, Python, PHP, XSD, Ruby, C#, Perl, Objective C, Erlang, Smalltalk, OCaml, and HaskellC++, Java, Python
(Perl, Ruby, and C# under discussion)
Output FormatsBinary, JSONBinary
Primitive Typesbool
byte
16/32/64-bit integers

double
string
byte sequence
map<t1,t2>
list<t>
set<t>
bool

32/64-bit integers
float
double
string
byte sequence

“repeated” properties act like lists
EnumerationsYesYes
ConstantsYesNo
Composite Typestructmessage
Exception TypeYesNo
DocumentationSo-soGood
LicenseBSD-styleApache
Compiler LanguageC++C++
RPC InterfacesYesYes
RPC ImplementationYesNo
Composite Type ExtensionsNoYes

 

http://stuartsierra.com/2008/07/10/thrift-vs-protocol-buffers

 

Milliseconds to create an object, smaller is better. The Protobuf results is not a mistake! It was created by the builder pattern.

Milliseconds to serialize an object to a byte array, smaller is better.
Milliseconds to deserialize an object from byte array, smaller is better.
Size of the byte array of a serialized object, smaller is better.

 

http://eishay.blogspot.com/2008/11/serialization-protobuf-vs-thrift-vs.html

 

从比较可以看出来,Thrift是很不错的,只是,现在似乎在windows编译有点麻烦。

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值