]> git.proxmox.com Git - mirror_novnc.git/blob - docs/notes
Change license to LGPL-3 and add some implementation notes.
[mirror_novnc.git] / docs / notes
1 Some implementation notes:
2
3 There is an included flash object (web-socket-js) that is used to
4 emulate websocket support on browsers without websocket support
5 (currently only Chrome has WebSocket support).
6
7 The performance on Chrome is great. It only takes about 150ms on my
8 system to render a complete 800x600 hextile frame. Most updates are
9 partial or use copyrect which is much faster.
10
11 When using the flash websocket emulator, packets event aren't always
12 delivered in order. This may be a bug in the way I'm using the
13 FABridge interface. Or a bug in FABridge itself, or just a browser
14 event delivery issue. Anyways, to get around this problem, when the
15 flash emulator is being used, the client issues the WebSocket GET
16 request with the "seq_num" variable. This switches on in-band sequence
17 numbering of the packets in the proxy, and the client has a queue of
18 out-of-order packets (20 deep currently) that it uses to re-order.
19 Gross!
20
21 The performance on firefox 3.5 is usable. It takes 2.3 seconds to
22 render a 800x600 hextile frame on my system (the initial connect).
23 Once the initial first update is done though, it's quite usable (as
24 above, most updates are partial or copyrect). I haven't tested firefox
25 3.7 yet, it might be a lot faster.
26
27 Opera sucks big time. The flash websocket emulator fails to deliver as
28 many as 40% of packet events when used on Opera. It may or not be
29 Opera's fault, but something goes badly wrong at the FABridge
30 boundary.
31
32 Javascript doesn't have a bytearray type, so what you get out of
33 a WebSocket object is just Javascript strings. I believe that
34 Javascript has UTF-16 unicode strings and anything sent through the
35 WebSocket gets converted to UTF-8 and vice-versa. So, one additional
36 (and necessary) function of the proxy is base64 encoding/decoding what
37 is sent to/from the browser. Another option that I want to explore is
38 UTF-8 encoding in the proxy.