X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=doc%2FARCHITECTURE.txt;h=a28d91ac050ccac5f69285f087fa594059b83a25;hb=1a1f50c83244ae2808cc9126296c8918bd0516a4;hp=45d7c24d7b24944fc9a88224dc946b4f1b8f3011;hpb=22b71dd0fd76bf5af565d56c3e82ea77b4b44bc5;p=brisk.git diff --git a/doc/ARCHITECTURE.txt b/doc/ARCHITECTURE.txt index 45d7c24..a28d91a 100644 --- a/doc/ARCHITECTURE.txt +++ b/doc/ARCHITECTURE.txt @@ -1,5 +1,35 @@ Sparse documentation about Brisk. +==== brisk/table/user relationships ==== + +=== points management === + +read from db: + * continue a match + * calculate placings + * calculate explain + +write to db: + * finish a game + +=== in the room === + +// when standup +bri->user[user_idx] = user +user->idx = user_idx +user->idx_orig = user_idx + +// when sitdown +table->player[player_idx] = user_idx +user->table_pos = player_idx + +=== in the game === + +bin5->user[user_idx] = user +table->player[player_idx] = user_idx +user->table_pos = player_idx + + Many things aren't documented at all, but I start with authentication workflow. ==== MODIFY USERS TABLE ==== @@ -26,7 +56,7 @@ index.php: --- CLI ------------ POST index.php with passid_private field equal to calcMD5(tokens[1]+calcMD5(form.elements['passid'].value)) - + add_user -> validate_name, login_verify ===== Game Lifecycle ===== @@ -45,3 +75,38 @@ index.php: - align many status var with briskin5 user values - room_join_wakeup() +==== Chunk flow ==== + + +$ret = $user->maincheck($old_stat, $old_subst, $old_step, $this->rd_stat, $this->rd_subst, $this->rd_step, + $splashdate, $table_idx, $table_token)) +$user->rd_transp->chunk($this->rd_scristp++, $ret); + + +===== New users workflow ===== + +status | | DB | +---------- |------+--------------------+ +unknown | + V + brisk -> mail-table +MAILED | | + V | + user | + | | + V | + mailbox | + | | + V | + procmail | + | | + V | + check with mail-table | + and update DB <----+ + (needs ad-hoc page) +TOBECHK | + V + authorize +normal | + V +