Embedded IoT Protocols Guide: Transport Protocols
by Exosite, on February 9, 2016
Following last week's post, Featured IoT Protocols Guide: Part I, this week we cover the second protocol to consider during your IoT solution development. Following the internet protocol, the next layer in the stack is the transport layer. This layer is important to consider when creating your IoT strategy because it provides the common features that all higher-level protocols need. This prevents the need to re-implement these features over and over in each application protocol. This section contains a brief explanation of the User Datagram Protocol (UDP) and the Transmission Control Protocol (TCP) transport protocols. Although a transport protocol is usually never a direct requirement, the background information below provides an understanding of the trade-offs between UDP and TCP when selecting between the application protocols and leverage them.
UDP
UDP is the most basic transport protocol and provides just two features on top of IP. The first is data integrity that, through the use of check-sums, ensures that the received data is the same as the data that was sent. The second application muxing that, through the use of port numbers, allows the network stack to direct individual packets back to the application, or subsystem in an IoT product deployment, that requested them.
This relative lack of features makes UDP incredibly simply to implement on top of IP, adding basically no hardware requirements to the application. How ever, it does lack some features that IoT applications are very likely to need, which the higher -level protocols will need to make up for.
TCP
TCP is UDP's big brother. At a high level, it provides reliable delivery of streams of data. It ensures that data is delivered exactly as it was sent and in the order it was sent. It also automatically re-requests any data that was lost or corrupted in transport, in addition to many more subtle features.
A TCP stack is much more complicated than UDP to implement and will require more hardware resources to use. However, this burden is often acceptable, as many applications will require some of the features that TCP provides. With the increasing availability of more powerful hardware to lower costs, the burden of TCP's additional features that are not required in a particular application are becoming less of a factor. There are even hardware network interfaces that include a full TCP stack, offloading all of the transport-level requirements from host devices.
Download our complete Embedded IoT Protocols white paper or contact us.