Go for IIoT Systems – BEC Systems
Summary
In this article, we will examine the challenges we face in developing industrial IoT (IIoT) systems, review desirable attributes in a programming language, and discuss how Go meets these needs. There are many variations of this, but let’s focus on a simple case that is typically composed of the following pieces: Edge device (remote equipment, sensors, etc), Cloud, and Browser. • statically linked (this makes it much easier to deploy updates as everything you need is embedded in one binary file) • easy to embed assets (again, this makes it easy to deploy in one file without containers) • is garbage collected, so we don’t have to worry about managing memory (we don’t have memory leaks, invalid pointers, and other problems that can cause field failures) • typed language (compiler catches more problems early instead of having crashes in the field) • popular and well-supported (will continue to improve and be around for a long time) • excellent concurrency support (a lot is going on in these systems, so this helps) • popular in cloud and distributed systems (there are plenty of stdlib features and 3rd party packages — metrics, monitoring, logging, communication, etc to help us build an IoT system) • language is simple (easy to learn, read, and maintain) • tooling is excellent, compile is blazing fast, no Makefiles, etc, built-in support for profiling, and easy to cross-compile for other systems (we spend less time messing around and more time deploying value to our customers) Go is not the best solution in every case, but if your situation matches what is described above, it might be a good fit. Go channels are easy to misuse, so it requires a little effort and practice to learn how to use them correctly, but once understood, it is a very simple and reliable way to manage concurrency in a system. Most C++ GUI toolkits are highly dependent on a single company that may be here today and gone tomorrow (look at the history of Qt for an example), or licensing requirements may change at any time — there are a lot of unknowns.