惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
P
Palo Alto Networks Blog
T
ThreatConnect
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
T
True Tiger Recordings
P
Privacy & Cybersecurity Law Blog
B
Blog
IT之家
IT之家
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
C
Comments on: Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
N
News and Events Feed by Topic
NISL@THU
NISL@THU
腾讯CDC
雷峰网
雷峰网
Security Latest
Security Latest
李成银的技术随笔
M
Microsoft Research Blog - Microsoft Research
L
LangChain Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Check Point Blog
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
博客园 - Franky
N
News | PayPal Newsroom
V
V2EX
A
About on SuperTechFans
The Register - Security
The Register - Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
WordPress大学
WordPress大学
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
爱范儿
爱范儿
A
Arctic Wolf
L
LINUX DO - 最新话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - mjgforever

sp_executesql和临时表的用法 51 条 ActionScript 3.0 和 Flex 优化技术与实践 open source Flex project list Open Source Replication and Synchronization Tools Written in Java 用SyncML进行异构数据库复制 WF学习系列之六:工作流和宿主程序通讯异常引发的思考 - mjgforever - 博客园 WF学习系列之五:状态机工作流学习 WF学习系列之四:顺序工作流控制台应用程序模板介绍 WF学习系列之三:RuleSet知识点概述 WF学习系列之二:开发工作流知识点概述 WF学习系列之一:WF基本知识点概述 abstract, virtual, override, new 关键字的用法 ArcIMS 安装指南 Google推出Protocol Buffers:争夺网络时代数据格式 Protocol Buffers:Google 的数据交换格式 - mjgforever 微软vs.VMware:虚拟化中的真实战争 - mjgforever 文本文件与二进制文件 字符编码简介:ASCII,Unicode,UTF-8,GB2312 Adobe Flex的十大误解
Protocol Buffers 简介
mjgforever · 2008-07-10 · via 博客园 - mjgforever

Google 于昨日公布了它自己使用的结构化数据存储描述语言 Protocol Buffers,大致地看了下它的文档,可以将 Protocol Buffers 的特点归纳如下:

Protocol Buffers 是一种可用于通讯协议、数据存储等领域的语言无关、平台无关、可扩展的序列化结构数据格式。目前提供了 C++、Java、Python 三种语言的 API。

只需使用 Protocol Buffers 对数据结构进行一次描述,即可利用各种不同语言或从各种不同数据流中对你的结构化数据轻松读写。

Protocol Buffers 可扩展性好,“向后”兼容性好,你甚至不必破坏已部署的、依靠“老”数据格式的程序就可以对数据结构进行升级。

Protocol Buffers 以高效的二进制方式存储,比 XML 小 3 到 10 倍,快 20 到 100 倍,语义更清晰,无需类似 XML 解析器的东西(因为 Protocol Buffers 编译器会将 .proto 文件编译生成对应的数据访问类以对 Protocol Buffers 数据进行序列化、反序列化操作)。

Protocol Buffers 与 XML 相比也有不足之处。由于文本并不适合用来描述数据结构,所以 Protocol Buffers 也不适合用来对基于文本的标记文档(如 HTML)建模。另外,由于 XML 具有某种程度上的自解释性,它可以被人直接读取编辑,在这一点上 Protocol Buffers 不行,它以二进制的方式存储,除非你有 .proto 定义,否则你没法直接读出 Protocol Buffers 的任何内容。

总之,Protocol Buffers 是一种轻便高效的结构化数据存储格式,很适合做数据存储或 RPC 数据交换格式。