Closed craigsapp closed 2 years ago
Implemented with commit https://github.com/craigsapp/website-polish-scores/commit/4471170c791fdbe3aa1886dbd9dd42b2502f5f28
There are two copies of the front-end:
https://polishscores.org
which is located on the NIFC network, and a copy served by Github Pages:
https://polishscores.humdrum.org
Both of these website are currently using the main data server by default (humdrum.nifc.pl which is on the NIFC network), but either one can switch to the mirror site in California: data.nifc.humdrum.org). To do so, the main method will be to add the CGI parameter mirror
to the URL:
https://polishscores.org?mirror
https://polishscores.humdrum.org?mirror
To see which data server is being used, check the console. Firstly when the mirror server is selected, the following message will be displayed on the console:
And secondly, all of the data index downloads report where they are coming from:
So there are two independent ways to access the POPC2 website. The primary method is:
This uses the front-end and back-end components on the same computer on the NIFC network in Poland.
The second fully independent mirror method:
https://polishscores.humdrum.org?mirror
This uses the Github front-end and the California backend.
Hybrid systems are possible, but probably not useful since the NIFC's websites are on the same (virtual) computer and would likely have problems at the same time:
https://polishscores.org?mirror
https://polishscores.humdrum.org
The second front-end website could be adjusted to use the mirror site by default, but then that would make copying the website to the primary location more complex, since a setting in the repository would need changing.
Another use of the main/mirror servers is to test timing for downloading indexes and other data from each source, which will be dependent on the computer speed, its internet load, and distance to the user, etc.
Also, the data server can be changed at any time by running one of these commands in the console:
popc2.SelectMainDataServer()
popc2.SelectMirrorDataServer()
Although these functions will not be too useful compared to the CGI selection of the data source since the data indexes are loaded before these function can be run manually (but the individual scores will start to be loaded from the alternate source after running one of the above functions).
Add main/mirror digital scores server and allow selecting between them when loading the front-end website.