C++ vs Rust: an async Thread-per-Core story

Glauber Costa
10 min readSep 4, 2020

Edit: due to a trademark issue, the project formerly known as Scipio was renamed to “Glommio”. The article was edited to match.

I have recently released a new Rust library aimed at easing the task of writing asynchronous Thread-per-Core applications: Glommio. I intend to use it to power the new generation of storage intensive systems I am writing for my current employer, Datadog.

But I am no novice to such systems: for the past 7+ years I have worked for ScyllaDB, a NoSQL database that managed to consistently post 5 to 10x performance improvements over its rivals, in large part by leveraging a Thread-per-Core architecture based on the Seastar asynchronous Thread-per-Core framework for C++.

In part because I had the luxury of starting later with many lessons learned, Glommio differs from Seastar in some aspects. To briefly touch on some: it is less opinionated about its applications, as I am trying to position it as a library rather than a framework. It allows applications to change their latency needs dynamically rather than statically at startup, etc. But by and large, Seastar and Glommio are very similar. (Well, another difference is that Seastar is a 7-year-old mature framework, and Glommio barely works enough for an initial release)

The biggest difference really is that Seastar is written in C++, and Glommio is written in Rust. So it is impossible to compare them without mostly talking about differences in the language. Comparing languages sound like a…

--

--