# aws-deadline/deadline-cloud architecture

> Architecture diagram of the GitHub repository aws-deadline/deadline-cloud, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aws-deadline/deadline-cloud
- Repository: https://github.com/aws-deadline/deadline-cloud

## Overview

##### Main Components
- AWS Deadline Cloud Client Core – This is the heart of the library located primarily in the src/deadline directory.
- API Layer – Under src/deadline/client/api, this layer encapsulates interactions with the AWS Deadline Cloud service (e.g., login/logout, querying farms, queues, and job attachments).
- Command Line Interface (CLI) – Found under src/deadline/client/cli. This includes multiple subgroups (e.g., attachment, auth, config, job submission) to handle different CLI commands.
- Graphical User Interface (GUI) – Although optional, parts of the code under src/deadline/client/ui (dialogs, widgets, resources) enable integration of a UI using Qt/PySide.
- Job Bundles and Job Attachments – The project dedicates significant modules to processing job bundles (submissions, asset manifests) and managing job attachments (file upload/download, caching, and AWS S3 interactions found in src/deadline/job_attachments).
- Configuration & Authentication – Components that manage settings (config files, CLI config commands) and AWS authentication, also found in various client modules.
- Utility, Build, and Testing Infrastructure – Scripts in the “scripts” and “pipeline” directories and tests in “test” provide auxiliary build scripts (installer creation, artifact generation) and automated test integrations.

##### Relationships and Data Flows
- Job-attachement logic ties into file operations (including caching & manifest management). Represent this as a side-module that feeds into the job submissions.
- Configuration and authentication management are used by the CLI, API, and UI components; display these as a shared dependency or integrated configuration service.
- The build, installer, and CI/CD (GitHub workflows, pipeline scripts) components can be represented externally as deployment and testing pipelines that integrate with the main codebase.

##### Architectural Patterns and Technologies
- The project follows a modular design: separate modules for API communication (client/api), user interfaces (client/cli and client/ui), and job bundle processing. Emphasize the separation of concerns.
- Use of job bundles also indicates a pattern of encapsulating input templates and asset references into self-contained submission packages.
- The CLI and optional GUI design could be represented as adapter layers on top of the core library.
- Integration with AWS services by mentioning S3-based content-addressable storage for job attachments.

##### Summary
– Begin by isolating the project into as many distinct components as possible (Frontend tools, API, Job Attachments, Configuration, and External AWS integrations).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Core Library Subgraph
    subgraph "AWS Deadline Cloud Client Core"
        CoreLibrary["Core Library"]:::core

        API["API Layer"]:::core
        JobBundles["Job Bundles"]:::core
        JobAttachments["Job Attachments"]:::core
        Config["Configuration & Auth Manager"]:::core

        %% Define relationships within Core Library
        API ---|"depends_on"| Config
        JobBundles ---|"requires"| JobAttachments
        API ---|"integrates_with"| JobBundles
    end

    %% Front End Subgraph
    subgraph "Front End"
        CLI["Command Line Interface (CLI)"]:::ui
        GUI["Graphical User Interface (GUI)"]:::ui

        %% Front end dependencies on configuration
        CLI ---|"uses"| Config
        GUI ---|"uses"| Config

        %% Front end calls into API
        CLI -->|"calls"| API
        GUI -->|"calls"| API
    end

    %% External AWS Service
    AWSService["AWS Deadline Cloud Service"]:::external

    %% API calls external AWS Service
    API -->|"HTTPS"| AWSService

    %% Build & Testing Infrastructure Section
    subgraph "Build & Testing Infrastructure"
        Pipeline["Pipeline Scripts"]:::utility
        Scripts["Utility Scripts"]:::utility
    end

    %% Utility integration with Core Library
    Pipeline -->|"integrates_with"| CoreLibrary
    Scripts -->|"integrates_with"| CoreLibrary

    %% Styling classes
    classDef core fill:#F9E79F,stroke:#B7950B,stroke-width:2px;
    classDef ui fill:#AED6F1,stroke:#1F618D,stroke-width:2px,stroke-dasharray: 5, 5;
    classDef external fill:#D5F5E3,stroke:#28B463,stroke-width:2px,stroke-dasharray: 2, 2;
    classDef utility fill:#FADBD8,stroke:#C0392B,stroke-width:2px,stroke-dasharray: 4, 4;

    %% Click Events
    click CoreLibrary "https://github.com/aws-deadline/deadline-cloud/tree/mainline/src/deadline"
    click API "https://github.com/aws-deadline/deadline-cloud/tree/mainline/src/deadline/client/api"
    click CLI "https://github.com/aws-deadline/deadline-cloud/tree/mainline/src/deadline/client/cli"
    click GUI "https://github.com/aws-deadline/deadline-cloud/tree/mainline/src/deadline/client/ui"
    click JobBundles "https://github.com/aws-deadline/deadline-cloud/tree/mainline/src/deadline/client/job_bundle"
    click JobAttachments "https://github.com/aws-deadline/deadline-cloud/tree/mainline/src/deadline/job_attachments"
    click Config "https://github.com/aws-deadline/deadline-cloud/tree/mainline/src/deadline/client/config"
    click Pipeline "https://github.com/aws-deadline/deadline-cloud/tree/mainline/pipeline/"
    click Scripts "https://github.com/aws-deadline/deadline-cloud/tree/mainline/scripts/"
```
