Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Downloads handled by bridge instead of mod #107

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

WhiteHusky
Copy link
Contributor

@WhiteHusky WhiteHusky commented Dec 24, 2021

  • Bridge portion
  • Mod portion

Instead of having the mod receive the bytes directly, have the bridge place the files itself for the mod to find and move around into place as needed.

Also miscellaneous refactors.

Security considerations: The mod can tell the bridge to place the files anywhere, but the bridge will not overwrite files nor try to delete file paths it didn't create.

@WhiteHusky WhiteHusky marked this pull request as ready for review December 26, 2021 16:25
@WhiteHusky WhiteHusky force-pushed the download-rendezvous branch 4 times, most recently from 1c96e38 to 5ce5edc Compare December 27, 2021 13:19
@WhiteHusky
Copy link
Contributor Author

WhiteHusky commented Dec 27, 2021

@AsciiJakob aka Verb reports the following numbers for a 233MB download on a 1Gbps connection. Game has the default limit framerate option (30FPS) when unfocused

Patch Condition Total Time
0.4.5 Focused 99s
0.4.5 Unfocused 499s-501s
PR Focused 28-31s
PR Unfocused 27-29s

@WhiteHusky
Copy link
Contributor Author

Fixed build issue; I had some changes that I'll wait for another PR for and selectively staged but kept back too much.

@WhiteHusky WhiteHusky force-pushed the download-rendezvous branch 3 times, most recently from 4c7b87a to cca0c0e Compare December 27, 2021 22:11
@WhiteHusky
Copy link
Contributor Author

This will fix #102 as an aside.

@WhiteHusky
Copy link
Contributor Author

May have forgotten to account for mods that updated. Additionally might need to change how mods are saved to avoid two mods of the same name from two servers clashing together (sha256 sum?)

The bridge will be what handles downloading the mods instead of relying
on the mod-side to write the files itself. The bridge communicates the
progress of the file, however.

Also introduces a basic state sharing framework but at the moment is
used to share where mods should be downloaded to and a to-be-implemented
switch to enable unix compatibility should the bridge not need to fix
the given path download path. State is initially given by the mod on
connect.

Additionally a couple of miscellaneous things were changed that didn't
age too well or were changed to be reused.
Felt like we should not delete files until we decide how much the bridge should do to manage mods and how it should be done.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant