Using HyperViewer client program in Emulab

Table of Contents:

  1. Introduction
  2. Supported platforms, release notes
    1. FreeBSD
    2. Windows
    3. Linux
  3. Package dependencies
  4. Installing hypview
    1. Getting and unpacking hypview on Unix/Linux
    2. Getting and unpacking hypview on Windows
    3. Building hypview on Unix/Linux
    4. Building hypview on Windows
  5. Running hypview as a script
  6. Using the hypview Graphical User Interface
    1. Overview
    2. Mouse: dragging, rotation, and picking
    3. Control panel: node controls
    4. Control panel: mode controls
    5. File and Experiment opening
  7. An example

Introduction

hypview is a client program which runs on your computer, and shows a 3D view of the network topologies for Emulab experiments.  In detail, we have wrapped the HyperViewer in a wxGlade Python graphical user interface, and connected it to the Emulab database via XML-RPC over SSH.

hypview supports interactive three-dimensional exploration of experiment network topologies, and scales to very large topologies.  Below is a before-and-after view of a mid-sized network with 541 nodes.  First is the static 2D Graphviz view, using an algorithm which is perfectly adequate for smaller topologies.  Then a snapshot from hypview of the same topology, where more structure is apparent.  Interactively, it is easy to reach out from the high-detail area in the center of the HyperVIewer sphere to look more closely into the compressed areas near the outside surface of the sphere.

 

 Hyperbolic Motion - Figure 3
The HyperViewer software was developed by Tamara Munzner at Stanford.  It is useful for visualizing relationships within large graphs such as network topologies, and is freely distributed as a C++ class library which calls OpenGL for drawing.  See her short paper for further description, particularly Figure 3 which shows Hyperbolic motion over a 30,000 element Unix file system.  The drawing and picking algorithms are designed to produce a constant frame-rate by doing the most visible features first, and hence scales to 100,000-node graphs.
 

 
The basic idea is that a graph is presented within a sphere that resembles a fish-eye lens: objects in the center of the sphere appear full-sized, but objects get smaller as they approach the surface of the sphere.  A hyperbolic projection is used, which actually maps an infinite 3D space onto the volume of the finite sphere.  M.C. Escher did likewise in 2D with hyperbolic tilings.




Supported platforms, release notes:

Xlib:  extension "XFree86-DRI" missing on display ":0.0".
In either case, the proper directory for plink.exe or ssh.exe has to be on your PATH environment variable, and you have to have an SSH key generated and loaded:
Test that everything is set up, and accept the Boss host key with:
plink boss.emulab.net
eval `ssh-agent -s`
ssh-add .ssh/id_dsa
Paste the id_dsa.pub into the Emulab page as above, and do the following once to get boss.emulab.net put into your .ssh/known_hosts file:
ssh boss.emulab.net
Emulab user name: If your Emulab user name is different from your login name, set the EMULAB_USER environment variable to your Emulab user name.  hypview will use that in preference to the USER or USERNAME variables, and default to "guest" if none of them are set.  This may be over-ridden in the Open/Experiment window.

Emulab project name:  Similarly, if you always use the same project name, you can set it to default in the EMULAB_PROJECT environment variable.

Package dependencies:

It needs wxPython, which on Unix requires Python 2.3, wx_GTK2, GTK-x11, Pango, and glib, as well as glX and OpenGL.  On Windows, the distributions of Python, wxPython, and PyOpenGL are self-contained.

Plus wxGlade on top of wxPython if you want to modify the GUI design.



Installing hypview

Getting and unpacking hypview on Unix/Linux:

tar xvzf hyperviewer.tgz
./hypview ts600.hyp
Notice that hypview runs only in the hyperviewer directory for now.
Traceback (most recent call last):
  File "hypview.py", line 17, in ?
    from hvFrameUI import *
  File "hvFrameUI.py", line 8, in ?
    from wxPython.wx import *
ImportError: No module named wxPython.wx

No problem if so.  Just get the supplementary library tarball for your platform:  FreeBSD-4.9

Unpack into the hyperviewer directory and try running hypview again.
If you are comfortable installing wxPython and its dependencies, or having your system administator do it, we'd still like to hear what version of the system you are running on when it is working. 

Finally, if you have wxPython installed and are still having trouble, you could go to the next section on rebuilding hypview from sources.

Getting and unpacking hypview on Windows:

hypview.bat ts600.hyp
Notice that hypview runs only in the hyperviewer directory for now.

Building hypview on Unix/Linux

Full sources for hypview and a version of the hyperviewer library are included in the release tarballs.  There is also a sources-only tarball you can start with.

