Backend - Rust
When building the site with a full-stack framework like Nuxt, I realized that developing with JavaScript or TypeScript just wasn’t the right fit for me. Consequently, I started looking for a solution that would give me greater confidence.
Backend solutions can be divided into those built on scripting (interpreted) languages and those that leverage traditional compiled languages.
Python is another interpreted language on this list. It’s part of my regular toolkit, and I actually used it within the MEVISYS platform to build the MeSca project (you can check it out under the Projects tab). While Python could certainly do the job, it inherently shares a very similar set of characteristics with JavaScript and TypeScript. Because of this, Python is out of the question for building a high-speed, reliable application.
When it came to compiled languages, my research yielded the following shortlist:
- Java
- C#
- Go
- Rust
Java is definitely the veteran option here, and it still powers a massive amount of applications and websites. However, market research shows it is on the decline. On top of that, it is not a traditional compiled language that outputs a native executable binary. For the MEVISYS platform, this makes it less than ideal.
C# is definitely a stable and high-performance solution. However, I didn’t find it particularly appealing to learn “yet another C clone,” especially since I already program in C++ (typically alongside Qt) in addition to standard C.
Go was an option I considered very seriously. Among other things, it’s the language behind VictoriaMetrics, the database we decided to use for data storage. From a client project perspective, it is undoubtedly a great choice, as it has become a standard solution for a wide range of applications today.
Rust is the newest and arguably the most admired solution today, thanks to its completely unique approach to memory management. On top of that, Rust is recently gaining serious traction in the field of embedded solutions (microcontrollers), making it highly appealing for an embedded developer like me.
When making my choice, I was torn between Go and Rust. Ultimately, Rust won out because of its novel, safer memory management mechanism and the fact that it can be used on embedded platforms. Choosing Go would probably have been a safer bet, but I currently find the overall potential of Rust more exciting.
I ended up rewriting the backend from TypeScript (Nuxt) to Rust. It works incredibly well, and the codebase remains quite clean and easy to navigate. Most importantly, it dramatically simplified our Docker deployment. Absolutely none of the headaches I experienced with Nuxt followed me over here. What worked natively on Windows worked just as well in Docker. This is a critical piece of information for any development workflow, as it allows you to catch and resolve issues during the calmer phase of development, rather than during the far more stressful deployment stage.
My colleague David Wünsche also considers Rust to be a highly compelling solution, so we made the decision to build our backend exclusively in this language.