Pipeline pattern


Posted on July 14, 2008

Since prefuse and its components are made with the pipeline concept, we should also follow such pipeline pattern when we development the prefuse application.

Pipeline model.
Pipeline model.

  • Before running it, we should define each piece of the whole Visualization, namely Source Data, Data Transformation, Data Tables, View Mapping, Visual Abstraction, View Transformation, View and Interaction. They are just the basic building blocks which would be composited together.
    • The package organization of prefuse is according to those building blocks.
  • The execution of a visualization would follow the order of the pipeline. Namely, at first the Source Data would be populated into Data Tables by applying Data Transformation, then Visual Mapping would add some visual attributes to Data Tables and make them into Visual Abstraction, finally View Transformation would draw the result onto View according to the attributes of Visual Abstraction.
    • The user can perceive the result from the View and do Interaction on it. Theoretically the Interaction can affect or update any building block of the Visualization, however the visualization execution would still keep its pipeline order.
  • It is not necessary to construct (or define) each building block in the exact order as what they should be. For example, it is possible to define View Transformation before defining Visual Mapping.
    • However, we should execute (or run) them in the correct order. For example, we must run Data Transformation before running Visual Mapping.
    • Note: Most of the time we have more than one action (or activity) to be run for Visual Mapping. We must also run them in correct order according to their meaning.
  • While we can construct each building block very independently, though each building block must use some clue to bind with each other. For example, prefuse let user assign a group name to any arbitrary data collection, and each building block can use such group name as clue to handle desired data.

Programming with pipeline pattern is similar to playing a pipe game.
  • Building pipe and define their connectivity: Constructing the building blocks for Visualization.
  • Running water through the pipes: Running the Visualization.
  • Changing the pipes while water running (if any game could do this): Doing the Interaction.

0 comments: