~benji/charms/precise/juju-gui/fix-cache-headers

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<!--
Operation.md
Copyright 2013 Canonical Ltd.
This work is licensed under the Creative Commons Attribution-Share Alike 3.0
Unported License. To view a copy of this license, visit
http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative
Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
-->

# Juju GUI Charm Operation #

## How it works ##

The Juju GUI is a client-side, JavaScript application that runs inside a
web browser. The browser connects to a custom-made server deployed by
the charm.

## Server ##

The server directly serves static files to the browser, including
images, HTML, CSS and JavaScript files via an HTTPS connection to port
443. HTTP connections to port 80 are redirected to the former one.
All other URLs serve the common `index.html` file.

It also acts as a proxy between the browser and the Juju API server that
performs the actual orchestration work. Both browser-server and server-
Juju connections are bidirectional, using the WebSocket protocol on the
same port as the HTTPS connection, allowing changes in the Juju
environment to be propagated and shown immediately by the browser.