338 | | |
| 338 | === NegoSettings |
| 339 | We discuss two common NegoSettings in more detail, with some examples. |
| 340 | |
| 341 | |
| 342 | Typically the session settings looks like this: |
| 343 | {{{ |
| 344 | {"SAOPSettings": { |
| 345 | "participants":[ |
| 346 | {"party":"http://party1","profile":"ws://profile1"}, |
| 347 | {"party":"http://party2","profile":"ws://profile2"}], |
| 348 | "deadline":{"deadlinetime":{"millis":100}} |
| 349 | }} |
| 350 | }}} |
| 351 | |
| 352 | The "SAOPSettings" indicates that these settings are SAOPSettings and (see Settings.getProtocol) will be interpreted by the SAOP protocol. |
| 353 | |
| 354 | The participants is a list with PartyWithProfile items: a "party" field containing a http address on a partiesserver, and a "profile" field containing a websocket address on a profilesserver. |
| 355 | |
| 356 | The deadline contains the deadline for the SAOP, which is how long the negotiation can last. |
| 357 | |
| 358 | For different protocols, the contents will differ. |
| 359 | |
| 360 | For a tournament, the NegoSettings typically look like this: |
| 361 | {{{ |
| 362 | {"AllPermutationsSettings":{ |
| 363 | "parties":["http://server/../party1","http://server/../party2"], |
| 364 | "profiles":["ws://server/../profile1","ws://server/../profile2","ws://server/../profile3"], |
| 365 | "reuseParties":false, |
| 366 | "partiesPerSession":2, |
| 367 | "sessionsettings":{"SAOPSettings":{"participants":[],"deadline":{"deadlinetime":{"millis":10}}}}}} |
| 368 | }}} |
| 369 | |
| 370 | |
| 371 | The parties is a list of party URIs, just like in the session settings |
| 372 | |
| 373 | The profiles is a list of profile URIs, just like in the session settings |
| 374 | |
| 375 | 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) |
| 376 | |
| 377 | partiesPerSession sets the number of parties (and matching profiles) for each session. Profiles are always drawn without return (never appear twice in a session) |
| 378 | |
| 379 | 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. |