Giter VIP home page Giter VIP logo

osgi-deps-graph's Introduction

Introduction

Quick-and-dirty mechanism to produce a dependency graph for a set of bundles in an OSGi environment.

The graph is output in graphml, and includes the following features:

  1. Bundles,

  2. OSGi services registered by each bundle. The bundle and associated services are enclosed together,

  3. Bundle package dependency relationships i.e. if bundle A imports any packages in bundle B, a "imports" directed edge is drawn from A to B.

  4. Bundle service relationships i.e. if bundle A uses a service S, a "uses" directed edge (shown in a different color) is drawn from A to S.

It supports specifying regex-based includes and excludes for bundles and services. It also supports stripping text from the beginning of bundle and service labels in order to remove repetitive information and make the graph neater. It also supports ignoring all bundles below a given start level.

The code is loosely based on a similar project maven-graph-plugin that outputs a graphml graph based on a project's maven dependencies. See https://github.com/janssk1/maven-graph-plugin.

Usage

To use, simply install the bundle into your OSGi environment and start it. It will produce the graphml output in the current working directory. Import the graphml into a supported editor (such as yEd), and format the graph as desired. I find a hierarchical view generally works well.

The bundle can be immediately uninstalled after it generates the graph.

Future Improvements

  1. Currently the includes/excludes/strips are entered directly into the OsgiDepsActivator. These could be obtained from the OSGi ConfigAdmin.

  2. The code in OsgiGraphBuilder could definitely use some love/refactoring. The tests should be improved before this refactoring is done.

  3. Add the ability to display individual package import/exports in the graph. This will make the graph VERY large but may be useful in some cases.

  4. Add more information to the graph, as needed. Use more color coding.

osgi-deps-graph's People

Contributors

rocketraman avatar

Watchers

James Cloos avatar Andras Szerdahelyi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.