# Presentation: 460032

## PPPL Spring/Summer CO-OP 2006

- Stephen Krenzel

## Focus of the CO-OP

**The co-op focused on improving ElVis, an application for the visualization and monitoring of scientific data.**

## Original ElVis Architecture

- Commands
- rplot text

- Initially, rplot sent data directly to ElVis, or data was read from the local file system.

- ElVis

- File-System

- rplot
- elvis_server
- elvis_port

- Application or Applet

- Network

## ElVis Portal Architecture

- Application or Applet

- Commands
- rplot text

- ElVis is moving to a services oriented architecture. ElVis can now acquire data through a compute service. This allows ElVis to run effectively as an applet in a web browser or as a stand-alone application. It also supports collaboration between
- users. Many of ElVis' design decisions are now centered around constraints imposed by applets.

- ElVis

- File-System

- ElVis Servlet

- Graph Window
- Handler

- clterm
- pty

- rplot
- elvis_server
- elvis_port

- Elvis API

- Commands
- rplot text

- Rplot
- text

- stdio

- Application or Applet

- xml data

- Network

## Areas of Attention

**XML Protocol for ElVis API**
**Logarithmic Plotting**
**Whiteboard**
**Development Process**

## XML File Format

**XML (eXtensible Markup Language) is a general purpose markup language for describing structured information.**
**Human-readable, yet easily handled by machines**
**Self-documenting and widely supported**
**Example:**

- <memo date=”02/19/99”>
- 	<to>Peter</to>
- 	<from>Bill</from>
- 	<heading>Reminder</heading>
- 	<message>
- 		Don't forget to put the new
- 		coversheet on the TPS reports.
- 	</message>
- </memo>

## EML (ElVis Markup Language)

**Old format:**
**Proprietary binary byte-stream**
**Many compatibility and versioning issues**
**New XML based format:**
**Implemented using open industry standards, and a robust framework (dom4j)**
**Easily extended, and important to ElVis moving forward**
**Formally specified in a Document Type Definition (DTD)**
**allows others to easily adopt the format**
**Network transparent and backward compatible**
**Speed: ~70,000 data points / second**
**(SUN Java 1.4.2_11, Intel Xeon 3.00Ghz,  2.4.21 Linux kernel )**
**Size: XML is verbose, however has very high compressions ratios if size becomes a problem. Typically on the order of 91% - 99% in tests done on EML files.**

## Simple EML Example

**<?xml version='1.0' encoding='utf-8'?>**
**<visualstate>**
**    ****<graphwindow>**
**        ****<graph title="test">**
**            ****<axis text="X" direction="x"/>**
**            ****<axis text="Y" direction="y"/>**
**            ****<data1d name="data">**
**                ****<point x="0" y="0"/>**
**                ****<point x="1" y="2"/>**
**                ****<point x="2" y="4"/>**
**            ****</data1d>**
**        ****</graph>**
**    ****</graphwindow>**
**</visualstate>**

## Logarithmic Plotting

**ElVis now supports viewing data linearly or logarithmically on either axis**
**Applies to single or multi-variable data**
**Translating and scaling of logarithmic axes are still in progress**
**Tested to work with rplot and sigtab**
**The classes were also utilized by Tarun Pondicherry in his work with logarithmic surface plots**

## Log axis class used in surface plots.

## Whiteboard

**Users can now draw arrows, circles, rectangles, lines, and freestyle**
**Anything that can be drawn, including highlights on data, can have its color, thickness and style set**
**Objects can now be selected, translated, removed, and have attributes modified after being drawn**
**Highlights on indexed data persist as the data is animated, allowing areas of interest to remain marked**
**Whiteboard objects are now saved and read from NetCDF files**

## Development Process

**Introduced the Eclipse integrated development environment (IDE)**
**Facilitates team oriented development through tight integration with CVS**
**Iterative compiler**
** ****Code changes are applied in real-time**
**This is particularly useful when setting up test cases**
**Has easy to use debugging utilities**
**Intelligent code handling and general “awareness” of potential issues**
**Some support for other languages as well**

## Using the eclipse debugger was invaluable for debugging image display code.

- This is another java client for the reflectometer. Three images, each at different
- resolutions, overlapping.

## Development Process

**Some code was optimized by removing instances of unnecessary code**
**i.e. methods being called to update values that hadn't been changed**
**Assisted by Eclipse's code analysis tools, over 550 warnings, bugs, and miscellaneous fixes (i.e. unused code) were made**

## Summary	

- Enhancements to ElVis Architecture
- Log Plotting
- Whiteboard
- Software Development Environment (Teach a man to fish...)

## Thank You

**In particular, I'd like to thank Eliot Feibush, Doug McCune, Drexel University and the Princeton Plasma Physics Lab.**