Project: Visualizing Trac Wiki Pages (Part 2)

26 12 2009

More information before we start with the implementation:

Graph requirements:

  • Display all wikipages as nodes
  • Show direction (links are uni-directional)

Option Requirements:

  • Highlight direct connected wikipages
  • Display content (in separate browser window)

Wiki Graph

The XML for prefuse graphs look like this sample (our groovy script needs to produce this):

<?xml version="1.0" encoding="UTF-8"?><graphml xmlns="http://graphml.graphdrawing.org/xmlns">
 <graph edgedefault="directed">
 <key id="wname" for="node" attr.name="wname" attr.type="string"/>
 <node id="1">
 <data key="wname">WikiStart</data>
 </node>
 <node id="2">
 <data key="wname">IdeOverview</data>
 </node>
 <node id="3">
 <data key="wname">JavaEE</data>
 </node>
[..]
 <edge source="1" target="3"/>
 <edge source="1" target="4"/>
 <edge source="1" target="5"/>
 <edge source="1" target="6"/>
 <edge source="1" target="7"/>
 <edge source="1" target="13"/>
 <edge source="3" target="4"/>
 [..]
 </graph>
</graphml>

The prefuse xml file contains the metadata for the nodes, all nodes and all edges linking the nodes.

Using the backup function of Trac we need to process input like this sample:

INSERT INTO "wiki" VALUES('wikiPage1',2,1246948793,'user','220.255.7.193',' * MySQL on Server xyz * Evaluate Firebird and Oracle. (schema and timestamp issue)','',0);

The SQL file contains the complete wiki content. Following the sample we need to filter with

  • type: INSERT INTO ‘wiki’ (filter out all others)
  • page title: ‘wikiPage1
  • version: ‘2‘ (search for the highest version)
  • wiki user: ‘user‘ (filter out all ‘trac’ entries)
  • content: ‘* MySQL on Server xyz * Evaluate Firebird and Oracle. (schema and timestamp issue)




Project: Visualizing Trac Wiki Pages (Part 1)

26 12 2009

We are using Trac as Wiki and after a couple of months using it as main know-how repository, we tend to loose the overview of the myriad of pages and how they are linked to each other. A graph representing the relation between the pages would be very useful.

I could not find any plugin or tool, so it would be a good exercise to create a tool that convert a trac wiki into a graph.

Options:

  • Use Java or Groovy. I choose Groovy because less boilerplate for standard tasks, such as creating xml, reading text files, etc.
  • XML-RPC to access the wiki directly. I tried to create a mockup in Java, but failed due to the cryptic error messages and hard to debug.
  • Trac backup to retrieve wiki data: You can create a backup in form of an INSERT sql file containing the complete structure of the wiki (inclusive of non-user content and all revisions of the wiki. I choose this as a starting point until I get the XML-RPC problem solved (maybe in Groovy).
  • Visualization in JGraph, InfoVis, Prefuse or other toolkits. I decide for Prefuse because it is feature complete, powerful and I created simple applications previously.

Current Implementation:

  • A simple Groovy script that works in 2 stages, a) reading and processing the sql backup file and b) creating a xml file that my prefuse viewer can display.

Future Plans:

  • Create a standalone SwingXBuilder application
  • Create a Netbeans Plugin




Sunday Afternoon Projects

16 02 2009

I love 3D engines and the concepts of simuation of real world scenarios with realistic looking software. Most of the 3D engines are heavily infested with C, C++ or C# (due to higher performance) and almost all of them have a hefty learning curve, if you want to go beyond the click-and-play editor of the simple game engines. I dont really have time to get involved in technology that is too far away from Java and Java is not really known for powerful 3D graphics…until I found this:

  • JMonkeyEngine (JME is a highperformance 3D scene graph based graphics API)
    (link)

    Josh Slack (the brain behind JMonkeyEngine) at Java One 2008

And if you want to have a simpler start into the world of physics, you can play with Phys2D. I even someone implementing a simple game in JavaFX using this ! Will share more on this on the next sunday afternoon sesion.