Has anyone tried having Discourse on the truffleruby?
Does it make sense to look in this direction?
Interesting. Why did they decide to fork not contribute I wonder?
@merefield Truffleruby is an implementation of Ruby for GraalVM by Oracle guys. Good performance and interoperability with other languages on GraalVM.
It’s not a fork.
I have some experience with Rails on Truffleruby and want to check Discourse next week.
Some additional information - Running Rack and Rails Faster with TruffleRuby - Speaker Deck
Sounds fascinating. Would you expect to be able to run the existing Discourse codebase without significant changes? What kind of changes might be needed?
Short answer: No, it currently doesn’t work on TruffleRuby.
@gerhard Thanks for the link, It will be easier for me to understand existing issues.
The current blocker is mini_racer
, see https://github.com/oracle/truffleruby/issues/1827
That said, at least all gems install on TruffleRuby, we test that in CI (for some slightly older Discourse).
This issue was fixed 5 days ago.
Unfortunately, mastodon, not discourse, will be the first to work on truffleruby
@volanar yeah - I don’t have enough time to return to this question just now - intensive day job.
@eregon is here, and I am not aware of any blockers on truffle, we merged in the fixes for mini racer last year
Brandon got Discourse running a year ago:
One issue IIRC was some gems rely on Hash being thread-safe, which we have a general solution for but is not merged/integrated yet in TruffleRuby. OTOH it’s very rarely correct to just use Hash concurrently, it often results in hiding concurrency bugs in harder-to-find ways. So it’s arguably better to just fix the gems relying on that, but that takes time.
We need to benchmark performance, and for that to be meaningful/representative we should benchmark multi-threaded. That needs A way to mark C extensions as thread-safe, so they can be executed in parallel · Issue #2136 · oracle/truffleruby · GitHub
I hope it will be solved quickly
How much do you think the performance indicators of discourse will improve with the use of truffleruby (TTFB, overall performance, etc.)?