1. Tim Freund
  2. packetpulse


Packet Pulse


This code will graphically display real time activity in a number of 
ways that should be especially helpful to folks in operations roles. 

The activity is rendered with the help of the Processing toolkit and
associated libraries.  There are currently two rendering models:

 1. Static rendering with an SVG canvas.
 2. Dynamic rendering as a network of nodes

Three input consumers are available at this time:

 1. JMS Topic consumer
 2. Socket listener
 3. Random event generator (useful for testing)

Quick Start

All required libraries are included.  For a randomly generated
demonstration, run one of the following ant targets:

 $ ant dynamic
 $ ant svg

Concepts for Developers

There are three major components in play: Streams, EventConsumers, and
StreamViewers.  Streams are fed data from EventConsumers and are rendered
to the screen by StreamViewers.  

If you like one of the existing viewers, but you want to hook the application
up to your own custom data source, you want to write a new EventConsumer. 

If you think the existing viewers suck, then you'll wade into
StreamViewer and Stream territory.  Advanced stream viewers may
require advanced streams, so don't be surprised if writing a viewer
requires you to also write a stream implementation.  


The system is configured with JSON files.  Example files are provided:

 1. src/main/resources/configuration-dynamic.json

Configures a dynamic stream viewer and a random input consumer.

 2. src/main/resources/configuration-svg.json

Configures an SVG viewer and a random input consumer.

 3. src/main/resources/configuration-jms.json

Configures a dynamic stream viewer and a JMS topic consumer.

Requirements and Warnings

The following pieces of software are required:

 * Java (Tested with JDK 6)
 * Ant (If you would like to build the software)

Although this code should build and run on most systems, it has not
been heavily tested.  I have tried to make it developer friendly, but
it is not quite ready for end users.  Proceed with caution.

If it doesn't work for you, please fork and fix or report the issue.

Moving Forward

 * The DynamicNodeStreamViewer has a tendency to render nodes on 
   top of one another once there is a large number of nodes.  
   That is annoying. 
 * The DynamicNodeStreamViewer can wind up with edges that don't 
   appear attached to any nodes.
 * The DynamicNodeStreamViewer can flip out and go nuts at the 
   beginning of a run, and no nodes will be visible. 
 * It would be nice to have some way of accepting various standard
   log files as input sources out of the box.

Resources and Attribution

 * Processing: http://processing.org/
 * Traer Physics Library: http://www.cs.princeton.edu/~traer/physics/
 * DejaVuSansMono: http://dejavu-fonts.org/wiki/index.php?title=License
 * Blank_US_Map.svg: http://commons.wikimedia.org/wiki/File:Blank_US_Map.svg
 * ActiveMQ: http://activemq.apache.org/
 * Google GSON Library: http://code.google.com/p/google-gson/