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

Support a way of hot-linking models to a specific NetLogo Web release version #425

Open
LaCuneta opened this issue Jun 5, 2024 · 0 comments

Comments

@LaCuneta
Copy link
Contributor

LaCuneta commented Jun 5, 2024

Hot-linking models is advantageous for a few reasons. It allows the compiler, engine, and runtime simulation code to be cached by the web browser so pages with multiple models should load much more quickly than static HTML exports. A hot-linked model gets the latest updates to the NLW code, meaning performance enhancements or other improvements get automatically applied to the new models. In rarer cases, bug fixes can also be applied, such as the case when we found a web extension that blocked NetLogo Web from running.

But there are a few use-cases where a user would want to hot-link to a specific NetLogo Web version:

  • A user wants to link to a specific version of NetLogo Web to guarantee the behavior of their model is the same into the future, possibly as a model published for research.
  • A user wants to link to a specific NetLogo Web version to workaround a bug introduced in a new version of NetLogo Web that hasn't yet been fixed.
  • A user wants to link to a specific NetLogo Web version to avoid possibly breaking changes to their models (bugs or intentional changes).

On the technical side, the static HTML export could be used to create an all-in-one NetLogo Web bundle. An export that excludes the NetLogo model code would be generated with a filename appended with the current version. It'd be easy to add to the NetLogo Web site's assets, and should respect the usual URL parameters for loading a remote model. This could be automated as part of the release process.

Fancier techniques are also possible, such as dynamically dispatching to a supplied NetLogo Web query parameter version as a fallback if the current code fails to load. We could also change how hot-linking works to require a version query parameter from the user, in order to make sure they don't encounter breaking changes. It would be up to users to change this parameter if they wanted to take advantage of newer NetLogo Web code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant