Return "last known" server status (at least for backends that are currently unreachable but which have "wake-up" available)
- Dominant language
- Go
- Stars
- 926
- Forks
- 72
- Avg merge
- 20h 14m
- Merged PRs (30d)
- 15
Description
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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the related #3 work on inspecting frames and the infrared response-status implementation linked in the issue. Determine how mc-router could capture and cache a backend's Minecraft status response for wake-up-capable backends, then define the cache lifecycle and the status behavior for unreachable servers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, networking
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100