Visualizing OSGi Systems

Visualizing OSGi Systems

At the recent OSGi Tool Summit, one of the biggest discussion items that came up was visualization. This makes perfect sense to me as visualizations can be a powerful tool, whether it’s for reviewing your architecture or sharing information with colleagues. In the OSGi world, I only know of two projects starting to scratch the surface of visualizing OSGi systems: PDE and Knopflerfish. Since I co-lead PDE, let me speak about what I know best. In PDE, I recently published a new build of the PDE Visualization project:

pdeviz

To install, point Eclipse (Help->Install New Software…) to this repository (make sure you have the Galileo or Ganymede repository in your list of repositories so p2 can reason about the dependencies). I recommend using Eclipse 3.4 or later too.

A couple days ago, I spent some time polishing the visualization code and pondering about what functionality is missing. First and foremost, the biggest thing missing is the ability to visualize packages and services. Currently, it’s only possible to visualize bundle-level dependencies and the only reason this is the case is because noone has spent time to add support! Another cool feature that’s missing in my opinion is to measure dependency extent. Imagine for a second if the screenshot above included information on the weight of a dependency… for example the lines could be thicker to signify how “strong” of a dependency org.eclipse.jdt.core has on certain bundles. This type of information would allow us to potentially prune bundles that we didn’t really need or catch mistakes where we bring in one bundle that depends on the “rest of the world.” There’s so many possibilities when you start thinking about it!

What do people out there want to see in their OSGi visualization tools? Any crazy ideas?

If you’re interested in helping the PDE Visualization project move forward, let me know and I’d love to help you contribute. In my opinion, it would be a great opportunity to get invovled with PDE and potentially the Zest project (which powers the visualizations). Don’t be shy and feel free to shoot me an email.