Building from sources avoids shared library compatibility problems, but requires that you have wxPython and its dependencies installed on your machine first.
cd hyperviewer
gmake -f GNUMakefile
There are a couple of example files included:
cd hyperviewer
./hypview BigLan.hyp

./hypview ts600.hyp
 

Building hypview on Windows

Full sources for hypview and a version of the hyperviewer library are included in the WinZip self-extracting exe file.  There is also a sources-only tarball you can start with.

 You will need to install Developer Studio 6 with Visual C++ and the Platform SDK (which includes OpenGL.)  VC++ and OpenGL documentation is on the MSDN library disks.
There are a couple of example files included:
cd hyperviewer
hypview.bat BigLan.hyp

hypview.bat ts600.hyp

Running hypview as a script

Running hypview with any dash argument such as -h produces the following usage summary:
(Use the hypview script on Unix/Linux or Cygwin/BASH;  hypview.bat in Windows cmd shells.)
Hyperviewer usage:
  No args - Starts up the GUI.  Use the File/Open menu item to read a topology.
  One arg - A .hyp file name.  Read it in and start the GUI, e.g.:
      ./hypview BigLan.hyp
  Two args - Project and experiment names in the database.
      Get the topology from XMLRPC, make a .hyp file, start as above.
      ./hypview testbed BigLan
  Three args - Project and experiment names, plus an optional root node name.
      ./hypview testbed BigLan clan



Using the hypview Graphical User Interface

Getting out: When you want to leave hypview, pick the File/Exit menu item, or type Ctrl-Q, or just close the window.

Here's an example of the appearance of hypview once it is running.  The pane on the left contains the HyperViewer.  The pane on the right is the control panel.



Mouse: dragging, rotation, and picking





Control panel: node controls

The control panel at the right is divided into two sections.  The one on the top gives information about the last-selected node, and the one in the middle controls modes of HyperViewer.

The node controls include:


The "show" and "hide" controls are used to explore networks with many cross-links.  HyperViewer computes a minimal spanning tree through the graph, and just shows that at first.  The rest of the graph links, which cross-link between spanning tree branches, are called "non-tree links" by HyperViewer.  These links are not visible at first, to cut down on clutter.

The "descend" check-boxes are on by default, causing a "show" or "hide" to apply to all of the links under the selected node in the minimal spanning tree.  If you uncheck the "descend" options, the "show" and "hide" buttons apply only to the selected node, and are greyed-out if there are no links in to or out of that node.

Here is an example (ts600.hyp) where the links are then turned on by clicking either of the "show" buttons for the whole tree (descending recursively from the root):



There is another example of using the "show" controls while exploring a larger Emulab experiment graph below.

Control panel: mode controls

The mode controls are still changing.  There are a lot of modes in HyperViewer to control the drawing and layout of graphs.  (There are no layout controls visible yet.)

Boolean check-boxes (click to toggle): Choices (click to choose one or roll with the mouse wheel):
Numbers (type a new value, click the up/down buttons, or roll with the mouse wheel):

File and Experiment opening

There is one more dialog panel which pops up when you select the File/Open menu item, or type Ctrl-O.  You can read a .hyp file, or load an experiment from the database via XML-RPC over SSH.



An example

Here's an example of exploring a largish Emulab experiment topology using hypview.


When we first open experiment testbed/2440 (which has 2,611 nodes), the view starts at the first node returned from the Emulab experiment database, leaf-17-2040-1768.  The rest of the topology trails off in the distance to the right.


Looking to the right (dragging the view to the left), we pass nodes named border-17-1949 with many leaf nodes fanning out from it, and border-17-1937 with many other border nodes fanning out.  Clearly we're climbing up a tree branch, although it's upside-down because the HyperViewer spanning tree didn't start us at the center. 


Then we reach a node named interior-16 which is linked to border-17-1936 and interior-19.  interior-19 is linked to other interior nodes.  This could be a mesh at the middle of the tree.  (The region we came from is now in the distance in the upper left corner.)


To see the linkage of the central mesh, we pick node interior-19 and click on the "show" node control buttons.  Now we're seeing the "non-tree links", not  just the minimal spanning tree, and have learned that the names of the nodes in the mesh which is really at the root of the tree all start with "interior-".


So we open the experiment again, this time giving the optional root name with a wildcard asterisk: interior-*.  A root node is inserted and the interior nodes fanned out from it.


Now we can see the overall structure of the experiment network.  Interior nodes fan out from the root, with a pair of upper border nodes fanning out from each interior node, and many lower border nodes fanning out to the many leaf nodes below.