-
Notifications
You must be signed in to change notification settings - Fork 0
Home š”
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.
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.
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.
- Lack of Exception Handling: C lacks built-in support for exception handling, making the code more challenging to read and prone to errors.
- Agent Properties: Each agent has two key propertiesārunning instances and mutual exclusivityāthat are not fully accounted for by the scheduling algorithm.
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.