Post by Il Padrino on Jul 11, 2012 16:13:50 GMT 1
One thing that was always a big flaw in the game was the lack of history of a division and its calendar and races.
The reason for this was that the division calendar was stored in a database table, which was updated with the new calendar during each seasonal update, resulting in the loss of the previous calendar.
The actual race results are saved in a single, huuuge folder, but without the calendar, it's nearly impossible to retrieve the right xml file.
To solve all this, I decided to place all data related to a division outside of the database. At least, as much as possible.
Instead, there is now a directory structure that acts as some form of database structure. The structure is like this:
[country]/[division level]/[division sublevel]/[season]/
The main folder is named 'divisions'.
Each season folder contains the subfolders results, reports, tour_results. The season folder also contains the calendar (always named calendar.xml)
These folders (and files within) are updated automatically.
After each race, the race result and report will be stored in the respective folders. Their file names will be the ID of the race profile (also visible in the calendar.xml).
Likewise, the tour folder contains the tour standings. The file name here is the ID of the tour (also in the calendar.xml).
This means a couple of things:
1- The history is built automatically, without any database required
2- Everyone can access the directory structure, as all of the data here is public (only race/tour results, no cyclist or team details are stored here!).
3- Those who used to save the race results by going through each page can now directly use the xmls. This is faster for them, and it saves a lot of bandwidth for the server.
It's very simple to access the data. Although you can't navigate directly through the folders because of security reasons, you can access the xmls directly.
For example:
If I want to see the calendar of division 3:1, for the current season (season 3), the URL would be like this:
peloton-test.com.peloton.arvixevps.com/divisions/World/3/1/3/calendar.xml
Or, if I want to see the results of the Ronde Van Vlaanderen (race ID 4) of this division, the URL would be:
peloton-test.com.peloton.arvixevps.com/divisions/World/3/1/3/results/4.xml
And so on
At the moment, only the calendar and race/tour results (+ report) are stored here, but the idea is that during the seasonal update, the division standings will also be saved, so there's a history of these as well.
You might have noticed the added 'season' in the breadcrumbs when looking at the division and calendar. They are not yet on all necessary pages, but I'm still working on these
The reason for this was that the division calendar was stored in a database table, which was updated with the new calendar during each seasonal update, resulting in the loss of the previous calendar.
The actual race results are saved in a single, huuuge folder, but without the calendar, it's nearly impossible to retrieve the right xml file.
To solve all this, I decided to place all data related to a division outside of the database. At least, as much as possible.
Instead, there is now a directory structure that acts as some form of database structure. The structure is like this:
[country]/[division level]/[division sublevel]/[season]/
The main folder is named 'divisions'.
Each season folder contains the subfolders results, reports, tour_results. The season folder also contains the calendar (always named calendar.xml)
These folders (and files within) are updated automatically.
After each race, the race result and report will be stored in the respective folders. Their file names will be the ID of the race profile (also visible in the calendar.xml).
Likewise, the tour folder contains the tour standings. The file name here is the ID of the tour (also in the calendar.xml).
This means a couple of things:
1- The history is built automatically, without any database required
2- Everyone can access the directory structure, as all of the data here is public (only race/tour results, no cyclist or team details are stored here!).
3- Those who used to save the race results by going through each page can now directly use the xmls. This is faster for them, and it saves a lot of bandwidth for the server.
It's very simple to access the data. Although you can't navigate directly through the folders because of security reasons, you can access the xmls directly.
For example:
If I want to see the calendar of division 3:1, for the current season (season 3), the URL would be like this:
peloton-test.com.peloton.arvixevps.com/divisions/World/3/1/3/calendar.xml
Or, if I want to see the results of the Ronde Van Vlaanderen (race ID 4) of this division, the URL would be:
peloton-test.com.peloton.arvixevps.com/divisions/World/3/1/3/results/4.xml
And so on

At the moment, only the calendar and race/tour results (+ report) are stored here, but the idea is that during the seasonal update, the division standings will also be saved, so there's a history of these as well.
You might have noticed the added 'season' in the breadcrumbs when looking at the division and calendar. They are not yet on all necessary pages, but I'm still working on these
