Skip to content
slifty edited this page Oct 4, 2012 · 7 revisions

This page explains the core server side modules and their responsibilities

High Level Modules

Communication

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:

  1. Storing a list of active sockets
  2. Storing a list of all messages that went out to any given socket
  3. Informing the high and mid level modules of connections and disconnections
  4. Associating related messages with one another (i.e. interactions)
  5. Routing interactions to the appropriate modules

Navigator

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.

  1. Identify the state of new connections.
  2. Control the flow between mid-level level modules (directory <-> lobby <-> storyteller).

Mid Level Modules

Directory

Directory is where players are defined and accessed. It is a list of all players that have registered in the system.

  1. Storing a list of all players.
  2. Create / Update / Delete players.
  3. Storing associations between active sockets and players.

Lobby

Lobby is where games are created and found. This module is responsible for:

  1. Storing a list of all games.
  2. Creating, updating, and deleting games.
  3. Store associations between players and games.

Storyteller

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:

  1. Starting the game (setting up / assigning roles / etc)
  2. Maintaining a heartbeat
  3. Triggering victory conditions
  4. Identifying valid game configurations
  5. Handling in-game disconnects

Low Level Modules

Email

Email simulates an email client for use in games run by the storyteller.

IRC

IRC simulates an IRC client for use in games run by the storyteller.

Newspaper

Newspaper simulates a newspaper for use in games run by the storyteller.

Snooper

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

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.