Changes between Version 29 and Version 30 of WikiStart


Ignore:
Timestamp:
04/30/19 16:06:16 (6 years ago)
Author:
wouter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiStart

    v29 v30  
    5050In 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.
    5151
     52* On the server implementation provided here, the urls look like {{{http://...:8080/partiesserver/run/<party name>}}}
     53
    5254=== Create new running instance of a party
    53 The following steps are needed to create a new running instance of a party.
     55When a client does a http get with an URI as provided in the GeneralPartyInfo field above, the following should happen
    5456
    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
     57* The server tries to create a running instance of that party
    5658* 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. 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.
    5961
    60 If the response was a websocket address, tThe websocket connection implements a {{{Connection<Inform, Action>}}} which means the following:
     62If 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:
    6163 * it accepts JSON-formatted Inform objects and these are passed into the party (see the the party module in genius2 core)
    6264 * can send JSON-formatted Action objects as requested by the agent (see the events module in genius2 core)