Previous Topic

Next Topic

Book Contents

Book Index

System Architecture (deprecated)

Provides information about the WebSockets system architecture.

Module Design

  1. HTTP Request is initiated by the HTTP client (Web browser or standalone application)
    1. request is sent to the Bosch IoT Gateway Software HTTP Service (standard port 80 or 443)
    2. request is sent to a Standalone Server 1 (Simulated HTTP server only for WebSocket connections)
    3. request is sent to a Standalone Server n (Simulated HTTP server only for WebSocket connections)
  2. The request is checked for the required headers (UPGRADE: websocket, CONNECTION: upgrade)
    1. if the required headers are missing or there is no registered WebSockets ProtocolHandler service available return normal HTTP response by the Bosch IoT Gateway Software HTTP Service
    2. if the Standalone Server 1 does not find the (UPGRADE: websocket, CONNECTION: upgrade) it returns HTTP 404 Websockets upgrade failed
    3. if the Standalone Server n does not find the (UPGRADE: websocket, CONNECTION: upgrade) it returns HTTP 404 Websockets upgrade failed
    4. if the request contains the necessary headers it is transferred to the to the Bosch IoT Gateway Software WebSocket Server by the Bosch IoT Gateway Software HTTP Service
    5. if the request contains the necessary headers it is transferred to the to the Bosch IoT Gateway Software WebSocket Server by Standalone Server 1
    6. if the request contains the necessary headers it is transferred to the to the Bosch IoT Gateway Software WebSocket Server by Standalone Server n
  3. The WebSockets Server checks for suitable WebSocket Application, scope of the server and WebSocket Application match, etc.
    1. if the checks fail the control is returned to the Bosch IoT Gateway Software HTTP Service
    2. if the checks fail the control is returned to the Standalone Server 1
    3. if the checks fail the control is returned to the Standalone Server n
    4. if the checks pass, the control is transferred to WebSockets Application 1
    5. if the checks pass, the control is transferred to WebSockets Application n
  4. The HTTP non-successful response is returned
    1. the Bosch IoT Gateway Software HTTP server returns either 404 or 200 if the resource is found
    2. Standalone Server 1 returns 404
    3. Standalone Server n returns 404
  5. The HTTP client request for WebSockets protocol upgrade is successful and 101 HTTP code is returned to the HTTP client (switching protocols)
    1. WebSocket is created by WebSocket Application 1
    2. WebSocket is created by WebSocket Application n

HTTP Error Codes

The Bosch IoT Gateway Software WebSocket Server supports the following error codes: