The Abstract Wikipedia team is working toward a rewrite of our backend services in a different programming language, likely Rust. Node/JS has served us well, but we have run up against some [WebAssembly System Interface] limits that would be best dealt with by switching to a different ecosystem.
Node.js is really not a bad backend language, since it’s JIT, it’s actually faster than Python and Java in most cases.
Rust will definitely have the advantage of being a compiled language though.
Source: I write both Java and TS backend code, have done benchmarks.
Java is JIT’d too, and Python can be depending on which runtime you deploy.
True, I didn’t structure my sentence correctly.
It gets to compete with Java and Python because it’s also JIT is what I meant to say.
Somehow, it feels horrifying to use something that high-level for the backend, especially when MediaWiki has so much PHP and the WMF has so many PHP programmers. Maybe my adolescent arse is getting old…
Oh PHP is hands down one of the slowest languages out there. It’s just convenient because it’s easy to host, but it’s awful to use and it’s really slow.
Here, have a chart:
In this chart, where the benchmark is calculating digits of π, Java is faster than JS, but there are cases where it’s the opposite.
https://github.com/niklas-heer/speed-comparison?tab=readme-ov-file
Calculating the digits of pi seems like a poor benchmark for comparing various languages in the context of backend web application performance. Even the GitHub readme points out the benchmark is entirely focused on floating point performance.
Absolutely, it’s just one aspect of it, benchmarking is always narrow in scope. Some languages may be good at some things and worse at others.
Node.js is a runtime, you can compile a number of languages to it. It’s useful because it can have relatively low resource usage and there are a lot of libraries available for it.