~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to doc/dev/architecture.rst

  • Committer: William Grant
  • Date: 2009-12-07 11:01:50 UTC
  • mfrom: (1341.1.3 trunk)
  • Revision ID: grantw@unimelb.edu.au-20091207110150-jct30a9yru432ddn
Fix up the project set creation UI a bit.

Show diffs side-by-side

added added

removed removed

Lines of Context:
186
186
very large.
187
187
 
188
188
 
189
 
.. _ref-python-console:
 
189
.. ref-python-console
190
190
 
191
191
Python Console
192
192
==============
193
193
 
194
194
IVLE provides a web based programming console, exposing similar features to 
195
 
Python's command line console. It is built around the
196
 
:file:`services/python-console` script, which opens up a socket on a random
197
 
port to which `JSON`_ encoded chat requests can be made.
198
 
 
199
 
A new console is typically launched on demand by the web client to the HTTP
200
 
API, which in turn calls the wrapper class :class:`ivle.console.Console` to
201
 
start a new console in the user's jail.
202
 
 
203
 
Subsequent requests from the same in-browser console connect to the existing
204
 
console process. This is achieved by storing a string on the client which
205
 
identifies the server address and port. The client then makes requests
206
 
through the load balancer, sending this string through to an arbitrary slave
207
 
which forwards the request to the identified console.
208
 
 
209
 
This means that all slaves need access to all ports on every other slave.
 
195
Python's command line console. It is built around python script 
 
196
:file:`services/python-console` which opens up a socket to which `JSON`_ 
 
197
encoded chat requests can be made. A new console is typically from launched on 
 
198
demand by the web client to the HTTP API, which in turn calls the wrapper 
 
199
class :class:`ivle.console.Console` to start a new console in the user's jail.
210
200
 
211
201
.. _JSON: http://json.org
212
202
 
213
203
 
214
 
.. _ref-usrmgt-server:
 
204
.. _ref-usermgt-server:
215
205
 
216
206
User Management Server
217
207
======================
225
215
* Creating group Subversion repositories.
226
216
* Rebuilding Subversion authorization files. 
227
217
 
228
 
Communication with the Server is done using the :ref:`Chat Protocol
229
 
<ref-chat>`.  To prevent unauthorized use, communication with the User
230
 
Management Server requires that a *shared secret* be used to communicate with
231
 
the server.  This secret is stored in the `magic` variable in the `[usrmgt]`
232
 
section of :file:`/etc/ivle/ivle.conf`.
 
218
Communication with the Server is done using the `Chat Protocol <ref-chat>`_.  
 
219
To prevent unauthorized use, communication with the User Management Server 
 
220
requires that a *shared secret* be used to communicate with the server.  This 
 
221
secret is stored in the `magic` variable in the `[usrmgt]` section of 
 
222
:file:`/etc/ivle/ivle.conf`.
233
223
 
234
224
The User Management Server is called almost exclusively from the 
235
225
:mod:`ivle.webapp.userservice` module.
241
231
Chat Protocol
242
232
=============
243
233
 
244
 
**Chat** is our JSON_-based client/server communication protocol used in
245
 
communicating to :ref:`Python Console <ref-python-console>` processes and
246
 
:ref:`User Management Server <ref-usrmgt-server>`.  Since it is JSON-based it
247
 
can be called from either Python or JavaScript.
 
234
**Chat** is our JSON_-based client/server communication protocol used in 
 
235
communicating to `Python Console <ref-python-console>`_ processes and `User 
 
236
Management Server <ref-usrmgt-server>`_.  Since it is JSON-based it can be 
 
237
called from either Python or JavaScript.
248
238
 
249
239
Protocol
250
240
--------
310
300
 
311
301
Each user is allocated a Subversion repository when their :ref:`Jail 
312
302
<ref-jail>` is created by the :ref:`User Management Server 
313
 
<ref-usrmgt-server>`. Repository are stored in the location specified by 
 
303
<ref-usermgt-server>`. Repository are stored in the location specified by 
314
304
``[paths] [[svn]] repo_path`` in :file:`/etc/ivle/ivle.conf` (by default 
315
305
:file:`/var/lib/ivle/svn/repositories/`). User repositories are stored in the 
316
306
:samp:`users/{USERNAME}/` subdirectory and group repositories in