| 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编译有点麻烦。
本文对比了Thrift和Protocol Buffers两种数据交换格式的特点。Thrift由Facebook发起,支持多种语言绑定,具备RPC接口;Protocol Buffers由Google开发,在输出格式、原始类型等方面与Thrift有所不同。文中还提到了两者在Windows平台上的使用情况。
304

被折叠的 条评论
为什么被折叠?



