Skip to content

Home šŸ”

Aaditya Singh edited this page Nov 2, 2024 · 1 revision

Introduction: FOSSology

FOSSology is an open-source software system and toolkit designed for license compliance. As a toolkit, it allows you to perform license, copyright, and export control scans via the command line. As a system, it includes a database and web interface to support a compliance workflow. The license, copyright, and export scanners offer tools to assist in compliance efforts.

Image 1 Image 2

DaemonšŸ§›

Architecture

In this architecture, certain agents are dependent on others to complete operations, creating a sequence of mutually exclusive tasks. However, there are also independent agents that can operate without following this sequential process. To manage these workflows, an orchestrator, called the scheduler, serves as an interface between the database and the agent clusters.

image

The scheduler uses a multi-threaded approach to handle job scheduling and execution. It's structure includes several key components:

  • Main Thread: The control unit of the scheduler, overseeing worker threads, managing resource allocation, and monitoring system health.
  • Job Execution Queue: Manages incoming job requests, enabling efficient processing and prioritization.
  • Worker Threads: Execute tasks from the queue under the direction of the main thread, optimizing resource utilization and performance.
  • Scheduler Logic: Determines job execution order based on priority and resource availability, ensuring orderly processing.
  • Database Interaction: Manages job logs and results for tracking, auditing, and data persistence.
  • Error Handling Mechanism: Handles execution errors to maintain system stability and prevent failures from affecting the entire system.
  • Resource Allocation: Allocates resources across jobs and threads to minimize contention and maximize efficiency.

Limitations

  • Lack of Exception Handling: C lacks built-in support for exception handling, making the code more challenging to read and prone to errors.

image

  • Agent Properties: Each agent has two key propertiesā€”running instances and mutual exclusivityā€”that are not fully accounted for by the scheduling algorithm.

OTS: Solution

Language Concurrency Support Compiled / Interpreted Error Handling Modularity & Distributed Compatibility Performance & Memory Efficiency
Python Yes Interpreted Moderate Moderate Moderate
JavaScript Yes Interpreted Moderate Moderate Moderate
Java Yes Compiled Strong High High
Ruby Yes Interpreted Moderate Moderate Moderate
PHP Yes Compiled Low Low Low
Go Yes Compiled Strong High High
C# Yes Compiled Strong High High
Rust Yes Compiled Strong Moderate High
Kotlin Yes Compiled Strong High High

Go was chosen as the preferred language for implementing the scheduler due to its suitability as a compiled language, offering high performance and optimization at the hardware level. This enables efficient resource management and provides fine-grained control over system resources.

The native compilation feature of Go also enhances cross-platform compatibility, allowing code to be compiled for different host machines without relying on virtualization tools. Given the limitations of the current scheduler, it's evident that maintainability should be a primary focus in the scheduler's design to ensure its long-term usability and adaptability.

Clone this wiki locally