Bringing CoAP/DTLS Into The Cloud
Build The Iron Ships
About 200 years ago, the first thought about building ships using iron. It’s a historical anecdote of that time in 1810, that, figuring out, “iron doesn’t swim”, the British admiralty refused to even hear a proposal on using iron for ships. Today the common sense has changed and the statement from that period seems to be a curiosity.
Using CoAP/DTLS/UDP in the internet and cloud has some parallels to those “iron ships”. I work now since 2015 on using that technology in the internet and cloud. And yes, there are many pitfalls and so it’s very obvious, that many believe, it is not working nor useful for the internet. The common sense seems to be, that UDP is not reliable!
If you dig a little under the surface, the things are changing. Ships do not swim, because the material swims, they swim because of the Archimedes’ principle. That was known even in 1810 for more than 2000 years! Ships were build using wood, because it was easier to handle as iron and the tools to do that where more mature. If you manage to handle iron as well and when you improve your tools, you benefit from iron’s outstanding features.
Today using TLS/TCP is easier and much more common to handle than DTLS/UDP. The network infrastructure support for TLS/TCP is ways better, than the mostly none existing support for DTLS/UDP. But once you manage to handle DTLS/UDP, it will show it’s outstanding features. Short messages are handled with really tiny overhead, the round trip times are short, and they can be easily forwarded and distribute, perfect for scaling cloud use-cases. And, of course, it is reliable! The internet’s reliability is based on retransmissions of IP packages. TCP does this for you, but it’s so easy to do that on a layer above DTLS/UDP. In the end you will get aware, that the real reliability is based on using less packages with less data, rather than on using TCP.
I hope, make others understanding these benefits, will make more using it. And the more using it, the support in the infrastructure will come.
Iron itself doesn’t swim, but you can build the greatest swimming things out of it. And UDP itself isn’t reliable, but you can build very reliable communcation on it.
This Blog
CloudCoap is intended to be a collection of information around using CoAP and DTLS for communcation with a cloud infrastructure. It provides some technical background and some recommendations base on experience from a couple of years. It should not replace the knowledge of the common specifications, it should more guide to chose the right ones. I found it quite hard to get a set of these technical specification, which addresses the use of CoAP in the public internet communicating with a cloud service. And even harder to find mature implementations to see it in practice.
Therefore I started this blog. Maybe, over the time, it gets one part of changing the common sense.