Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content

Draft: Resolve "bec terminal as a web application example"

guijar_m requested to merge 214-bec-terminal-as-a-web-application-example into main

Description

The simplest possible code (?) to run BEC IPython client as a web application, with full control over terminal I/O.

This is a proof of concept - not to use in production code (still relies on CDNs, which we probably don't want). A full-fledged web app is more work.

Technical details

Relies on Flask for the backend part, added with SocketIO. SocketIO offers interesting features to find the best communication protocol (websockets or anything else depending on what is available), nice connection/disconnection handling, "chat rooms", etc On the client side, xtermjs is the terminal, with full VT100 emulation. When it loads on the web page, it connects to SocketIO and then BEC IPython is started attached to a pseudo TTY (input/output is redirect to a file descriptor). Incoming commands from xtermjs are passed to the pseudo TTY input, whereas a thread is listening for output to transfer back to xtermjs via SocketIO link.

Closes #214

Merge request reports

Loading