Feature #703

Initial Web-based histogram presenter

Added by Jackson, Mike over 12 years ago. Updated over 12 years ago.

Jackson, Mike
Online reconstruction
Target version:
Start date:
20 September 2011
Due date:
% Done:


Estimated time:


Simple web server-based component to display histograms for demo purposes. Can be just a PHP script to list image files in a directory.


Updated by Jackson, Mike over 12 years ago

From MAUS SSI Component Design - Online Reconstruction:

  • Store plots output by reducers "somewhere" so they can be rendered.
  • Plots need to be rendered in a web interface so they're visible in the control room and externally.
  • Initial version can be directory of files and PHP script/HTML file to list them.
  • CT can provide access to web server.

Updated by Jackson, Mike over 12 years ago

Started on Django ( tutorial. Instead of a PHP script/HTML file list, makes more sense to just get familiar with Django now and do a simple image viewer using it, as we'll return to Django in #706.

Prototyped example which displays directory of images with thumbnails.


Updated by Jackson, Mike over 12 years ago

Example uses Django's in-built web server. For production deployments (at #703) they recommend a web server like Apache Axis 2.

Waiting for EPCC to open firewall on EPCC server so simple prototype can be shown.

Where should this code go in the repository? src/gui? src/apps/status-monitor?

As a reminder to self, once the code is in, the installer needs to be changed to:

$ easy_install django
$ easy_install pil

Then customise Django project's to specify absolute paths to:

  • SQLlite database file
  • Location of Django template files
  • MEDIA_ROOT - locations of files to show

Then run

$ python syncdb

Or provide a separate install/configuration script? Since not all users may want it.


Updated by Tunnell, Christopher over 12 years ago

This will only be run in three places: control room which is the main client, test server which is a control room mirror, and on a developer's machine.

The code to get plots into a database should probably be in MAUS. The Django stuff and any other tools required should be stand-alone probably. What do you think?


Updated by Jackson, Mike over 12 years ago

I agree about the code to get the plots into the database being in MAUS. The Django stuff can be separate since it's only really rendering images or, if desirable (and it might be) JSON documents, output by MAUS. But it'll only need a database connection, or a directory to access these. So I guess the question is where (repository-wise) should it be stored in the meantime...a new LaunchPad project?


Updated by Tunnell, Christopher over 12 years ago

I think a new django project sounds like a good idea. Being as clear as possible about the specification for components helps avoid feature bloat I guess.


Updated by Jackson, Mike over 12 years ago

Uploaded prototype Django project. On LaunchPad at

Work to date is in my branch

bzr branch lp:~michaelj-h/maus-apps/devel

Displays thumbnails of image files (EPS, PNG etc) in a directory. Thumbnails are generated on the fly and cached in another directory. Viewing of EPS as PNG is done on the fly.


Updated by Jackson, Mike over 12 years ago

I've set it up to show a directory with a couple of image files at:
Can connect from outside EPCC domain but seems very slow (maybe my connection or due to it running in the Django development server and not a proper web server).


Updated by Tunnell, Christopher over 12 years ago

  • Subject changed from Web-based histogram presenter to Initial Web-based histogram presenter

Per your other #691, this can be closed. I renamed it to "Initial" because I can see various fanciness we may want to add one day.


Updated by Tunnell, Christopher over 12 years ago

But quick question: is any coded needed in the trunk that isn't in yet? Ideally, this gets closed when (if there is something in your branch that's needed by a general user) code is merged.


Updated by Jackson, Mike over 12 years ago

This code's stored in a separate LaunchPad project, there's nothing that it needs that should be in trunk. The web interface could, in future, either pull its files from CouchDB or a directory or somewhere else. Trunk would only need changed if there was a desire to have parameter changes in the web interface affect the state of the map-reduce jobs running in

Requirements for the enhanced histogram/monitoring web interface can be added to #706.


Updated by Jackson, Mike over 12 years ago

CT: The main question is: is everything done that would be needed for serial processing with 1) histograms and 2) basic django? Ie. we should attempt to set that up? It looks like there is a lot written but just wanted to check that you sign off on it and say that those parts are ready to be tested as prototypes. If not, then how do we get to that point?

MJ: The basic Django is very basic - just listing the contents of a directory. So, from the Django/web side that could be tested. It's a standalone component as described in the ticket and in its own LaunchPad project so it doesn't require anything to be in the MAUS trunk to support it.

The histogram reducer could be set up to just dump its images into the same directory that Django expects to find the files, so that part is fine. But a future enhancement could be to read images from CouchDB or a remote FTP server or whatever but, again, this affects the Django side and not the MAUS trunk side.


Updated by Tunnell, Christopher over 12 years ago



Updated by Jackson, Mike over 12 years ago



Updated by Tunnell, Christopher over 12 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

Updated by Rogers, Chris over 12 years ago

  • Target version changed from Future MAUS release to MAUS-v0.1.0

Also available in: Atom PDF