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