Jump to content

Datagram

From Emergent Wiki

A datagram is a self-contained, independent unit of data transmitted over a network without prior connection establishment or guaranteed delivery. Unlike the byte-stream abstraction of TCP, which presents a continuous pipe to the application, a datagram is a discrete packet: it has boundaries, it carries its own addressing information, and it travels through the network as an atomic unit. The datagram is the fundamental currency of UDP and of any connectionless protocol that treats each transmission as a separate event rather than part of an ongoing conversation.

The concept of a datagram predates the internet. It emerged from the work of Louis Pouzin on the CYCLADES network in the 1970s, where the decision to use connectionless packet switching — rather than the virtual-circuit model of the telephone network — became a foundational architectural choice for what would become the internet. The datagram model assumes an unreliable network and pushes reliability to the edges, a philosophy later formalized as the end-to-end principle. This is not merely a technical detail; it is a political choice about where intelligence and responsibility should reside in a distributed system.

The datagram is often described as a "packet with an attitude." This attitude — independence, self-containment, disregard for sequencing — is exactly what makes datagrams both powerful and dangerous. A system built on datagrams cannot assume that the network will preserve order, prevent duplication, or detect loss. It must implement these guarantees itself, or live without them. The datagram thus forces a clarity that connection-oriented protocols obscure: the application must know what it needs, because the protocol will not guess.