Merge branch 'master' of github.com:jeena/GGS-report

This commit is contained in:
Jonatan Pålsson 2011-05-12 21:43:31 +02:00
commit e12e2f8bf3

View file

@ -4902,38 +4902,38 @@ name "sub:The-coordinator-module"
The coordinator module is responsible for keeping track of all players, The coordinator module is responsible for keeping track of all players,
their seats and tables. their seats and tables.
Players register with the coordinator process when first connecting to Players register with the coordinator process when first connecting to
the server, and the coordinator places each player by their respective the server and, the coordinator places each player by their respective
table. table.
\end_layout \end_layout
\begin_layout Standard \begin_layout Standard
The coordinator keeps mappings between each player and table, therefore The coordinator keeps relations between each player and table, therefore
it is used to perform lookups on tables and players to find out which are it is used to perform lookups on tables and players to find out which ones
connected. that are connected.
The connectivity of players and tables is important when sending messages The connectivity of players and tables is important when sending messages
to all participants in a game. to all participants in a game.
A lookup in the coordinator process is performed prior to notifying all A lookup in the coordinator process is performed before notifying all players
players in a game to ensure the message reaches all players. in a game to ensure the message reaches all players.
The lookup can be performed either using internal identification codes The lookup can be performed either using internal identification codes
or using the UUID associated with each client and table. or using the UUID associated with each client and table.
\end_layout \end_layout
\begin_layout Standard \begin_layout Standard
The coordinator process contains important state, therefore a backup process The coordinator process contains an important state, therefore a backup
is kept at all times. process is kept at all times.
All good data processed by the coordinator is stored for safekeeping in All good data processed by the coordinator is stored for safekeeping in
the backup process as well. the backup process as well.
Data which is potentially harmful is not stored in the backup process. Data which are potentially harmful is not stored in the backup process.
\end_layout \end_layout
\begin_layout Standard \begin_layout Standard
Upon a crash, the coordinator process recovers the prior good state from On a crash, the coordinator process recovers the prior good state from the
the backup process and continues where it left off. backup process and continues where it left off.
A supervisor process monitors the coordinator process and restarts the A supervisor process monitors the coordinator process and restarts the
process when it malfunctions. process when it malfunctions.
There is a window of time between the crash of the coordinator and the There is a window of time between the crash of the coordinator and the
restarting of the coordinator, during this time, players cannot be seated restarting of the coordinator, during this time, players cannot be seated
by new tables, and cannot disconnect from the server. by new tables and cannot disconnect from the server.
This window of time is very small, and the unavailability of the coordinator This window of time is very small, and the unavailability of the coordinator
process should not be noticed by more than a short time lag for the clients. process should not be noticed by more than a short time lag for the clients.
\end_layout \end_layout