Skip to content

Return "last known" server status (at least for backends that are currently unreachable but which have "wake-up" available) #36

Open
@vorburger

Description

@vorburger

With the introduction of #29 for #21, a possible future enhancement on that front, for anyone interested in contributing here, is this:

Now that mc-router can "wake up" back-ends, the "status" in the Minecraft client, where one can see the Minecraft version and MOTD and Player Count and Server Icon and what not, obviously still just shows "Can't connect to server" for backends that are not yet running, but which one CAN actually connect to (upon which they are woken up by increasing the replicas from 0 to 1, as per that feature).

In a perfect ideal world, it would be cool if we would e.g. "remember" (cache) the "last known" status response - and return that instead of the "Can't connect to server".

This is likely a bit of (fun, interesting) work, because mc-router currently just "pipes through" connections - it doesn't actually know about the Minecraft protocol with status responses and such. (#3 has some WIP work about inspecting frames for commands; this is somewhat related to that.) https://github.com/haveachin/infrared#response-status does this kind of thing, so it seems like it's doable in principle. (But I don't like how there you have to specify that status response in a separate configuration; it seems to me that it would be much nicer if we simply "cached" it from the real back-end.)

I'm unlikely going to work on this myself in the near term, but thought opening an issue about it anyway could perhaps motivate someone else reading along to dig into this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions