Understanding Data Communication
WHAT’S IN THIS CHAPTER?
- Understanding how data communication works
- The basics of how data is structured
- The fundamentals of the MQTT messaging protocol
- Sketching the P2PMQTT protocol
DATA COMMUNICATION BASICS
Never underestimate the bandwidth of a station wagon full of tapes hurtling down the highway.
—Tanenbaum, Andrew S. (1996). Computer Networks. New Jersey: Prentice-Hall. p. 83. ISBN 0-13-349945-6.
The act of communicating requires having two or more parties exchanging, requesting, sending, and evaluating data. Those involved in the information exchange can be people or machines. Successful exchanges require the use of a predetermined mechanism on how to request data, but also on how to acknowledge the arrival of it. The definition of those mechanisms is made in an abstract way and is independent of the transmission channel. It’s what we call a protocol.
Different protocols accommodate different scenarios of use. Trying to send data over a 6.000 Km long submarine cable is not the same as using a twisted pair of copper wires between two circuits at 10 cms distance from each other.
Understanding how communication works between two electronic devices requires thinking beyond the bits and electronic components themselves. You need to consider factors like noise, whether the communication happens over wires or in a wireless way, how far the devices are from each other, or how quickly you want data to be sent to the other side.