Changes between Version 32 and Version 33 of WikiStart


Ignore:
Timestamp:
05/01/19 16:10:38 (6 years ago)
Author:
wouter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiStart

    v32 v33  
    5656
    5757* If the party was launched sucessfully: the http get returns a websocket address (ws:...) as plain text on which the party can be contacted.
    58 * 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 (milliseconds since 1970) 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.
     58* If the party could not be launched (eg, not enough resources) the server returns error code 503 "Service Unavailable". The 503 including 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 (milliseconds since 1970) 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
     60The "retry later" message must contain the text "retry later" and have the number as the last element of the returned string. The message must be sent as plain text and must be in the normal response channel (not the error channel). The reason is that in Tomcat, placing messages through the error channel result in a html-formatted response object that we can't decypher anymore automatically. The only way to get around that is to use the normal channel and set the error code manually. In a tomcat HttpServlet, this goes like this:
     61
     62{{{
     63response.setStatus(HttpServletResponse.SC_SERVICE_UNAVAILABLE);
     64response.getWriter().append("retry later at " + time);
     65}}}
    5966
    6067If 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: