5 CONCLUSION AND FUTURE WORK
CoAP traffic relies on UDP-based transport that minimizes latency, but it is typically blocked by firewalls. In this paper, we have proposed a mechanism that overcomes this problem through TCP encapsulation. This, however, degrades latency as network packet loss results in transport layer retransmissions that delay packet delivery. In order to mitigate this effect, we have extended CoAP encapsulation to perform it over multiple TCP streams. Experimental results show that this mechanism reduces application-layer packet loss by an amount between 7% and 33% depending on network conditions and the number of streams under consideration. This lower application-layer packet loss is tied to lower latency as packets arriving faster tend to survive the delay restrictions imposed by playout buffers. This is particularly important since streams are TCP based and TCP natively converts network packet loss into transport delay due to retransmissions. In addition, the efficiency of this approach is mathematically modeled and can be used, in turn, to assess the application-layer quality. Moreover, based on this model, an application can dynamically select the minimum number of encapsulation streams, and therefore overhead, that would guarantee a given QoS goal. Note that under this approach, however, the analytical model fails to provide a closed-form expression of packet latency that can be used to better understand the effects of network impairments on the application layer. Another limitation of the mathematical model presented in this paper is that it assumes no contention at media access. As an area of future work, the mathematical model presented in this paper can be further extended to quantify application QoS through a Quality Score that provides to IoT applications what a Mean Opinion Score provides to RTC applications. This involves, among other considerations, closed-form expressions for the estimation of latency.