Changes between Version 26 and Version 27 of WikiStart
- Timestamp:
- 03/12/19 15:13:54 (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiStart
v26 v27 46 46 The uri contains a http address that, when accessed, starts up a new instance of the party. This is discussed in more detail in the next section. 47 47 48 These fields are automatically generated from the parties contained in the jar files in the {{{partiesserver/partiesrepo}}} directory that was mentioned above.48 A full, updated list is sent over the websocket every time the list changes. 49 49 50 A new list is sent over the websocket every time the list changes.50 In the genius2 java implementation these fields are automatically generated from the parties contained in the jar files in the {{{partiesserver/partiesrepo}}} directory that was mentioned above. Other implementations might use a different scheme. 51 51 52 52 === Create new running instance of a party 53 53 The following steps are needed to create a new running instance of a party. 54 54 55 * Do a http get on the uri provided in the GeneralPartyInfo field above. This creates a running instance of that party 56 * The http get returns a websocket address on which the party can be contacted. 57 * The websocket connection implements a {{{Connection<Inform, Action>}}} which means the following: 55 * Do a http get on the uri provided in the GeneralPartyInfo field above. With the server implementation provided here, the urls look like {{{http://...:8080/partiesserver/run/<party name>}}} This creates a running instance of that party 56 * There are two possible responses from the party server: 57 * The http get returns a websocket address on which the party can be contacted. 58 * error code 503 "Service Unavailable" if there is no room on the partiesserver at this moment to instantiate another party. You may have to wait till a slot becomes available to run the party. 59 60 If the response was a websocket address, tThe websocket connection implements a {{{Connection<Inform, Action>}}} which means the following: 58 61 * it accepts JSON-formatted Inform objects and these are passed into the party (see the the party module in genius2 core) 59 62 * can send JSON-formatted Action objects as requested by the agent (see the events module in genius2 core) 60 63 61 64 65 62 66 == Using the source code == 63 You can download the source repository . Note that you don't need this if you just want to use the parties server.67 You can download the source repository of rhe java implementation. Note that you don't need this if you just want to use the parties server to host your parties or to compile parties. 64 68 65 69 {{{ … … 75 79 76 80 77 78 == Create new party instance79 80 A new instance of a party can be created by connecting to {{{partiesserver/run/<party name>}}}, for instance81 82 83 http://localhost:8080/partiesserver/run/randomparty-1.0.084 85 86 There are two possible responses from the party server:87 88 1. a URL. This is the URL of the websocket behind which the newly instantiated party can be contacted.89 2. error code 503 "Service Unavailable" if there is no room on the partiesserver at this moment to instantiate another party