Skip to content

Minecraft server should be able to load JS & Java (JAR) from a server URL running e.g. in a GitHub Codespace #380

@vorburger

Description

@vorburger

It would be super cool if the Minecraft server had a slash command to which one could give a URL which from which it would (continously, re-)load both JS as well as Java (JAR) using a HTTP client. You could then code JS & Java e.g. in a GitHub Codespace with a HTTP server exposing it... 😸

To avoid having to do regular polling, using HTTP chunked transfer encoding could be used. Ratpack seems to make it (relatively, it's still some work...) easy to write such a server, see ResponseChunks. It also comes with nice Gradle support. It may be simplest to have this server be a part of the example/ project instead of a library, because this would make it easy to later factor out the example into a separate GitHub repo which kids users can fork.

Vert.x has support for HTTP chunked transfer encoding as well, but as this HTTP server would be running on the "client", outside of the Minecraft server, I think there is really no good reason for us using our existing Vert.x server integration of instead Ratpack; especially given Ratpack's Gradle integration?

JS projects could likely easily similarly expose the built JS, maybe generated from a TS, on some Node server with HTTP chunked transfer encoding.

Java projects would require both #379 as well as #378 as pre-requisites for this.

The HTTP client should be a small new module which continously download a (?) file(s?) from a HTTP URL serving such chunks and saves them to the filesystem. This module would be used in the example/ to integration test its web server, and then embedded in the Minecraft server. We cannot use JDK's HTTP client with chunks support, because that's Java 11 only (whereas we're still on Java 8), so need to find another (simple, ideally) HTTP client that we can embed.

An initial MVP could be without any "user support" with slash command yet - just a first demo, replacing the symlink (?) in ./test from #379 with example/ running the HTTP server from Gradle.

@edewit FYI

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions