-
Notifications
You must be signed in to change notification settings - Fork 1
Modules
This page explains the core server side modules and their responsibilities
The communication module routes messages and manages sockets. It is the gateway between the client and the server -- everything goes through communication. It is responsible for:
- Storing a list of active sockets
- Storing a list of all messages that went out to any given socket
- Informing the high and mid level modules of connections and disconnections
- Associating related messages with one another (i.e. interactions)
- Routing interactions to the appropriate modules
The navigator figures out where a user exists in the workflow. Did they just connect? Are they associated with an existing user? Do we already know what game they want to join? These are questions the navigator can answer.
- Identify the state of new connections.
- Control the flow between mid-level level modules (directory <-> lobby <-> storyteller).
Directory is where players are defined and accessed. It is a list of all players that have registered in the system.
- Storing a list of all players.
- Create / Update / Delete players.
- Storing associations between active sockets and players.
Lobby is where games are created and found. This module is responsible for:
- Storing a list of all games.
- Creating, updating, and deleting games.
- Store associations between players and games.
Storyteller handles in-game logic and is responsible for announcing key events of a game such as start, end, round progression, and heartbeats. Right now Storyteller and "Incommunicado" are one and the same. Eventually we have to think through a way to separate them.
In general the storyteller is responsible for:
- Starting the game (setting up / assigning roles / etc)
- Maintaining a heartbeat
- Triggering victory conditions
- Identifying valid game configurations
- Handling in-game disconnects
Email simulates an email client for use in games run by the storyteller.
IRC simulates an IRC client for use in games run by the storyteller.
Newspaper simulates a newspaper for use in games run by the storyteller.
Snooper watches messages come and go and for some message types will "snoop" the interaction, allowing third parties to get copies of the messages in their client.
Tor anonymizes messages within the system. If a message is sent through Tor then it will have an added flag which the module can use to change the way it is processed.