Here is some background to help you better understand the decision to make a strategic development change for the client.
When the idea for Mender was born, we started a challenging discussion about which technologies we should use to build it. After establishing the architecture, the Mender product engineering team began deciding which language would best fit the Mender application development. As such, we had the following non-negotiable requirements for whichever language we would use:
- Compiled binaries needed to be as small as possible since the client application would run on embedded devices.
- It needed to work with Yocto, the embedded distribution of Linux.
- The complexity of installation clients should be low, thereby limiting external dependencies and libraries.
- The language should compile across different architectures as it would run on various devices.
- The device that the Mender client application would run on would be an IoT or networked device, so the language needed access to networking libraries.
The non-negotiable requirements for selecting a new language also covered a few non-functional requirements:
- Within our organization, as many programmers as possible needed to understand the language.
- It had to be as easy as possible to share and reuse the existing code between existing applications written in C and between the client and server applications.
- Development speed should be efficient to enable our ability to add new features quickly.
As with many other decisions in the company, we wanted this one to be data-driven and based on facts, not opinions. We began a thorough evaluation of various options, eventually narrowing it down to three possibilities: C, C++, and Go. We tested and compared application binary sizes, resource consumption, performance, development speed, and other parameters. Eventually, we decided to go with Go! Our complete evaluation process is described in this blog article we published with StackOverflow: Comparing Go vs. C in embedded applications - Stack Overflow Blog
With the benefit of hindsight, we think the decision we made back then was the right one, and we are delighted with our Mender client. But the time has come to make a new decision to rewrite it in another language.
There are usually many reasons to decide to rewrite applications using a different technology. Often those are related to poor code quality and a lot of legacies, making it hard to keep the quality of the application high while efficiently adding new features. It might be related to the code’s reliability and usability or the number of bugs discovered during testing and production. Sometimes, the application performance might decline with the increased complexity, outdated technology, or security requirements. And lastly, in the delivery process, the development team might gain a deeper understanding of the product’s business domain. It can suggest a better implementation through a more efficient model.
In our case, we’ve always tried to develop our code with the best maintainability and quality and a deep focus on security; the decision to rewrite the Mender client is not related to any of the above and is purely strategic. The main reason is to expand the number of platforms our Mender client can support to increase compatibility with platforms aimed at the embedded market. These include the common RTOS platforms: QNX, Zephyr, FreeRTOS, and VxWorks.
Please note: Our server will remain developed in Go; This change only affects the Mender client (not the server or add-ons such as Remote Terminal or Configure). What does our decision to use C++ and the rewrite mean for you as a user or contributor? We’ve prepared a Q&A section to answer your questions, but feel free to contact us if you have any additional questions. We will be happy to answer any of those as well.