-
Notifications
You must be signed in to change notification settings - Fork 25
/
README
34 lines (33 loc) · 1.86 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Quoting from http://en.wikipedia.org/wiki/Protocol_Buffers
Protocol Buffers is a serialization format with an interface
description language developed by Google. The original Google implementation
for C++, Java and Python is available under a free software, open source
license. Various other language implementations are either available or in
development.
.
The design goals for Protocol Buffers emphasized simplicity and
performance. In particular, it was designed to be faster than XML (no
reproducible comparisons are publicly available to confirm this,
however). Protocol Buffers is very similar to Facebook’s Thrift protocol,
except it does not include a concrete RPC stack to use for defined
services. Since Protocol Buffers was open sourced, a number of RPC stacks
have emerged to fill this gap.
.
Prior to the release as open source, Protocol Buffers had been widely used
at Google for storing and interchanging all kinds of structured
information. Protocol Buffers serve as a basis for a custom RPC system that
is used for practically all inter-machine communication at Google.[1]
.
Data structures and services are defined in the Proto Definition file
(.proto) which is then compiled with protoc. This compilation generates code
that matches the services. For example, example.proto will produce
example.pb.cc and example.pb.h which will define C++ classes for each
Message and Service example.proto defines.
.
Protocol Buffers allow serialization into any number of formats. In the
officially supported implementations there is a full Reflection interface
available, making it easy to serialize protos as XML and JSON.
.
Though the primary purpose of Protocol Buffers is to facilitate network
communication, its simplicity and speed make Protocol Buffers a great
replacement of data-centric C++ classes and structs.