[Cs5500] Greek Gods Code Summary

Patrick Lannigan lannigan at ccs.neu.edu
Thu Mar 31 18:40:55 EDT 2011


There were some questions about how the whole gods package works together,
so this will be a quick and informal summary of the classes, what they do
and how they are connected. If there are more specific questions, let me
know and I can give more details. As stated in the check-in message, work
still needs to be done to integrate it with the rest of the tree.

gods:
SCGAdmin - contains main(), Creates all the TournamentManager and the
ServerThread, spins on stdin, validates in put and hands commands off the
TournamentManager
TournamentManager - runs as a thread in parrallel to SCGAdmin, keeps track
of all the existing tournaments, creates new tournaments as needed, hands
player singup to the tournament, has a TournamentManagerSocketListener for
incoming connections
TournamentManagerSocketListener - Manages all the incomming connections and
hand them off to the TournamentManager as a new registration
Tournament - keeps a collection of all the sockets that correspond to a
registered player, handles the state changes between signup/register/etc,
will run a thread that integrates with the rest of the code to run a game
TournamentState - data object used for serializing state of a tournament

gods.player:
stub code to simulate a player registering with the server and show we can
get socket communication to work.

gods.web:
ServerThread - re-write of the legacy ServerThread class, hand each
connection off to a DispatchThread that handles the lookup of the web page
PageDispatcher - slim wrapper class that distributes requests to the actuall
WebPage classes, the legacy system uses the annotations to know which method
to call for which url request.
WebPage - abstract class that holds a bunch of shared code used by all the
pages
ServerStatus - generates the page that shows the status of all the created
tournaments, has a form that allows to creating a new tournament
TournamentStatus - beginings of a page to show the status of a specific
tournament

Patrick
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the Cs5500 mailing list