by abalone · 8y ago · 0 comments
Reading between the lines here, they didn't go with a more mature language like Java because they were worried GC tuning would be a problem?
Given all the other issues they noted with using a less mature language like Rust in production, that's a pretty heavy load to take on in exchange for not having to tune GC. Isn't GC tuning a fairly well understood problem? Is there something about encoding large documents that makes it a significantly greater obstacle?
Or are there other unstated considerations at play here? For example, I mean this completely earnestly and not cynically, but there is a lot more PR and recruitment value in blogging about a hot new cutting-edge language than "how we rewrote our TypeScript server in Java".
To name just two ways in which I consider Rust more mature than Java:
* It has a lot of fundamentals that are based on more academic languages which have explored some specific PLT space for a long time and let it mature. The fruits of that are now in Rust (many aspects of its type system for example).
* Rust's community has an almost absurd ability (contrasted with most other languages) to focus on specific core libraries and tooling. For example serde[1], the Rust serialization library, is well-understood, simple, mature and supported in basically every Rust library out there.
The second point is extremely impressive when contrasted with the state of things in Java-land, where you often have many different solutions for the same problems. Sometimes even the well-known and used ones are of very questionable quality[2].
[1]: https://serde.rs/ [2]: https://github.com/FasterXML/jackson-databind/pull/1423
[1] https://blog.takipi.com/the-ultimate-json-library-json-simpl...
Your second point is invalidated by the blog itself: "Many libraries are still early".
GCs also tend to have cliffs where you hit some unknown threshold when they start thrashing where deterministic release of memory tends to be much more linear.
I've experienced this, having previously worked on Java services.
It can be quite a pain and can throw a wrench into your understanding of how you intended to scale.
The post says GC was already a problem in their old system.
FWIW, I'm excited for Rust and also Swift for exactly these reasons. I just want to see hard justifications for using them in production this early.
I think the question was profound (if accidentally so), and I agree with him: when performance and footprint matter, it is reasonable to expect software engineers to manage their resources in a predictable manner -- which excludes garbage collected environments.
Rust is a very interesting candidate for such environments, and I think the experience described here is quite helpful for those of us seriously contemplating the language.
Then, that is what "tuning" usually means in engineering. See also "PID loop tuning".
Potential solution 1: Replace with code that doesn't have garbage collector overhead in the first place
Potential solution 2: Replace with code that has different, robust garbage collector
I get where you're coming from, but even I would be inclined to choose solution 1 in this case. That they chose Rust instead of C++ is their own business, but that they chose either of those over Java just seems sensible to me.
Wonder what the article would have said in a parallel universe where the problem was migrated to something like the Akka framework on the JVM?