<s>
Protocol	B-Protocol
Buffers	I-Protocol
(	O
Protobuf	B-Protocol
)	O
is	O
a	O
free	B-License
and	I-License
open-source	I-License
cross-platform	B-Operating_System
data	O
format	O
used	O
to	O
serialize	B-Application
structured	O
data	O
.	O
</s>
<s>
The	O
method	O
involves	O
an	O
interface	B-General_Concept
description	I-General_Concept
language	I-General_Concept
that	O
describes	O
the	O
structure	O
of	O
some	O
data	O
and	O
a	O
program	O
that	O
generates	O
source	O
code	O
from	O
that	O
description	O
for	O
generating	O
or	O
parsing	O
a	O
stream	O
of	O
bytes	O
that	O
represents	O
the	O
structured	O
data	O
.	O
</s>
<s>
Google	B-Application
developed	O
Protocol	B-Protocol
Buffers	I-Protocol
for	O
internal	O
use	O
and	O
provided	O
a	O
code	B-Application
generator	I-Application
for	O
multiple	O
languages	O
under	O
an	O
open-source	B-Application
license	O
(	O
see	O
below	O
)	O
.	O
</s>
<s>
The	O
design	O
goals	O
for	O
Protocol	B-Protocol
Buffers	I-Protocol
emphasized	O
simplicity	O
and	O
performance	O
.	O
</s>
<s>
In	O
particular	O
,	O
it	O
was	O
designed	O
to	O
be	O
smaller	O
and	O
faster	O
than	O
XML	B-Protocol
.	O
</s>
<s>
Protocol	B-Protocol
Buffers	I-Protocol
are	O
widely	O
used	O
at	O
Google	B-Application
for	O
storing	O
and	O
interchanging	O
all	O
kinds	O
of	O
structured	O
information	O
.	O
</s>
<s>
The	O
method	O
serves	O
as	O
a	O
basis	O
for	O
a	O
custom	O
remote	B-Operating_System
procedure	I-Operating_System
call	I-Operating_System
(	O
RPC	O
)	O
system	O
that	O
is	O
used	O
for	O
nearly	O
all	O
inter-machine	B-Protocol
communication	I-Protocol
at	O
Google	B-Application
.	I-Application
</s>
<s>
Protocol	B-Protocol
Buffers	I-Protocol
are	O
similar	O
to	O
the	O
Apache	B-Protocol
Thrift	I-Protocol
(	O
used	O
by	O
Facebook	O
,	O
Evernote	B-Application
)	O
,	O
Ion	B-Protocol
(	O
created	O
by	O
Amazon	O
)	O
,	O
or	O
Microsoft	O
Bond	O
protocols	O
,	O
offering	O
as	O
well	O
a	O
concrete	O
RPC	O
protocol	B-Protocol
stack	I-Protocol
to	O
use	O
for	O
defined	O
services	O
called	O
gRPC	B-Application
.	O
</s>
<s>
They	O
define	O
C++	B-Language
classes	O
for	O
each	O
message	O
and	O
service	O
in	O
example.proto	O
.	O
</s>
<s>
Canonically	O
,	O
messages	O
are	O
serialized	O
into	O
a	O
binary	O
wire	B-Protocol
format	O
which	O
is	O
compact	O
,	O
forward	O
-	O
and	O
backward-compatible	O
,	O
but	O
not	O
self-describing	O
(	O
that	O
is	O
,	O
there	O
is	O
no	O
way	O
to	O
tell	O
the	O
names	O
,	O
meaning	O
,	O
or	O
full	O
datatypes	O
of	O
fields	O
without	O
an	O
external	O
specification	O
)	O
.	O
</s>
<s>
There	O
is	O
no	O
defined	O
way	O
to	O
include	O
or	O
refer	O
to	O
such	O
an	O
external	O
specification	O
(	O
schema	O
)	O
within	O
a	O
Protocol	B-Protocol
Buffers	I-Protocol
file	O
.	O
</s>
<s>
The	O
officially	O
supported	O
implementation	O
includes	O
an	O
ASCII	O
serialization	B-Application
format	O
,	O
but	O
this	O
format	O
—	O
though	O
self-describing	O
—	O
loses	O
the	O
forward	O
-	O
and	O
backward-compatibility	O
behavior	O
,	O
and	O
according	O
to	O
some	O
,	O
is	O
thus	O
not	O
a	O
good	O
choice	O
for	O
applications	O
other	O
than	O
debugging	O
.	O
</s>
<s>
Though	O
the	O
primary	O
purpose	O
of	O
Protocol	B-Protocol
Buffers	I-Protocol
is	O
to	O
facilitate	O
network	O
communication	O
,	O
its	O
simplicity	O
and	O
speed	O
make	O
Protocol	B-Protocol
Buffers	I-Protocol
an	O
alternative	O
to	O
data-centric	O
C++	B-Language
classes	O
and	O
structs	B-Application
,	O
especially	O
where	O
interoperability	O
with	O
other	O
languages	O
or	O
systems	O
might	O
be	O
needed	O
in	O
the	O
future	O
.	O
</s>
<s>
A	O
schema	O
for	O
a	O
particular	O
use	O
of	O
protocol	B-Protocol
buffers	I-Protocol
associates	O
data	O
types	O
with	O
field	O
names	O
,	O
using	O
integers	O
to	O
identify	O
each	O
field	O
.	O
</s>
<s>
(	O
The	O
protocol	B-Protocol
buffer	I-Protocol
data	O
contains	O
only	O
the	O
numbers	O
,	O
not	O
the	O
field	O
names	O
,	O
providing	O
some	O
bandwidth/storage	O
savings	O
compared	O
with	O
systems	O
that	O
include	O
the	O
field	O
names	O
in	O
the	O
data	O
.	O
)	O
</s>
<s>
The	O
"	O
Line	O
"	O
and	O
"	O
Polyline	O
"	O
messages	O
,	O
which	O
both	O
use	O
Point	O
,	O
demonstrate	O
how	O
composition	O
works	O
in	O
Protocol	B-Protocol
Buffers	I-Protocol
.	O
</s>
<s>
Google	B-Application
provides	O
a	O
compiler	O
called	O
protoc	O
which	O
can	O
produce	O
output	O
for	O
C++	B-Language
,	O
Java	B-Language
or	O
Python	B-Language
.	O
</s>
<s>
For	O
example	O
,	O
after	O
a	O
C++	B-Language
version	O
of	O
the	O
protocol	B-Protocol
buffer	I-Protocol
schema	O
above	O
is	O
produced	O
,	O
a	O
C++	B-Language
source	O
code	O
file	O
,	O
polyline.cpp	O
,	O
can	O
use	O
the	O
message	O
objects	O
as	O
follows	O
:	O
</s>
<s>
Protobuf	B-Protocol
2.0	O
provides	O
a	O
code	B-Application
generator	I-Application
for	O
C++	B-Language
,	O
Java	B-Language
,	O
C#	B-Application
,	O
and	O
Python	B-Language
.	O
</s>
<s>
Protobuf	B-Protocol
3.0	O
provides	O
a	O
code	B-Application
generator	I-Application
for	O
C++	B-Language
,	O
Java	B-Language
(	O
including	O
JavaNano	O
,	O
a	O
dialect	O
intended	O
for	O
low-resource	B-General_Concept
environments	I-General_Concept
)	O
,	O
Python	B-Language
,	O
Go	B-Application
,	O
Ruby	B-Language
,	O
Objective-C	B-Language
,	O
C#	B-Application
.	O
</s>
<s>
It	O
also	O
supports	O
JavaScript	B-Language
since	O
3.0.0-beta-2	O
.	O
</s>
<s>
Third-party	O
implementations	O
are	O
also	O
available	O
for	O
Ballerina	B-Language
,	O
C	B-Language
,	O
C++	B-Language
,	O
Dart	B-Language
,	O
Elixir	B-Language
,	O
Erlang	B-Operating_System
,	O
Haskell	B-Language
,	O
JavaScript	B-Language
,	O
Perl	B-Language
,	O
PHP	B-Application
,	O
Prolog	B-Language
,	O
R	B-Language
,	O
Rust	B-Application
,	O
Scala	B-Application
,	O
Swift	B-Application
,	O
Julia	B-Application
and	O
Nim	O
.	O
</s>
