Protocols
Saved & recent

Protocol

Also called: communication protocol, wire protocol

A protocol is an agreement about how participants communicate: which messages exist, how they are represented, what they mean, and what can happen next. An implementation is the software that follows those rules. Two programs can use different languages and operating systems while speaking the same protocol.

Imagine a small inventory service that accepts a lookup message and returns either a quantity or an unknown-item error. Agreeing on the message shape alone is insufficient: both sides also need to agree what the quantity measures and how failures are reported.

Related
Protocol stack, Protocol state machine, Protocol conformance
Further reading
IETF RFC 1122 — Requirements for Internet Hosts — Communication Layers
client program server program LOOKUP item=7 RESULT stock=12 format meaning sequence shared protocol contract hypothetical inventory exchange
Hypothetical inventory exchange: independent programs follow the same rules for message format, meaning, and sequence.

View in the full Protocols collection