Thrift 和 Protocol Buffers 比较

 ThriftProtocol Buffers Backers Bindings Output Formats Primitive Types Enumerations Constants Composite Type Exception Type Documentation License Compiler Language RPC Interfaces RPC Implementation Composite Type Extensions
Facebook, Apache (accepted for incubation) Google
C++, Java, Python, PHP, XSD, Ruby, C#, Perl, Objective C, Erlang, Smalltalk, OCaml, and Haskell C++, Java, Python
(Perl, Ruby, and C# under discussion)
Binary, JSON Binary
bool
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
Yes Yes
Yes No
struct message
Yes No
So-so Good
BSD-style Apache
C++ C++
Yes Yes
Yes No
No Yes

 

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编译有点麻烦。

 

 

你可能感兴趣的:(c,erlang,python,C#,Ruby)