Eclipse Yoxos Services Downloads Blogs About
Home > Blogs >

on Apr 13th, 2009Visualizing 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 300x191 Visualizing OSGi Systems

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.

Related posts:

28 Responses to “Visualizing OSGi Systems”

  1. Brindy says:

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

  2. @Brindy, at the moment, yes since I don’t have an official place to put the code ;)

    We’re actually adding some new support in PDE to help categorize content in p2 repositories.

  3. Brindy says:

    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.

  4. Ah, if you’re using 3.4, you should use the Ganymede repository:
    http://download.eclipse.org/releases/ganymede/

    I’m working off the bleeding edge currently (3.5)

  5. 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.

  6. Rafael, cool idea. Care to file a bug to help track your enhancement request?

  7. 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 http://javadude.googlecode.com/svn/branches/new-generator/com.javadude.updatesite
    (Source is at http://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…

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

  9. Madhu says:

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

  10. Eric Rizzo says:

    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?

  11. Eric, I would enter a bug against p2, not sure what is causing that. One option would be to potentially remove the feature and try to point to the new site.

  12. 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?

  13. Maarten, which version of Eclipse are you using?

  14. Brindy says:

    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].

  15. 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: http://stan4j.com/images/stories/misc/plugin-deps.png

  16. Brindy, I think there’s an issue with your install. I’ve tested on both 3.4 and 3.5 environments and things work.

  17. Eric Rizzo says:

    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.

  18. Eric, I would try again it a bit. I just published a new site that contains the fix so people in 3.4 can install the visualization tool. The feature and bundle level dependencies were a bit too strict, we made the more lax.

  19. Matthew Webber says:

    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.

  20. Matthew, there should be an option to “Focus On…” in the toolbar area of the view or if you right click and select “Focus On…”

  21. Matthew Webber says:

    “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)

  22. Eric Rizzo says:

    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.

  23. Eric Rizzo says:

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

  24. ekke says:

    I have it installed in my 3.4 Ganymede, but if I try to install new into my 3.5M6 from http://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

  25. ekke says:

    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

  26. ekke says:

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

  27. Ralf Ebert says:

    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 :)

© EclipseSource 2008 - 2011