Chapter 3

Understanding Data Communication


  • Understanding how data communication works
  • The basics of how data is structured
  • The fundamentals of the MQTT messaging protocol
  • Sketching the P2PMQTT protocol


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.

Sometimes ...

Get Professional Android Open Accessory Programming with Arduino now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.