Imports data from Chronicler to the Datablase.
3.9K
Prophesizer is part of the SIBR Archiving Pipelineā¢.
For a more in-depth description of the full logic of Prophesizer and Cauldron, see Basics.mdā .
Prophesizer runs continuously, waking every minute to ask Chronicler (https://github.com/xSke/Chroniclerā ) for new data. It does the following:
/games endpoint and store it in the games tablechronicler_meta table to see what the last day/time processed was/simulationData endpoint to see what the current season/day isTypically on first run Prophesizer will batch-process many seasons of data into the DB, and only grab a minute's worth of updates every minute after that.
Prophesizer also asks Chronicler for updates to players, teams, leagues/subleagues/divisions, and stadiums.
See Basics.mdā for an deeper description of what data is saved in what tables.
Blaseball.com sends updates for all current games every ~4 seconds via its streamData. These updates are archived by Chronicler, and prophesizer gets them from Chronicler instead of listening to blaseball.com directly.
Prophesizer sends these updates through Cauldronā to convert them into SIBR's "Game Event" format.
Game Events roughly correspond to one at-bat (with some exceptions like a runner caught stealing) and are more easily queried for statistics than the raw JSON updates from the stream.
These Game Events are added to the game_events table, with child tables game_event_base_runners for baserunning information and outcomes for Outcome (incineration, peanuts, partying, etc).
The following instructions are written for Windows PCs.
choco install git postgresql vscode nodejsgit clone https://github.com/Society-for-Internet-Blaseball-Research/prophesizer/.setx, making appropriate changes if any are necessary.psql, create a database named blaseball.Prophesizer is now using the Evolveā package to manage database schema migrations.
All modification of the DB schema happens via .pgsql files in the migrations folder.
These come in two varieties:
V_2_8_1__Unaccent.pgsql.__ separator) a description of the schema change.R__4_Create_Views.pgsql. The filename only contains a description (after the __ separator).taxa schema which consists only of taxonomy data that always comes from these files.Evolve doesn't support the following PostgreSQL commands in migrations:
At the moment only @lilserf and @shibboh have the permissions to do this process, but it should be documented for the future.
datablasedev prophesizer container.datablasedev DB using pgAdmin. BE SURE YOU'RE ON THE DEV DB:drop schema data cascade;
drop schema taxa cascade;
drop table changelog;
datablasedev stack to the new Prophesizer version.Backup... and naming the DB according to the prophesizer version number (e.g. blaseball-2.12.2)blaseball-X.Y.Z using the new version numberRestore... and type in the filename you used to backup above. This will populate this new database with the backup from the dev stack.datablase (prod) stack to use the new version of prophesizer; don't save yet, though.datablase stack to the new DB version name - there should be 5 or 6 instances amongst all the containers.Content type
Image
Digest
Size
73.2 MB
Last updated
about 5 years ago
docker pull blaseballsibr/prophesizer