28 Comments
  • Posted at 22:38, 2009-04-13

    Your update site appears as ‘Exported Repository’ -> ‘Uncategorized’ … is that deliberate?

  • Posted at 22:42, 2009-04-13

    Added Galileo, did the install and then get this…
    An error occurred while collecting items to be installed
    No repository found containing: org.eclipse.pde.visualization.dependency/osgi.bundle/0.5.0.200904131425
    No repository found containing: org.eclipse.pde.visualization.dependency_feature/org.eclipse.update.feature/0.5.0.200904131425

    My versions are:
    Version: 3.4.2
    Build id: M20090211-1700
    Mac OS X 10.5.6

    Thanks in advance.

  • Posted at 23:12, 2009-04-13

    Suggestion: make the dependency visualizer flexible enough to also handle dependencies between plain Java projects (based on JDT model) or even between projects in general (based on resources model).

    In order words, make dependency visualization stand on its own and allow people to extend it to support arbitrary source models, instead of tying it all together.

  • Posted at 08:40, 2009-04-14
  • Posted at 15:04, 2009-04-14

    Hey all…

    I wrote something similar to this (for java project deps) about three years ago. I teach a design patterns class for the Hopkins Masters Degree program, and I was having the students write eclipse plugins for their assignments. This was one of the assignments. (It was GEF-based, not Zest-based)

    I’ve got a version of it at https://javadude.googlecode.com/svn/branches/new-generator/com.javadude.updatesite
    (Source is at https://javadude.googlecode.com as well)

    I have the following function. The added function over just viewing the graph was to help me reduce/simplify dependencies by exporting as many as made sense and removing transitive closures. This really helped my team see the dependency graph much more clearly.

    * Show project deps
    – exported deps are black
    – non-exported deps are pink/dashed
    – transitive (redundant) deps are white (when the constituent parts are exported)

    * Select a dep and press delete to delete it

    * undo/redo

    It’s mostly a quick-n-dirty implementation, but it was very helpful.

    I’d like to allow dependencies to be added by drawing them, just got involved in other projects instead…

  • Posted at 15:06, 2009-04-14

    Oh — I also set it up to generate a .dot file for Graphviz, which makes a right purty picture of the deps

  • Posted at 15:55, 2009-04-14

    Giving thick lines based on the strength of dependency is a wonderful idea.

  • Posted at 16:06, 2009-04-14

    Trying to update from the previous version (0.1.0.20071004) in Eclipse SDK 3.4.0 I get the dreaded useless p2 resolution error:
    “Cannot find a solution satisfying the following requirements Match[requiredCapability: org.eclipse.equinox.p2.iu/org.eclipse.swt/[3.4.0.v3448f,3.4.0.v3448f]].”

    I do have the Ganymede site enabled. Any hints, or should I enter a bug?

  • Posted at 19:01, 2009-04-14

    I have this problem (on mac)
    Cannot complete the request. See the details.
    Cannot find a solution satisfying the following requirements org.eclipse.emf.codegen.ecore.feature.group [2.4.2.v200902171115].
    What’s to be done?

  • Posted at 22:54, 2009-04-14

    Removed Galileo, added Ganymede, now get:

    Cannot complete the request. See the details.
    Cannot find a solution satisfying the following requirements org.eclipse.debug.ui [3.4.0.v20080529-1300].

  • Posted at 23:40, 2009-04-14

    Tried to post before, but it didn’t seem to work…

    We did some work on project/plugin/bundle dependencies, too. As a sample, here’s a graph containing the same nodes as yours: https://stan4j.com/images/stories/misc/plugin-deps.png

  • Posted at 20:34, 2009-04-15

    Chris, I think the update site or feature dependencies are somehow broken.
    I can not install into a clean 3.4.0 or 3.4.2 SDK. Specifically, the “Eclipse forPlug-in/RCP Developers” package. I’ve tried in brand new installs of both 3.4.0 and 3.4.2. Keep getting various p2 resolution errors. The latest trial (3.4.2) seems to point to Zest as the problem, but you never can tell with these stupid p2 messages.

  • Matthew Webber
    Posted at 11:41, 2009-04-16

    I installed without problems into 3.4.2 – the “Eclipse for Plug-in/RCP Developers” package.
    However, when I do “Show View –> Graph Plug-in Dependencies”, I don’t see any graph. What triggers the dependency graph to be drawn? I have a stack of projects in my workspace that are plugins and have a plugin.xml file (etc) in the project. Trying various different perspectives doesn’t do anything. Thanks.

  • Matthew Webber
    Posted at 13:20, 2009-04-16

    “Focus On” is accessible both from right-click, and the toolbar (the icon of a magnifying glass), but no options appear when I select either. The “Search” box at the top of the view is grayed out. It’s obviously not seeing any of my plug-in projects.

    Playing around a bit further, now if I click the “Focus On” icon, I get an error message “Unhandled event loop exception” and a traceback:
    java.lang.NoClassDefFoundError: org/eclipse/pde/internal/ui/dialogs/PluginSelectionDialog
    at org.eclipse.pde.internal.visualization.dependency.views.PluginVisualizationView$5.run(PluginVisualizationView.java:469)
    at org.eclipse.pde.internal.visualization.dependency.views.PluginVisualizationView$6.run(PluginVisualizationView.java:488)
    at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:583)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:500)
    at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1158)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3401)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3033)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2384)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2200)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:490)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1236)

  • Posted at 15:16, 2009-04-16

    Matthew,
    I wonder if this is an incompatibility with Eclipse 3.4; in my 3.4 SDK the class PluginSelectionDialog is in package org.eclipse.pde.internal.ui.wizards, not org.eclipse.pde.internal.ui.dialogs as indicated in the NCDFE above.

  • Posted at 20:01, 2009-04-16

    Bug 272548 (https://bugs.eclipse.org/272548) has been opened to address 3.4.x compatibility.

  • Posted at 16:56, 2009-04-20

    I have it installed in my 3.4 Ganymede, but if I try to install new into my 3.5M6 from https://download.eclipse.org/eclipse/pde/incubator/visualization/site/ nothing happens, nothing to select from, the update site is enabled as available software site, but if I try to install nothing appears
    ekke

  • Posted at 17:07, 2009-04-20

    addon: if you don’t check “group items by category”
    then a selection comes, but it fails:

    Cannot complete the install because one or more required items could not be found.
    Software being installed: org.eclipse.pde.visualization.dependency_feature.feature.group 0.5.0.200904151517
    Missing requirement: org.eclipse.pde.visualization.dependency_feature.feature.group 0.5.0.200904151517 requires ‘org.eclipse.zest.layouts [1.0.0,2.0.0)’ but it could not be found

  • Posted at 17:17, 2009-04-20

    finally got it:
    first ito install ZEST from https://download.eclipse.org/tools/gef/updates/interim/
    then visualization is installable IF you dont check “group items by category”

  • Posted at 20:52, 2009-12-14

    Just tried this looking for a Zest example – really nice & helpful!
    Craziest idea for OSGi visualization that comes to my mind would be to show the bundles+dependencies and services of a running OSGi container. Including some random movements so you can see it’s alive and humming along 🙂