[Cs5500] Web UI code

Rick Keilty rkeilty at ccs.neu.edu
Thu Apr 7 01:13:06 EDT 2011


Greetings class,

We've done a ton of work on the UI front tonight, and wanted to share with
the class how to make things work in the system!

To get things up and running, start the gods.admin.Admin main method with 2
arguments, a password for the root user and a port number, if you're working
from the command line it will be like this:
java -cp . gods.admin.Admin pwd 8000

The password is the password for the "root" user in the SCGAdmin system, and
the port number is the port it will listen for incoming connections on.

Just FYI - we found one weird bug in some of our testing in browsers outside
of Firefox when trying to add new tournaments.  We're looking into it, and
we know whats wrong, so we hope to have it fixed soon.  Basically if you
find a problem somewhere, try Firefox, becuase we know it works in that,
we're working out the extra kinks right now.
*
=== Playing around as Root ===*
Once you start things up, you'll want to login by hitting:
http://localhost:7007/signin  (the HTTP server binds to 7007 by default)

Use the username "root" and the password you supplied at startup (you
haven't added users yet, so this is the only valid login to the system).
Root behaves the same as all other users with one exception, it has access
to the /admin page to add tournaments and approve users.

By default, after logging in as root, it will route you to the admin page
where you can specify tournament details and users (only the admin can reach
this page).  Go ahead and add a tournament:
* Name: The name of the tournament you're setting up
* Runtime: An integer specifying how long from now you want the tournament
to actually start running
* Playground Config: Currently you have to paste a full valid config in here
(no file uploads yet).  I've attached a sample config that will work.  If
you put in a bad config, it will complain.

Once you add a tournament a link appears to bring you to the details for the
tournament.  From this page you can see brief tournament config details,
download a full config file, enroll, etc.  It is important to note that you
can only enroll during the "ENROLLMENT" or "REGISTRATION" phases.  It is
also important to know that you MUST be enrolled in order to register with a
tournament.  You can enroll in a tournament as the root user.  The system
will not allow more that the MaxNumAvatars section of the config to enroll
in the system.

*=== Adding users ===*
Users can signup by going to http://localhost:7007/signup  They can supply a
username and password combo, which the root user will have to approve before
they can log into the system with those credentials.  You can approve users
by signing into the system as root and going to the admin page.
*
=== Tournaments ===*
As mentioned above, tournaments are added via the admin page when logged in
as root.  All tournaments start out in ENROLLMENT status, where users are
able to enroll in the tournament.  The tournament will switch from
ENROLLMENT to REGISTRATION status if it is less that 60 minutes until the
scheduled tournament start time.  During the REGISTRATION phase you can
register avatars by pointing them to the port you used at startup.  At
startup time, the status goes to RUNNING and the tournament thread is kicked
off with all players who have already registered.

So if you quickly want to get to a state where a tournament can be run,
signup a few users, and create a tournament that starts 5 minutes from now.
It will jump immediately to the REGISTRATION status, which allows users to
enroll and avatars to connect.  Enroll yourselves and register your avatars,
then wait for the tournament to begin.

*=== Sample config for CSP ===*
Use the following example config to get started:

scg_config[domain: csp.CSPDomain protocols: positiveStandard
tournamentStyle: full round-robin turnDuration: 60 maxNumAvatars: 20
minStrengthening: 0.01 initialReputation: 100.0 maxReputation: 1000.0
reputationFactor: 0.4 minProposals: 2 maxProposals: 5 numRounds: 9
proposedClaimMustBeNew: true ] csp.CSPConfig {{ csp_config[maxRelNum: 255
maxVariables: 10 ] }}

*=== What other teams still need to do ===*
We still require a GetStatus() method on the tournament which will return an
object that contains, at a minimum: All players in the tournament and their
current scores, all current games, who is in each game, and what the
reputation of each player is.

We also need the history for each game written to disk into the
$classpath$/history/$tournament_id$_history_$date$.txt, or some other well
recognized format, so we can call it from our status pages.

We've reworked a lot of stuff to get the integration teams Touranment object
working in our system.  A few more tweaks and we should be good to go, but
everyone should be able to browse the UI.  Let us know if you run into any
browser issues when navigating the web UI.

Let us know what you think.

-Rick & GreekGods
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the Cs5500 mailing list