A Good Development LLC

mViewer Remote Server Mode

This is something of a niche use case, but addresses a situation that is fairly common in scientific research.

While most researchers now have a fairly powerful computer on their desktop, it is often not the place they perform scientific number crunching or have the bulk of their data files. That is done on a collection of servers scattered around a local (or distributed) network. Getting data files displayed involves driving their desktop machine display remotely, cross-mounting file systems to it (often not supported by the local IT group), or resorting to file copying every time interaction is needed.

mViewer supports a version of the first option, though one that does not involve dealing with X11 tunnelling and the like. Instead of having mViewer start up a captive instance of a browser, it simply gives the user a URL to to connect to and leaves it up to them to paste this into the browser of their choice.

Since mViewer is maintaining a fully-functional web server internally, connected to a random port, the browser can actually be anywhere (subject to any firewall restrictions). Using technology like VPN, even fairly vigorous firewalls are not usually a problem.

This support is built in to mViewer.py and can be activated using the mView.py utility.


I maintain this web site on space rented from DreamHost. At the time of writing, the specific server my account resides on is hedgehog.dreamhost.com. I have a bunch of FITS files (and tables) there for people to download (see Example Datasets) and occassionally to test code or generate a screen dump I want to display the data in mViewer.

With mView.py, all I have to do is run, for example:


   mView.py --server data/fits/SDSS_g.fits
   

which responds with:


   Cut/paste the following into your browser: http://hedgehog.dreamhost.com:47546

Pasting the URL into any modern browser brings up the interactive mViewer interface.

There are situations where this won't work. For instance, inside IPAC at Caltech there are firewall rules that constrain traffic by port both ways, so I can't connect from there to the DreamHost machine on this port without the IPAC Systems people specifically opening that host:port. From home, it works fine. Similarly, starting mView.py at IPAC and connecting from home is disallowed by their firewall rules unless I am logged-in via VPN. These issues aside, though, the technique seems to work pretty universally.