From 59ab7d95c7656cc52c139c723a1c3b94b3e2f59f Mon Sep 17 00:00:00 2001 From: christian-bromann Date: Thu, 5 Nov 2020 16:13:19 +0100 Subject: [PATCH 1/3] add get session and async new session --- index.html | 124 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 122 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 8bc767e4..01a0466c 100644 --- a/index.html +++ b/index.html @@ -680,12 +680,24 @@

Endpoints

New Session + + GET + /session/{session id} + Get Session + + DELETE /session/{session id} Delete Session + + POST + /session/async + Async New Session + + GET /status @@ -2139,8 +2151,15 @@

Sessions

an intermediary node will also close the session of the associated session. -

All commands, except New Session and Status, - have an associated current session, +

An intermediary node will also maintain a list of + session creation jobs. These include a mapping from + a session creation id to a session id of + an associated session. + +New Session, Async New Session, and Status commands + have no associated session or session creation job. + +

All other commands have an associated current session, which is the session in which that command will run.

A remote end has an associated list of @@ -2449,6 +2468,55 @@

New Sessio +
+

Get Session

+ + + + + + + + + + +
HTTP MethodURI Template
GET/session/{session id}
+ +

The remote end steps are: + +

    +
  1. Let session be a job in active sessions + with a session id matching session id + +

  2. If Remote end is an endpoint node and + session is null, return error + with error code unknown session. + +

  3. If Remote end is an intermediary node and + session is null, let session + be a job in session creation job with a session id + matching session creation id + +

  4. If Remote end is an intermediary node and + session is null, return error + with error code unknown session. + +

  5. Let body be a JSON Object initialised with: +

    +
    +
    "sessionId" +
    The session id of the current session. + +
    "capabilities" +
    The capabilities of the current session. +
    +
    + +
  6. Return success with data body. + This conversation was marked as resolved by christian-bromann +

+
+

Delete Session

@@ -2473,6 +2541,58 @@

Delete Session

+
+

Async New Session

+ + + + + + + + + + +
HTTP MethodURI Template
POST/session/async
+ +

The remote end steps are: + +

    +
  1. Perform the following substeps based on the remote end’s type: +

    +
    Remote end is an endpoint node +
    +
      +
    1. Execute steps defined in New Session +

    + +
    Remote end is an intermediary node +
    +
      +
    1. Use the result of the capabilities processing algorithm + to route the new session request to the appropriate endpoint node. + An intermediary node is free to define extension capabilities + to assist in this process, however, these specific capabilities + must not be forwarded to the endpoint node. + +

    2. Let session creation job be a new JSON Object + with the following properties: + +

      +
      "sessionCreationId" +
      The result of generating a UUID. +
      + +
    3. Add the session creation job to the list of + session creation jobs. + +
    4. Return success with data session creation job. +

    +
    +
+ +
+

Status

From a5c80dc6b2629b148884524ea199e997a2d6bf9e Mon Sep 17 00:00:00 2001 From: christian-bromann Date: Thu, 5 Nov 2020 16:37:42 +0100 Subject: [PATCH 2/3] make responses between endpoint and intermediary node conform --- index.html | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 01a0466c..3d44243f 100644 --- a/index.html +++ b/index.html @@ -2563,7 +2563,18 @@

Async New Session

Remote end is an endpoint node
    -
  1. Execute steps defined in New Session +

  2. Let session be a job iniated by following the same steps + defined in New Session + +

  3. Let body be a new JSON Object with the following + properties: + +

    +
    "sessionCreationId" +
    The session id of the session. +
    + +
  4. Return success with data body.

Remote end is an intermediary node From d30fb4cb405defd6003753d0adae00a1dafc2503 Mon Sep 17 00:00:00 2001 From: christian-bromann Date: Thu, 5 Nov 2020 16:48:39 +0100 Subject: [PATCH 3/3] add unknown session error --- index.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/index.html b/index.html index 3d44243f..47c765b5 100644 --- a/index.html +++ b/index.html @@ -1301,6 +1301,14 @@

Errors

but did not match an method for that URL. + + unknown session + 404 + unknown session + The requested sessionId did not match + with any sessionId known by a node. + + unsupported operation 500