Threads for fniephaus

  1. 1

    Would be interesting to see if that can still be done with heavily modded forge servers. Those tend to require 8+GB and a desktop CPU to run smoothly.

    1. 3

      You’d have to work around the way that Forge/Fabric mod loading works, in that it reads JAR files from the mods folder and injects them into the classpath. AFAIK GraalVM Native Image can’t really AOT compile that. You’d probably have to modify Forge to look for mods already in the classpath, instead of loading them itself.

      1. 3

        I have no idea how mod loading works but I don’t see a reason why it shouldn’t work with GraalVM Native Image. You probably need to provide Native Image with appropriate configuration for the mods that you use and the trace agent may be able to help you with this. Please feel free to give that a try and let us know if you run into any problems!

        1. 1

          Just for clarification: Forge disassembles (& deobfuscates) and then re-assembles the vanilla-jar with its hooks to allow mod-loading. This is(*) performed on each startup to be license compliant (shipping such modified binaries is not allowed).

          Ultimately forge (and fabric?) and mods use a lot of the runtime-loading mechanism, which is why I’d be interested how well this could be achieved.

          (*) they wanted to add a caching step, such that you don’t have 5 minutes startup time after the first run, not sure how far this is

          1. 1

            GraalVM Native Image turns Java bytecode into native machine code, that’s why I don’t see a reason why mods shouldn’t work, except that mods may make use of reflection and other dynamic features of Java that require configuration to work with Native Image.

    1. 4

      Reduction of 43% in memory seems pretty awesome. I already run a server in Oracle Cloud, but could possibly run in a more limited environment because of this.

      1. 6

        Why did you pick Oracle cloud? I am curious because I never talked to anyone who has used it, esp for hobby stuff

        1. 12

          The answer is almost always “the extremely generous free tier.”

          It’s recommended by the article.

          1. 7

            I’d be extremely suspicious of anyone who recommended an oracle product to me.

            1. 2

              I can’t blame you. I’m awfully suspicious of their free tier - I have a few things running there (a Minecraft server and a tiny instance of Uptime Kuma) and I’m constantly checking that it hasn’t been terminated (mostly solved by having the monitoring in place) or Oracle has decided that it’s no longer free.

            2. 3

              graalvm is Oracle, so of course they recommend other Oracle products

              1. 6

                The article wasn’t written by an Oracle employee, it was written by a (seemingly unaffiliated with Oracle) master student

                1. 4

                  I understand that, but that blog is run by Oracle. Oracle curates the articles that get published. I have been in the industry for too long to believe that they picked Oracle Cloud instances by accident.

                  1. 6

                    Disclaimer: I put this up here and am employed by Oracle.

                    Two colleagues reviewed and I co-authored the blog post (our names are mentioned at the very end of it) and sure, the entire blog is about promoting GraalVM and its enterprise edition is an Oracle product. When the students reached out regarding a few technical questions, we, of course, suggested to try the Oracle Cloud Free Tier, which also gives you free access to GraalVM Enterprise. Nothing prevents you from using the open-source community edition and deploy the binary to some other cloud provider.

            3. 1

              I was curious to try out their free tier for my brother and I. I mostly wanted to experiment with something external, but on my Tailscale network.

              I’d honestly probably never use their products otherwise, if given the choice.