Skip to content

Refactoring the server to Java #146

@Protonull

Description

@Protonull

There was a relatively brief conversation about this in the Discord about this and there would be some benefits to it:

  • Java is a strictly typed, cross-platform language: prospective contributors are likely to know it given that Minecraft and its mods are written in it.

  • It means we can share/reuse classes between the client and server, particularly the packets themselves.

  • Easier access to multi-threading, potentially reducing or even eliminating blocking-related delays. Currently, the entire server is locked up but a particular sequence of the sync negotiation since the query takes a while to complete and the server cannot handle anything else until the query resolves.

  • Can turn this into repo into a root-level Gradle project. Not strictly necessary but a nice benefit.

  • Let's the server use ViaVersion's API for multi-version support (Multiversion support #145) (relevant from ViaVersion Discord)

  • The application Gradle plugin lets us produce a distribution zip that we can upload to each release and it'll just work out of the box.

  • Java provides a greater means to configure the runtime, such as RAM usage and which GC to use, which could potentially lower RAM usage below the current ~100MB during single-person dimension sync for about a 3x3 region area. More significant testing may be required, but projects such as Reposilite, which runs on the JVM, can run on as low as 20MB.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions