مناقشة حول Truffleruby

Has anyone tried having Discourse on the truffleruby?
Does it make sense to look in this direction?

إعجابَين (2)

Interesting. Why did they decide to fork not contribute I wonder?

إعجابَين (2)

@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

إعجاب واحد (1)

Sounds fascinating. Would you expect to be able to run the existing Discourse codebase without significant changes? What kind of changes might be needed?

إعجاب واحد (1)

Short answer: No, it currently doesn’t work on TruffleRuby.

5 إعجابات

@gerhard Thanks for the link, It will be easier for me to understand existing issues.

إعجاب واحد (1)

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

4 إعجابات

This issue was fixed 5 days ago.

إعجابَين (2)

Unfortunately, mastodon, not discourse, will be the first to work on truffleruby :dotted_line_face:

إعجاب واحد (1)

@volanar yeah - I don’t have enough time to return to this question just now - intensive day job.

إعجاب واحد (1)

@eregon is here, and I am not aware of any blockers on truffle, we merged in the fixes for mini racer last year

إعجاب واحد (1)

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

3 إعجابات

I hope it will be solved quickly :face_with_peeking_eye:
How much do you think the performance indicators of discourse will improve with the use of truffleruby (TTFB, overall performance, etc.)?

إعجابَين (2)

Is Brandon on this server?

@Matthias_Schuster A quick search brings up

here on Meta.

إعجابَين (2)