Pure JavaScript Unix-Like Web Based OS
slummy writes " JS/UIX 'is an UNIX-like OS for standard web-browsers, written entirely in JavaScript (no plug-ins used). It comprises a virtual machine, shell, virtual file-system, process-management, and brings its own terminal with screen- and keyboard-mapping.' If only you didn't need an OS to run the web browser on."
The site is already dead, so here's something else - not a complete OS, but still has a (working) browser, games etc.
Underholdning.info
Shameless plug: I've made something similar here: http://wakaba.c3.cx/desktop-test/desktop.pl
Log in as test:test. It's fairly useful for doing management of a web server. Try not to Slashdot it too badly, OK?
Mor information here: http://wakaba.c3.cx/sup/kareha.pl/1116806324
For another really cool example of what you can do with JavaScript, click here.
pi = 2*|arg(God)|
Well, actually you can get quite far with polling.
;-)
As you said, latency will be hell (e.g. 2 sec), but the UNIX CLI deals surprisingly well with high latency links.
Back in the day it was quite common to do stuff over 300bps links with high latency (probably rarely up to 2s but in the ballpark).
So, first of all you'll decouple Input and Output.
Instead of sending a char, waiting until the server echos it and printing it you will print the typed chars immediately and probably send the whole line on each poll (these few bytes are dwarfed by http protocol overhead anyways) so the server doesn't even need to "assemble" the line but just gets the whole thing everytime.
This will basically give you "local" feel on the CLI and latency only kicks in when you actually need the server response (e.g. cycling through the history or firing the command).
For interactive things (think: editor) it gets a bit more difficult since you actually depend on the editor telling you where to put the cursor etc.
Even for that stuff there are plenty ways to optimize cuz, as said, people have been tackling the "slow-link" problem very exhaustingly a long time ago.
Well, why anyone would want to spend all that effort when they can just use SSH is beyond me, tho...