aai-institute / jobq

https://aai-institute.github.io/jobq/latest
Apache License 2.0
2 stars 1 forks source link

Define Architecture and Basic Concepts for Project Mechanism #130

Open leonpawelzik opened 1 month ago

leonpawelzik commented 1 month ago

Define Architecture and Basic Concepts for Project Mechanism

We need to take some time to define the architecture and basic concepts for a "project" mechanism within jobq. This project mechanism should allow jobs/workloads to be part of a project, team, or something similar.

Goals:

High-level design

Projects serve as a grouping mechanism (think: namespace) for workloads in the system.

Goals

As such, they serve the following goals:

Non-Goals

Explicit non-goals include:

Server-side changes

Client-side changes

The client-side user experience drastically changes with the introduction of projects: all operations by default would apply to a single project, to drive home the notion of projects as a semantic namespace.

This means, a few additional operations will be necessary to allow the user to work with projects:

Other modifications:

Entity-Relationship model

The following diagram illustrates the relationship between projects and other entities.

erDiagram
    Project |o..o{ User: ""
    Project {
        string name UK
        string description
        string[] tags
        bool active
    }

    Project }o--|| ClusterQueue: ""
    Project ||..|| Namespace: ""
    Namespace ||--o| LocalQueue: ""
    Namespace ||--o{ Workload: ""

    ClusterQueue ||--o{ LocalQueue: ""

Open Questions

nicholasjng commented 1 month ago

Nice!

Two high-level thoughts that came to my mind:

AdrianoKF commented 1 month ago
  • I also like the abstraction of the queue name, although we have to do this watertight - there should not be a project without a cluster queue (or it should be marked as unable to submit workloads), and the link between projects and queue(s) needs to be tracked somewhere. Having the user debug project<->queue association bugs is probably the worst case DX-wise.

That is very true. Besides having the backend check the queue association whenever submitting a workload, I could see this as a good use case for Kubernetes finalizers, which could prevent queues from being deleted while they are referenced by a project.