86 | | === Running Sessions |
| 86 | == Run Tournament |
| 87 | This section describes the RunTournament service. It is available at {{{http:..:8080//runserver/runtournament}}}. |
| 88 | This service starts up and runs a complete tournament when it is accessed (http get or post). |
| 89 | To start a tournament, the http get must include a JSON-serialized genius2.protocol.session.TournamentSettings object. Typically this looks like this (assuming you want to use AllPermutations protocol): |
| 90 | {{{ |
| 91 | {"AllPermutationsSettings":{ |
| 92 | "parties":["http://server/../party1","http://server/../party2"], |
| 93 | "profiles":["ws://server/../profile1","ws://server/../profile2","ws://server/../profile3"], |
| 94 | "reuseParties":false, |
| 95 | "partiesPerSession":2, |
| 96 | "sessionsettings":{"SAOPSettings":{"participants":[],"deadline":{"deadlinetime":{"millis":10}}}}}} |
| 97 | }}} |
| 98 | |
| 99 | The parties is a list of party URIs, just like in the session settings |
| 100 | |
| 101 | The profiles is a list of profile URIs, just like in the session settings |
| 102 | |
| 103 | If reuseParties is set to to false, parties are drawn from the list without return. If it is set to true, parties are drawn with return (meaning all parties can occur multiple times in each session) |
| 104 | |
| 105 | partiesPerSession sets the number of parties (and matching profiles) for each session. Profiles are always drawn without return (never appear twice in a session) |
| 106 | |
| 107 | sessionsettings contains basically all the normal run-sessionsettings. This is used as a "template" for all sessions of the tournament. You can put any use any session setting here, and each session will be run according to the protocol you select here. In the example we use the SAOP protocol which takes participants and deadline as arguments, as discussed above. The participants list this time is empty, the AllPermutationsProtocol adds the the required parties to this list. So if you provide a non-empty list here, then these parties would be present in every session in the tournament. |
| 108 | |
| 109 | === View Running Sessions |