Changes between Version 29 and Version 30 of WikiStart
- Timestamp:
- 04/30/19 16:06:16 (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiStart
v29 v30 50 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 * On the server implementation provided here, the urls look like {{{http://...:8080/partiesserver/run/<party name>}}} 53 52 54 === Create new running instance of a party 53 The following steps are needed to create a new running instance of a party. 55 When a client does a http get with an URI as provided in the GeneralPartyInfo field above, the following should happen 54 56 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 createsa running instance of that party57 * The server tries to create a running instance of that party 56 58 * There are two possible responses from the party server: 57 * The http get returns a websocket addresson 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. The 503 includes a message like {{{retry later at 1556631286760}}}. The message is kept human readable but the last element of the message must be a unix timestamp containing the time at which to retry.59 * If the party was launched sucessfully: the http get returns a websocket address (ws:...) as plain text on which the party can be contacted. 60 * If the party could not be launched (eg, not enough resources) the server returns error code 503 "Service Unavailable". The 503 includes a message like {{{retry later at 1556631286760}}}. The message is kept human readable but the last element of the message must be a unix timestamp containing the time at which to retry. To create this message, the server can either create a default (e.g. let the client retry after a fixed set time) or actually use the estimated termination times of the parties. The current available server does the latter. 59 61 60 If the response was a websocket address, tThe websocket connection implements a {{{Connection<Inform, Action>}}} which means the following:62 If the connection was succesful and thus the response was a websocket address, the websocket connection implements a {{{Connection<Inform, Action>}}}. This connection has the following protocol: 61 63 * it accepts JSON-formatted Inform objects and these are passed into the party (see the the party module in genius2 core) 62 64 * can send JSON-formatted Action objects as requested by the agent (see the events module in genius2 core)