ForcePack icon indicating copy to clipboard operation
ForcePack copied to clipboard

Really live reloading

Open BigTows opened this issue 1 year ago • 3 comments

User case: We utilize S3 storage to store our resource pack. This pack is loaded from our CI/CD pipelines, ensuring that any changes on the servers (such as Velocity) are ignored.

What if? ForcePack automatically check headers of the http request, for example: HEAD https://eu.amazonaws.com/textures/test.zip Response Header is:

Name Value
Date Sat, 02 Mar 2024 07:17:37 GMT
Last-Modified Sat, 02 Mar 2024 07:17:37 GMT

The plugin can dynamically check these parameters and manage the update hash accordingly. I'm not referring to the /vforcepack reload command, as it can lead to a subpar user experience. (The user forcibly receives the resourcepack)

Instead, the plugin updates the hash automatically, ensuring that the player receives the updated resource pack during the next loading process. This streamlined approach enhances user experience by eliminating the need for manual intervention.

BigTows avatar Mar 02 '24 07:03 BigTows

or support S3 api ;) But scheduled http request it's fine i guess.

BigTows avatar Mar 02 '24 07:03 BigTows

I feel like just expanding the reload command is a better option than a scheduled task.

Some sites won't include those headers.

SamB440 avatar Mar 03 '24 17:03 SamB440

I feel like just expanding the reload command is a better option than a scheduled task.

A HEAD request is lighter than a GET request.

Some sites won't include those headers.

  1. Configure the header for checking:
  2. In some cases, the plugin can send a GET request to verify, but it's not a good idea.

BigTows avatar Mar 08 '24 08:03 BigTows