Loading...

Tag Archive for ‘ Protocol Buffers’

[译文]Protocol Buffers:Google 的数据交换格式

原文地址:Protocol Buffers: Google’s Data Interchange Format
本文地址:http://hellobmw.com/archives/protocol-buffers-googles-data.html
由 北极冰仔 翻译,转载请以超级链接的形式注明本文地址。
阅读全文 - 1337 字

Protocol Buffers 性能测试

昨天大致介绍了下 Protocol Buffers,由于时间关系没能做性能测试,今天上午补上,给 Protocol Buffers 做一个性能测试。
声明:转载请务必以超级链接的形式注明本文地址(http://hellobmw.com/archives/protocol-buffers-performance.html)。
细节就不讲了,测试程序是在电话本基础上改的,往一个 AddressBook 中插入 100000 条 Person 联系人记录,每个联系人有 1 个整型的 ID,1 个 std::string 型名称,还有 10 个 std::string 型电话号码。分别使用 debug 版本、release 版本、Protocol Buffers 速度优化模式(参见 Getting More Speed 部分)的 release 版本进行测试,每次测试前将之前生成的 addressbook 文件删除。
阅读全文 - 709 字

第一个 Protocol Buffers 小程序:电话本

晚上刚写了一篇《Protocol Buffers 简介》,然后就开始动手实战试用一下 Protocol Buffers 这个 Google 出品的东东。
首先从 Protocol Buffers 的主页上把源码下回来,注意是源码,那个 Win32 包不必下,它里面只有一个编译好的 protoc.exe,没有开发所必须的库,光有那个 Protocol Buffers 编译器是没用。
将源码解压出来以后,直接到 vsprojects 目录下用 Visual Studio 2005(其它版本我没有试)打开解决方案文件 protobuf.sln 开始编译。编译成功结束后会在解决方案目录下生成一个 google 目录,里面是单元测试的程序;另外就是 Debug 目录和 Release 目录了,生成的对应版本的 .lib 和 .dll 还有 protoc.exe 编译器全在里面。
阅读全文 - 2102 字

Protocol Buffers 简介

Google 于昨日公布了它自己使用的结构化数据存储描述语言 Protocol Buffers,大致地看了下它的文档,可以将 Protocol Buffers 的特点归纳如下:
Protocol Buffers 是一种可用于通讯协议、数据存储等领域的语言无关、平台无关、可扩展的序列化结构数据格式。目前提供了 C++、Java、Python 三种语言的 API。
只需使用 Protocol Buffers 对数据结构进行一次描述,即可利用各种不同语言或从各种不同数据流中对你的结构化数据轻松读写。
阅读全文 - 755 字