Changes between Version 256 and Version 257 of WikiStart


Ignore:
Timestamp:
09/24/19 11:38:07 (5 years ago)
Author:
wouter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiStart

    v256 v257  
    336336
    337337
    338 
     338=== NegoSettings
     339We discuss two common NegoSettings in more detail, with some examples.
     340
     341
     342Typically 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
     352The "SAOPSettings" indicates that these settings are SAOPSettings and (see Settings.getProtocol) will be interpreted by the SAOP protocol.
     353
     354The 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
     356The deadline contains the deadline for the SAOP, which is how long the negotiation can last.
     357
     358For different protocols, the contents will differ.
     359
     360For 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
     371The parties is a list of party URIs, just like in the session settings
     372
     373The profiles is a list of profile URIs, just like in the session settings
     374
     375If 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
     377partiesPerSession sets the number of parties (and matching profiles) for each session. Profiles are always drawn without return (never appear twice in a session)
     378
     379sessionsettings 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.
    339380
    340381= Writing a party in Java