-
Notifications
You must be signed in to change notification settings - Fork 271
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
jsdelivr as CDN #1285
Comments
I'm all for jsdelivr, I use it heavily already and have found it to be very stable. |
Thanks for putting in the effort to address the server challenges. jsdelivr as CDN would be super, and a dedicated repo for releases could work well. A few thoughts. To minimize friction and complete automation, it might be better to utilize the main x3dom/x3dom for recent and future releases, eg. commit build artefacts or tagged releases for those with the github action workflow, if this is feasible. Older releases may not build anymore with the main repo and could be archived on a static, separate repo. Repo name: It would be best to keep x3dom/x3dom fo recent and new releases, and a x3dom/x3dom-archive for older releases. If this is not possible, I would vote for x3dom/x3dom-download to follow the x3dom.org directory structure most closely. Versions: I think main branch with tags is most common but whatever is easiest to manage is fine. Branches for each version would probably be closest to current x3dom.org. latest stable, and nightly, and/or dev should be there. ( Is it possible to have github actions work across repos ? Probably. ) Files: The same files as are currently on x3dom.org/download . The dev version is now missing from http://x3dom.org/download/dev/ but should also be made available. Documentation ? Other considerations:
|
Rather than a separate repo, could we not setup a GitHub pipeline which runs, builds and pushes to jsdeliver, this could be triggered when a new release tag is added. |
As for the version discussion, I personally think x3dom should use the semver versioning system: major.minor.patch Where:
So there is more of a turnaround as and when patches/bug fixes are added. Then there is no need for the -dev postfix (this is catered for by the patch version). At the moment I think x3dom has the 3 levels a little out of step and using the 'patch' level for a minor release , for example we are preparing for a 'launch' of Release 1.8.3 where as really it should be version 1.9.0 being released then faster increments... Then 'launch' 1.10.0 This would also mean x3dom looks like it is more active and being contributed to regularly. I am not nesesarily saying every commit / PR = one patch increment though - this may take some git branch magic to achieve. |
There is no need to push to jsdelivr. Based on the path (end point) it reaches out and caches github repos automatically. It might work to just add the builds to the current tagged releases on x3dom/x3dom ? in addition to the source archives. There is a file size limit of 20MB by jsdelivr. Actually, jsdelivr does not work with github release assets: jsdelivr/jsdelivr#18203 The recommended alternative is to have a 'release' branch which is not really the idea for which branches are designed. So I think now probably a separate release or download repo is cleanest if it is possible to push to it from a github action on the main repo ( which should be possible ). I am uncertain about more frequent, minor releases since it involves more hands on deck (even with automation) and implies more qc than is actually available. A major release every year with an announcement sounds about right to me. Dev or nightly versions should be available (although they are also easy to build) but could remain unversioned for simplicity. |
"The recommended alternative is to have a 'release' branch which is not really the idea for which branches are designed." "A major release every year with an announcement sounds about right to me." With regards to 'major' - again it does not have to be followed but a major would suggest API/breaking changes (see https://semver.org/) So these would only be required if x3dom drastically changes and is no longer backwards compatible. Perhaps a minor release every year? |
'release' branch was used in a different sense in the jsdelivr issue. The suggestion was to have a branch which collects all release artifacts over time, and does not have source code, to parallel the release assets. Ok, a minor release with potentially many changes. |
Ah I see yes that sort of 'release' branch would be dirty (and indeed not what branches are intended for). So perhaps the 2nd repo is the simplest. One other thing to consider during this exercise is npm publishing (currently done via the GitHub x3dom/dist repo I believe) could/should this also be brought in line with this workflow? @fibo FYI |
If it is possible for X3DOM .js and .css references in an html page to try retrieving a second url if first url fails, that would be interesting. I will continue using best-practice patterns when autogenerating X3DOM pages for the X3D Example Archives.
|
The safest option is to just host x3dom.js and .css with the html on the same server. Then the .js will be available when .html is available, and when the .html is not available the .js does not need to be available. |
Thanks for all your inputs. Im currently playing around with the Github Workflows to automate the single steps for the jsDelivr integration. Currently, I'm using three different repositories for this integration:
In the main repo (x3dom), I utilize the
As structure for the x3dom-stable & x3dom-dev repository I use the following:
As of now, I'm testing everything with private repositories on my personal GitHub account. If any of you are interested in contributing or following the progress, I'd be happy to grant access to the repositories or make them public. |
Timo, first impression, this sounds great. Might you be able to give me a slide for SIGGRAPH update on this? Simple prose OK. |
Super. This already sounds great. Please let us know if you want us to do some tests. Feel free to provide repo access. I think public should be fine. Should we also consider a x3dom/x3dom-test repo ? It would just serve the test/functional and test/regression-suite tests from x3dom-test.github.io/ . If jsdelivr setup is stable, the https://www.x3dom.org/nodes/ page could be updated to refer to the CDN, in addition to x3dom.org/download . |
Hi Don, It seems unlikely that we'll have everything completely ready and available before the Siggraph but maybe you can already teaser it 😊 https://docs.google.com/presentation/d/1NrE-L7kf9hr8QU1jQL8uUr79DK-J75EKQ6Agtlb1cLE/edit?usp=sharing |
@andreasplesch I gave you access to my three test repositories. I think the most interesting parts are the three workflow files: https://github.com/tsturm/x3dom-do-release/blob/main/.github/workflows/dispatchRelease.yml The up- and download artifact step can take a while because of the size of the docs-folder |
Please let us know if we can do anything to assist with enabling jsdelivr as CDN. |
After dealing with the challenges of our current server provided by Fraunhofer IGD, I took the initiative to explore potential alternatives for delivering our x3dom library. Among the various options, I found https://www.jsdelivr.com/ to be the most promising choice. Notably, it's free to use and seamlessly integrates with GitHub. However, I encountered an issue since it doesn't align perfectly with our main repository structure, mainly because we don't commit our build artifacts.
To address this, I propose creating a separate repository exclusively for storing the final build artifacts for each release. This approach would enable us to leverage all the advantages of jsdelivr effectively.
As a starting point, I've set up a test repository on my private GitHub account: https://github.com/tsturm/x3dom-release. Using a repository like that, we can request specific versions via the jsdelivr CDN, as demonstrated in the following examples:
A specific version:
https://cdn.jsdelivr.net/gh/tsturm/x3dom-release@1.8.2/x3dom.js
A specific version + automatic patch updates:
https://cdn.jsdelivr.net/gh/tsturm/x3dom-release@1.8/x3dom.js
The latest stable release:
https://cdn.jsdelivr.net/gh/tsturm/x3dom-release@latest/x3dom.js
Before finalizing this approach, there are some important points we need to clarify:
I'm eager to hear your thoughts and opinions on this matter. Let's work together to find the best solution for our x3dom library delivery.
The text was updated successfully, but these errors were encountered: