<s>
In	O
software	B-Architecture
architecture	I-Architecture
,	O
a	O
messaging	B-Operating_System
pattern	I-Operating_System
is	O
an	O
architectural	O
pattern	O
which	O
describes	O
how	O
two	O
different	O
parts	O
of	O
an	O
application	O
,	O
or	O
different	O
systems	O
connect	O
and	O
communicate	O
with	O
each	O
other	O
.	O
</s>
<s>
In	O
telecommunications	O
,	O
a	O
message	B-Operating_System
exchange	I-Operating_System
pattern	I-Operating_System
(	O
MEP	O
)	O
describes	O
the	O
pattern	O
of	O
messages	B-Architecture
required	O
by	O
a	O
communications	O
protocol	O
to	O
establish	O
or	O
use	O
a	O
communication	O
channel	O
.	O
</s>
<s>
The	O
communication	O
channel	O
is	O
the	O
infrastructure	O
that	O
enables	O
messages	B-Architecture
to	O
"	O
travel	O
"	O
between	O
the	O
communicating	O
parties	O
.	O
</s>
<s>
The	O
message	B-Operating_System
exchange	I-Operating_System
patterns	I-Operating_System
describe	O
the	O
message	O
flow	O
between	O
parties	O
in	O
the	O
communication	O
process	O
,	O
there	O
are	O
two	O
major	O
message	B-Operating_System
exchange	I-Operating_System
patterns	I-Operating_System
—	O
a	O
request	B-Protocol
–	I-Protocol
response	I-Protocol
pattern	O
,	O
and	O
a	O
one-way	O
pattern	O
.	O
</s>
<s>
For	O
example	O
,	O
when	O
viewing	O
content	O
on	O
the	O
Internet	O
(	O
the	O
channel	O
)	O
,	O
a	O
web	B-Application
browser	I-Application
(	O
a	O
communicating	O
party	O
)	O
would	O
use	O
the	O
HTTP	B-Protocol
(	O
the	O
communication	O
protocol	O
)	O
to	O
request	O
a	O
web	O
page	O
from	O
the	O
server	O
(	O
another	O
communicating	O
party	O
)	O
,	O
and	O
then	O
render	O
the	O
returned	O
data	O
into	O
its	O
visual	O
form	O
.	O
</s>
<s>
This	O
is	O
how	O
the	O
request	B-Protocol
–	I-Protocol
response	I-Protocol
messaging	B-Operating_System
pattern	I-Operating_System
operates	O
.	O
</s>
<s>
Alternatively	O
,	O
in	O
computer	O
networking	O
,	O
we	O
have	O
the	O
UDP	B-Protocol
network	O
protocol	O
.	O
</s>
<s>
It	O
is	O
used	O
with	O
the	O
one-way	O
messaging	B-Operating_System
pattern	I-Operating_System
,	O
where	O
the	O
sending	O
party	O
is	O
not	O
interested	O
whether	O
the	O
message	O
arrives	O
to	O
any	O
receiving	O
party	O
,	O
nor	O
it	O
expects	O
any	O
of	O
the	O
receiving	O
parties	O
to	O
produce	O
an	O
"	O
answering	O
"	O
message	O
.	O
</s>
<s>
For	O
example	O
,	O
when	O
browsing	O
the	O
Internet	O
,	O
a	O
number	O
of	O
different	O
devices	O
work	O
in	O
tandem	O
to	O
deliver	O
the	O
message	O
through	O
the	O
internet	O
traffic	O
--	O
routers	O
,	O
switches	O
and	O
network	O
adapters	O
,	O
which	O
on	O
a	O
hardware	O
level	O
send	O
and	O
receive	O
signals	O
in	O
the	O
form	O
of	O
TCP	B-Protocol
or	O
UDP	B-Protocol
packages	O
.	O
</s>
<s>
Unlike	O
device	O
communications	O
,	O
where	O
the	O
form	O
of	O
the	O
message	O
data	O
is	O
limited	O
to	O
protocols	O
supported	O
by	O
the	O
type	O
and	O
capabilities	O
of	O
the	O
devices	O
involved	O
(	O
for	O
example	O
in	O
computer	O
networking	O
we	O
have	O
the	O
TCP	B-Protocol
and	O
UDP	B-Protocol
protocols	I-Protocol
,	O
a	O
walkie-talkie	O
would	O
sending	O
radio	O
waves	O
in	O
specific	O
frequency	O
,	O
and	O
a	O
beacon	O
would	O
be	O
flashing	O
Morse	O
code	O
sequences	O
that	O
a	O
person	O
could	O
read	O
)	O
,	O
a	O
software	O
can	O
establish	O
more	O
complex	O
and	O
robust	O
data	O
exchange	O
formats	O
.	O
</s>
<s>
Additionally	O
,	O
the	O
software	O
message	O
exchange	O
enables	O
more	O
variations	O
of	O
the	O
message	B-Operating_System
exchange	I-Operating_System
pattern	I-Operating_System
which	O
are	O
no-longer	O
limited	O
to	O
the	O
simple	O
request-reply	B-Protocol
and	O
one-way	O
approaches	O
.	O
</s>
<s>
And	O
last	O
,	O
but	O
not	O
least	O
,	O
software	O
communication	O
systems	O
are	O
capable	O
of	O
providing	O
various	O
channels	O
for	O
data	O
exchange	O
which	O
can	O
be	O
used	O
to	O
optimize	O
the	O
message	O
delivery	O
,	O
or	O
to	O
establish	O
complex	O
rules	O
for	O
selection	O
and	O
filtering	O
which	O
help	O
deciding	O
which	O
parties	O
to	O
receive	O
certain	O
messages	B-Architecture
.	O
</s>
<s>
The	O
term	O
message	B-Operating_System
exchange	I-Operating_System
pattern	I-Operating_System
has	O
an	O
extended	O
meaning	O
within	O
the	O
Simple	O
Object	O
Access	O
protocol	O
(	O
SOAP	B-Application
)	O
.	O
</s>
<s>
SOAP	B-Application
MEP	O
types	O
include	O
:	O
</s>
<s>
In-Out	O
:	O
This	O
is	O
equivalent	O
to	O
request	B-Protocol
–	I-Protocol
response	I-Protocol
.	O
</s>
<s>
The	O
ØMQ	B-Operating_System
message	O
queueing	O
library	O
provides	O
so-called	O
sockets	O
(	O
a	O
kind	O
of	O
generalization	O
over	O
the	O
traditional	O
IP	B-Protocol
and	O
Unix	B-Protocol
sockets	I-Protocol
)	O
which	O
require	O
indicating	O
a	O
messaging	B-Operating_System
pattern	I-Operating_System
to	O
be	O
used	O
,	O
and	O
are	O
optimized	O
for	O
each	O
pattern	O
.	O
</s>
<s>
The	O
basic	O
ØMQ	B-Operating_System
patterns	O
are	O
:	O
</s>
<s>
Request	B-Protocol
–	I-Protocol
reply	I-Protocol
connects	O
a	O
set	O
of	O
clients	O
to	O
a	O
set	O
of	O
services	O
.	O
</s>
<s>
This	O
is	O
a	O
remote	B-Operating_System
procedure	I-Operating_System
call	I-Operating_System
and	O
task	O
distribution	O
pattern	O
.	O
</s>
<s>
Publish	B-Operating_System
–	I-Operating_System
subscribe	I-Operating_System
connects	O
a	O
set	O
of	O
publishers	O
to	O
a	O
set	O
of	O
subscribers	O
.	O
</s>
<s>
Request-reply	B-Protocol
defines	O
so-called	O
"	O
service	O
bus	O
"	O
,	O
publish-subscribe	B-Operating_System
defines	O
"	O
data	O
distribution	O
tree	O
"	O
,	O
push-pull	O
defines	O
"	O
parallelised	O
pipeline	O
"	O
.	O
</s>
<s>
The	O
REST	B-Protocol
protocol	O
is	O
a	O
messaging	O
protocol	O
built	O
on	O
top	O
of	O
the	O
HTTP	B-Protocol
protocol	I-Protocol
,	O
and	O
,	O
similarly	O
,	O
uses	O
the	O
request-reply	B-Protocol
pattern	O
of	O
message	O
exchange	O
.	O
</s>
<s>
While	O
HTTP	B-Protocol
's	O
primary	O
goal	O
is	O
to	O
deliver	O
web	O
pages	O
and	O
files	O
over	O
the	O
Internet	O
which	O
are	O
targeted	O
for	O
a	O
human	O
end-user	O
,	O
the	O
REST	B-Protocol
protocol	O
is	O
mostly	O
used	O
for	O
communication	O
between	O
different	O
software	O
systems	O
,	O
and	O
has	O
a	O
key	O
role	O
in	O
the	O
microservices	O
software	B-Architecture
architecture	I-Architecture
pattern	O
.	O
</s>
<s>
Among	O
the	O
notable	O
qualities	O
of	O
the	O
REST	B-Protocol
protocol	O
is	O
that	O
it	O
is	O
versatile	O
enough	O
to	O
represent	O
data	O
in	O
many	O
other	O
formats	O
(	O
typically	O
JSON	O
and	O
XML	O
)	O
and	O
that	O
it	O
provides	O
additional	O
metadata	O
descriptors	O
for	O
the	O
message	O
it	O
represents	O
.	O
</s>
<s>
The	O
metadata	O
descriptors	O
follow	O
the	O
HTTP	B-Protocol
standards	O
by	O
being	O
represented	O
as	O
HTTP	B-Protocol
headers	O
(	O
which	O
are	O
standardized	O
by	O
the	O
underlying	O
HTTP	B-Protocol
protocol	I-Protocol
)	O
and	O
so	O
they	O
could	O
be	O
used	O
as	O
instructions	O
for	O
the	O
receiving	O
party	O
on	O
how	O
to	O
interpret	O
the	O
message	O
payload	O
.	O
</s>
<s>
Because	O
of	O
that	O
,	O
REST	B-Protocol
greatly	O
improves	O
the	O
development	O
of	O
a	O
software	O
system	O
that	O
is	O
capable	O
of	O
communicating	O
with	O
another	O
software	O
system	O
,	O
since	O
the	O
developers	O
need	O
to	O
be	O
aware	O
only	O
of	O
the	O
higher-level	O
format	O
of	O
the	O
message	O
payload	O
(	O
the	O
JSON	O
or	O
XML	O
model	O
)	O
.	O
</s>
<s>
The	O
actual	O
HTTP	B-Protocol
communication	O
is	O
usually	O
handled	O
by	O
a	O
software	O
library	O
or	O
framework	O
.	O
</s>
<s>
Another	O
great	O
quality	O
of	O
the	O
REST	B-Protocol
protocol	O
is	O
that	O
it	O
is	O
suitable	O
to	O
built	O
other	O
protocol	O
semantics	O
on	O
top	O
of	O
it	O
,	O
which	O
is	O
the	O
example	O
with	O
HATEOAS	B-Operating_System
.	O
</s>
