this post was submitted on 02 Nov 2024
73 points (100.0% liked)

Open Source

31224 readers
324 users here now

All about open source! Feel free to ask questions, and share news, and interesting stuff!

Useful Links

Rules

Related Communities

Community icon from opensource.org, but we are not affiliated with them.

founded 5 years ago
MODERATORS
 

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.

top 11 comments
sorted by: hot top controversial new old
[–] isVeryLoud@lemmy.ca 12 points 1 week ago* (last edited 1 week ago) (2 children)

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.

[–] Aatube@kbin.melroy.org 8 points 1 week ago (1 children)

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...

[–] isVeryLoud@lemmy.ca 5 points 1 week ago* (last edited 1 week ago) (1 children)

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

[–] elrik@lemmy.world 8 points 1 week ago* (last edited 1 week ago) (1 children)

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.

[–] isVeryLoud@lemmy.ca 3 points 1 week ago* (last edited 1 week ago)

Absolutely, it's just one aspect of it, benchmarks are always narrow in scope. Some languages may be good at some things and worse at others.

[–] 4z01235@lemmy.world 6 points 1 week ago (1 children)

since it's JIT, it's actually faster than Python and Java in most cases.

Java is JIT'd too, and Python can be depending on which runtime you deploy.

[–] isVeryLoud@lemmy.ca 2 points 1 week ago

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.

[–] IrritableOcelot@beehaw.org 8 points 2 weeks ago (1 children)

Wikidata is so cool, but not really public-exposed. I imagine it's an incredible research tool though.

[–] Aatube@kbin.melroy.org 4 points 2 weeks ago (1 children)

Wikifunctions finally exposed running functions via API in March, though yeah, it's still a long, long way from being integrated in wikis, not to mention the arcane parameter that is passing a JSON via URL. (and hopefully you meant Wikifunctions and not Wikidata lol)

[–] IrritableOcelot@beehaw.org 2 points 1 week ago (1 children)

Oh I understood wikifunctions primarily as a way to operate on wikidata data, I don't know if that's right. And you're right it is publically available, I guess I meant more that few few folks know about it.

[–] Aatube@kbin.melroy.org 2 points 1 week ago

It's quite independent from Wikidata. It's an alpha-stage programming functions repository.