Debian Codegraph @

websock/README

raw
1
2 This directory contains the source code for the try-GNU-APL web site.
3
4 The sub-directory 'client' contains the client (web-browser) part which is
5 sent to a remote browser.
6
7 The sub-directory 'server' contains the server part which is executed
8 in a node.js context around GNU APL.
9
10
11 A HTTP GET /try-GNU-APL is processed as follows:
12
13 SERVER
14 CLIENT ╔════════╗
15 ╔═════════╗ ║ HTTP ║
16 ║ Browser ║ ║ server ║
17 ║ ╟───→─── GET /try-GNU-APL ───→───╫───┐ ║
18 ║ ╔═════╗ ║ ║ │ ║
19 ║ ║ ┌─╫─╫───←─── apl_js.html ───←───╫───┘ ║
20 ║ ║ │ ║ ║ ╚════════╝
21 ║ ║ │ ║ ║ ╔═════════╗
22 ║ ║ └─║─╫───→── GET ws:*:42424 ───→───╫────┐ ║
23 ║ ║ ║ ║ ║ ↓ ║
24 ║ ║ ║ ║ stdin ║ ╔══╧══╗ ║
25 ║ ║ ─╫─╫────────────────────────────→───╫─╢ GNU ║ ║
26 ║ ║ ─╫─╫────────────────────────────←───╫─╢ APL ║ ║
27 ║ ║ ─╫─╫────────────────────────────←───╫─╢ ║ ║
28 ║ ║ ║ ║ stdout ║ ╚═════╝ ║
29 ║ ╚═════╝ ║ stderr ║ web ║
30 ║ apl_js ║ ║ socket ║
31 ╚═════════╝ ║ server ║
32 ╚═════════╝
33
34
35 1. The browser sends a GET request for /try-GNU-APL (port 80)
36
37 2. The HTTP server returns file apl_js.html to the browser.
38
39 3. apl_js.html contains a piece of javascript that connects to the
40 web socket server (port 42424).
41
42 4. The web socket server starts a GNU APL instance and sets up a
43 web socket connection to the javascript. The javascript side of the
44 connection does a simple terminal emulation that generates the input
45 for GNU APL and formats the output of GNU APL in the browser.
46