Skip to content

Developer Documentation

Gabriel G edited this page Feb 7, 2024 · 5 revisions

Tool Introduction

An introduction to the tool, outlining it’s intended purpose, and the problem it aims to solve


Tool Name:

  • prophet-evolution

Purpose:

  • Prophet-evolution is a natural extension of the prophet tool with the purpose of preventing regressive changes to microservice architectures. This tool is currently focused on mapping microservice dependencies in Java Spring Boot projects and preventing changes to the microservice network that might degradate functionality considering these dependencies.

Problem:

  • Microservices oftentimes depend on one another via programmatic calls from one service to another. More often than not changing one microservice will result in cascading effects on dependents.

Tool Concept:

Prerequisites

Requirements and dependencies necessary for using the project or library


  • Maven 3.6+
  • Java 11+

Installation

Instructions for setting up the project locally


  1. Clone and navigate to the project directory

    git clone https://github.com/cloudhubs/prophet-evolution.git 
    && cd prophet-evolution
    
  2. Clean target directory and build Maven project

    mvn clean install -DskipTests

Usage

Instructions and examples illustrating how to utilize the project's features and functionalities


Run the JAR located in your target folder

  • Defaults to ‘./repos’ for repository locations, and ‘./results’ for output

    java -jar target/semantics-1.0-SNAPSHOT-runner.jar 'https://github.com/<owner>/<repo1>.git,https://github.com/<owner>/<repo2>.git,...,https://github.com/<owner>/<repoN>.git'
    
  • Specify a directory for repos and results

    java -jar target/semantics-1.0-SNAPSHOT-runner.jar 'your-repo-dest-folder/' 'https://github.com/<owner>/<repo1>.git,https://github.com/<owner>/<repo2>.git,...,https://github.com/<owner>/<repoN>.git' 'your-results-folder/'
    

Code Flow

A high level flow of code execution within the project


  1. initCache()
    1. Initializes msCache static class that is an object for caching data about the structure of micro-services.
  2. initAndValidatePaths(args)
    1. Initializes and validates paths for cloneRemotes.
  3. cloneRemotes(clonePath, repoUrls)
    1. Clones the repositories.
  4. preProcess()
    1. Core logic for parsing Java code and creating flows.
  5. persistCache()
    1. Saves cache to local files.

Core Libraries

An overview of the essential libraries or modules constituting the backbone of the project


JavaParser:

Quarkus:

  • Description:
    • Quarkus is a full-stack, Kubernetes-native Java framework made for Java virtual machines (JVMs) and native compilation, optimizing Java specifically for containers and enabling it to become an effective platform for serverless, cloud, and Kubernetes environments.
  • Usage:
    • N/A
  • Configuration:
    • N/A
  • Resources

Clone this wiki locally