• Stars
    star
    133
  • Rank 272,600 (Top 6 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created over 4 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Jarviz is dependency analysis and visualization tool designed for Java applications

Jarviz

Jarviz Build Status

Interdependencies between software modules are very difficult problems to solve. When your organization grows, these interdependencies multiply, potentially leading to low-cohesion and high-coupling among software modules. This is where Jarviz can help to understand these intricate dependencies down to the field level.

Jarviz is a dependency analysis tool for Java applications. Since non-private methods in Java classes can be accessed by other classes, method calls can be intertwined creating manifold couplings among each other. Jarviz deeply analyzes Java bytecode to reveal these couplings in a user-friendly format. It scans binary artifacts using a custom classloader and generates a complete graph of dependency couplings between methods across multiple artifacts. Jarviz consists of three modules: a Java library to scan dependencies in binary artifacts, a Node.js module to generate a visual graph and a command-line-interface to run it easility in a shell.

ℹ️ Learn more about Jarviz on the Expedia Group Technology blog

Jarviz consists of 3 components:

Jarviz Library (jarviz-lib)

This Java library scans the Java bytecode of binary artifacts using a custom classloader and generates the dependency coupling data as a JSON Lines (.jsonl) file. Currently only JAR and WAR artifact formats are supported. To find the dependency couplings, Jarviz analyzes the opcodes using ASM bytecode analysis framework.

Jarviz Graph Tool (jarviz-graph)

Jarviz Graph is a Node application to read the dependency coupling data and generate the dependency graph as an HTML file. The dependency coupling data, provided as a JSON Lines (.jsonl) input file, is generated from the Jarviz Java library.

Jarviz CLI Tool (jarviz-cli)

Jarviz CLI is a command-line tool designed for *nix systems to perform dependency analysis for Java applications. Internally it uses both the Jarviz Java library and Jarviz graph tool to provide a useful command-line interface to the user.

Quick Start

  • Prerequisite: Verify that java, maven, node and npm are installed in the system.
    • Java and Maven are required to download Java libraries.
    • Node and NPM are required to download Node modules.
  • Checkout the project from GitHub and change the directory to jarviz-cli module.
  • Run ./jarviz graph -f samples/filter.json -a samples/artifacts.json
  • Open the generated HTML file in the browser.

Samples

Sample Dependency Graph

Sample Coupling Data

{
  "appSetName": "FooPortfolio",
  "applicationName": "MyApp",
  "artifactFileName": "foo-product-1.2.1.jar",
  "artifactId": "foo-product",
  "artifactGroup": "com.foo.bar",
  "artifactVersion": "1.2.1",
  "sourceClass": "foo.bar.MyClass",
  "sourceMethod": "doFirstTask",
  "targetClass": "foo.bar.YourClass",
  "targetMethod": "getProductId"
}
...

Dependency Couplings

What is a coupling?

A coupling is a dependency between two methods. Let's say method hello of class com.xyz.Alpha calls the method world of class com.xyz.Beta. Then there is a dependency coupling between those two methods and Jarviz represents that coupling this way:

Source Class Source Method Target Class Target Method
com.xyz.Alpha hello com.xyz.Beta world

Why field level dependencies?

There are many tools capable of generating dependency graphs either down to the class or library level. This is useful information to have when you are supporting an application. It is also very important to know the dependencies down to the field level access. Jarviz provides a way to generate dependency coupling data down to field level (assuming that the internal state of the fields are accessed via method calls). Jarviz will analyze deeply inside the methods, including lambda functions to extract the dependency data.

Sample Couplings

In the Java source code shown below, the class com.mycompany.MySource calls methods from two classes namely com.xyz.foo.Alpha and com.xyz.bar.Beta.

package com.xyz.foo;
public class Alpha {

    private final int val;

    public Alpha(final int val) {
        this.val = val;
    }

    public int getVal() {
        return val;
    }
}
package com.xyz.bar;
public class Beta {

    public int getBetaIntVal(final String value) {
        return Integer.parseInt(value);
    }

    public long getBetaLongVal(final String value) {
        return Long.parseLong(value);
    }

    public Alpha getBetaAlphaVal(final String value) {
        return new Alpha(Integer.parseInt(value));
    }
}
package com.mycompany;
public class MySource {

    private static int MY_STATIC_VAR = new Alpha(1).getVal();

    private int myInstanceAlphaValue = new Alpha(2).getVal();

    public int callBeta1() {
        return new Beta().getBetaIntVal("10");
    }

    public int callBeta2() {
        return new Beta().getBetaIntVal("20");
    }

    public int callAlpha1() {
        return new Alpha(10).getVal();
    }

    public int callAlphaBeta() {
        return new Beta().getBetaAlphaVal("30").getVal();
    }

    public long callLambda(final List<String> values) {
        return values.stream()
                     .filter(a -> !a.isEmpty())
                     .map(a -> new Beta().getBetaLongVal(a))
                     .count();
    }
}

If com.mycompany.MySource class is analyzed with Jarviz for the usage of any classes in the com.xyz package, it will find the following dependency couplings:

Source Class Source Method Target Class Target Method
com.mycompany.MySource <clinit> com.xyz.foo.Alpha <init>
com.mycompany.MySource <clinit> com.xyz.foo.Alpha getVal
com.mycompany.MySource <init> com.xyz.foo.Alpha <init>
com.mycompany.MySource <init> com.xyz.foo.Alpha getVal
com.mycompany.MySource callBeta1 com.xyz.bar.Beta <init>
com.mycompany.MySource callBeta1 com.xyz.bar.Beta getBetaIntVal
com.mycompany.MySource callBeta2 com.xyz.bar.Beta <init>
com.mycompany.MySource callBeta2 com.xyz.bar.Beta getBetaIntVal
com.mycompany.MySource callAlpha1 com.xyz.foo.Alpha <init>
com.mycompany.MySource callAlpha1 com.xyz.foo.Alpha getVal
com.mycompany.MySource callAlphaBeta com.xyz.foo.Alpha getVal
com.mycompany.MySource callAlphaBeta com.xyz.bar.Beta <init>
com.mycompany.MySource callAlphaBeta com.xyz.bar.Beta getBetaAlphaVal
com.mycompany.MySource lambda$callLambda$1 com.xyz.bar.Beta <init>
com.mycompany.MySource lambda$callLambda$1 com.xyz.bar.Beta getBetaLongVal

See the full sample file: sample_jarviz_result.jsonl

Development

Initial Setup

Clone the Jarviz project locally from the GitHub repo, and verify it builds properly.

Jarviz Library

$ mvn clean install

Jarviz Graph Tool

$ npm install
$ npm run build:example

Jarviz CLI Tool

$ ./jarviz

How to Contribute

If you are enthusiastic about contributing to Jarviz development, send a pull request. Please follow the guidance in CONTRIBUTING.md.

Contact

This project is an open source software by Expedia Group and maintained by ExpediaGroup/teams/jarviz-committers. For support discussions please join Jarviz Google group.

Legal

This project is available under the Apache 2.0 License.

Copyright 2019 Expedia, Inc.

More Repositories

1

graphql-kotlin

Libraries for running GraphQL in Kotlin
Kotlin
1,732
star
2

cyclotron

A web platform for constructing dashboards.
CoffeeScript
1,560
star
3

waggle-dance

Hive federation service. Enables disparate tables to be concurrently accessed across multiple Hive deployments.
Java
266
star
4

styx

Programmable, asynchronous, event-based reverse proxy for JVM.
Java
253
star
5

adaptive-alerting

Anomaly detection for streaming time series, featuring automated model selection.
Java
202
star
6

jenkins-spock

Unit-test Jenkins pipeline code with Spock
Groovy
187
star
7

bull

BULL - Bean Utils Light Library
Java
185
star
8

c3vis

Visualize the resource utilisation of Amazon ECS clusters
JavaScript
165
star
9

stream-registry

Stream Discovery and Stream Orchestration
Java
122
star
10

flyte

Flyte binds together the tools you use into easily defined, automated workflows
Go
88
star
11

circus-train

Circus Train is a dataset replication tool that copies Hive tables between clusters and clouds.
Java
86
star
12

kubernetes-sidecar-injector

Kuberbetes mutating webhook that injects a sidecar container to a pod
Go
76
star
13

expediagroup.github.io

The Expedia Group Open Source portal, a website for discovering EG open source projects.
JavaScript
64
star
14

mittens

Warm-up routine for http applications over REST and gRPC
Go
64
star
15

avro-compatibility

A user friendly API for checking for and reporting on Avro schema incompatibilities.
Java
59
star
16

graphql-component

Composeable graphql components
JavaScript
55
star
17

heat

Heat Test Framework
Java
45
star
18

beekeeper

Service for automatically managing and cleaning up unreferenced data
Java
45
star
19

pitchfork

Convert tracing data between Zipkin and Haystack formats
Java
44
star
20

container-startup-autoscaler

A Kubernetes controller that modifies the CPU and/or memory resources of containers depending on whether they're starting up, according to the startup/post-startup settings you supply.
Go
37
star
21

apiary

Apiary provides modules which can be combined to create a federated cloud data lake
36
star
22

github-helpers

A collection of Github Actions that simplify and standardize common CI/CD workflow tasks.
TypeScript
35
star
23

pino-rotating-file

[DEPRECATED] A pino log transport for splitting logs into separate, automatically rotating files.
JavaScript
33
star
24

javro

JSON Schema to Avro Mapper
JavaScript
29
star
25

rhapsody

Reactive Streams framework with support for at-least-once processing
Java
29
star
26

vsync

Sync Secrets between HashiCorp vaults
Go
29
star
27

kube-graffiti

Paint your kubernetes objects with 'mutating' webhooks
Go
26
star
28

hiveberg

Demonstration of a Hive Input Format for Iceberg
Java
26
star
29

plunger

A unit testing framework for the Cascading data processing platform.
Java
25
star
30

beeju

JUnit integration for testing the Apache Hive Metastore and HiveServer2 Thrift APIs
Java
24
star
31

react-event-tracking

React shared context utilities for analytic event tracking.
JavaScript
23
star
32

expediagroup.github.io-old

Expedia Group OSS Portal
HTML
22
star
33

shunting-yard

Shunting Yard is a real-time data replication tool that copies data between Hive Metastores.
Java
20
star
34

jasvorno

A library for strong, schema based conversion between 'natural' JSON documents and Avro
Java
18
star
35

apiary-data-lake

Terraform scripts for deploying Apiary Data Lake
HCL
18
star
36

datasqueeze

Hadoop utility to compact small files
Java
18
star
37

hello-streams

hello-streams :: Introducing the stream-first mindset
Java
17
star
38

map-maker

Map maker is a command line tool and library for easily generating maps from structured data.
Jupyter Notebook
15
star
39

spinnaker-pipeline-trigger

Pipeline trigger for Spinnaker utilizing SNS
TypeScript
15
star
40

corc

An ORC File Scheme for the Cascading data processing platform.
Java
14
star
41

steerage

[DEPRECATED] Hapi server configuration and composition using confidence, topo, and shortstop.
JavaScript
14
star
42

fpsmeter

Optimized javascript utility for measuring frames per second in a browser environment. Useful for observing end-user client run-time performance without adversly impacting performance.
JavaScript
14
star
43

insights-explorer

Insights Explorer is a tool to catalogue and present analytical & research work.
TypeScript
13
star
44

molten

Molten is an opinionated library providing reactive tooling to simplify building production-ready integration solutions using Reactor.
Java
13
star
45

service-client

[DEPRECATED] A general purpose http client built with extensibility in mind. It also features lifecycle hooks, dynamic hostname resolution, and circuit breaking.
JavaScript
12
star
46

github-webhook-proxy

Request forwarder for GitHub webhooks from github.com to internal enterprise destinations, designed for use in Github Enterprise Cloud.
TypeScript
10
star
47

apiary-extensions

Extensions available for use in Apiary
Java
10
star
48

drone-fly

A service which allows Hive Metastore Listeners to be deployed outside of the Hive Metastore Service
Java
10
star
49

secrets-injector

Go
9
star
50

neaps

a simulator to forecast the end of agile project basing on historical data and using montecarlo simulations
JavaScript
9
star
51

cypress-codegen

A Cypress plugin which automatically adds and enables IntelliSense for your custom commands!
TypeScript
9
star
52

circus-train-bigquery

Circus Train plugin which replicates BigQuery tables to Hive
Java
8
star
53

quibble

Data validator tool to allows testers, developers and analysts to define and execute test-cases involving data. Quibble is able to compare data from one or more data platforms, assert on the outcome and produce generated report output on any anomalies in data.
Java
8
star
54

dr-shadow

Dr Shadow is a library developed by Egencia (part of Expedia Group) that enables shadow traffic (ie. mirroring). It is a valuable tool for having good hygiene for service operations (ie. testing, resiliency, performance).
Java
6
star
55

flyte-client

A Go library designed to make the writing of flyte packs simple
Go
6
star
56

catalyst-server

[DEPRECATED] Configuration and composition management for Hapi.js applications.
JavaScript
6
star
57

comparadise

A visual comparison tool for reviewing visual changes on frontend PRs.
TypeScript
6
star
58

hello-cloud

hello world example for Multicloud applications
HTML
6
star
59

two-tower-lodging-candidate-generation

Python
6
star
60

aws-adfs-login

Library for user login (client side) using AWS ADFS (Active Directory Federation Service)
Go
5
star
61

apiary-federation

Terraform scripts for deploying Apiary Data Lake federation
HCL
5
star
62

apiary-metastore-docker

Docker image for Apiary Data Lake metastore
Shell
5
star
63

apiary-ranger-docker

Docker image for Apiary Data Lake Ranger
Shell
4
star
64

flyte-jira

An Atlassian Jira integration pack for Flyte
Go
4
star
65

pkdd22-challenge-expediagroup

Expedia Group ECML/PKDD 2022 challenge
Python
4
star
66

kafka-consumer-sns-sqs

Kafka Consumer for AWS SNS/SQS
Python
4
star
67

catalyst-render

[DEPRECATED] A hapi js plugin that works with catalyst-server to provide server-side rendering with react inside a handlebars template
JavaScript
4
star
68

nimbuild

A suite of build tools that enable ultra fast web bundling at run-time.
JavaScript
4
star
69

circus-train-datasqueeze

Circus Train ⨉ DataSqueeze
Java
4
star
70

data-highway

Java
4
star
71

expediagroup-python-sdk

Open World SDK for Python
Python
4
star
72

flyte-bamboo

An Atlassian Bamboo integration pack for Flyte
Go
4
star
73

apiary-lifecycle

Terraform deployment scripts for Beekeeper
HCL
4
star
74

housekeeping

Common functionality for managing and cleaning up orphaned paths
Java
3
star
75

icf

Independent connectivity forum API and tools
3
star
76

expediagroup-java-sdk

Expedia Group Java SDK Home
Kotlin
3
star
77

hcommon-hive-metastore

General purpose libraries for interacting with the HiveMetaStore
Java
3
star
78

flyte-shell

Run shell scripts in your Flyte flows with this integration pack
Go
3
star
79

apiary-authorization

Authorization for Apiary Data Lake
HCL
3
star
80

package-json-validator

A Github Action for validating package.json conventions.
TypeScript
3
star
81

flyte-serf

A Hashicorp Serf integration pack for Flyte
Go
3
star
82

network-plugin

The Network plugin allows developers to proxy requests and view the request and responses in IntelliJ.
Kotlin
3
star
83

rapid-java-sdk

ExpediaGroup - Rapid Java SDK Home
Kotlin
3
star
84

a11y-tools

Client side A11y tools for trapping and tracking user focus.
JavaScript
2
star
85

flyte-ldap

An LDAP integration pack for Flyte
Go
2
star
86

new-project

This repository contains a template you can use to seed a repository for a new open source project.
2
star
87

expediagroup-nodejs-sdk

Expedia Group SDK for Node.js
TypeScript
2
star
88

apiary-drone-fly

Terraform scripts for deploying Drone Fly
HCL
2
star
89

expediagroup-java-sdk-parent

2
star
90

parsec

Parsec is a data processing engine for interpreted queries.
Clojure
2
star
91

dropwizard-resilience4j-bundle

Integration of Resilience4J into Dropwizard
Java
2
star
92

renovate-config-catalyst

[DEPRECATED] Renovate shared configuration for catalyst projects
2
star
93

flyte-slack

A Slack integration pack for Flyte
Go
2
star
94

openworld-sdk-java-generators

Mustache
2
star
95

overwhelm

Operator for complex application deployment on Kubernetes
Go
2
star
96

flyte-graphite

A graphite integration pack for Flyte
Go
2
star
97

graphql-kotlin-codegen

A graphql-codegen plugin that enables type generation for GraphQL Kotlin services, promoting schema-first development.
TypeScript
2
star
98

helm-charts

Expedia Group Helm Charts
Mustache
1
star
99

determination

[DEPRECATED] Configuration resolver using confidence and shortstop.
JavaScript
1
star
100

dr-squid

Dr Squid is a downstream services and databases mocking tool primarily used for chaos testing and gathering performance metrics for Java Spring service
Java
1
star