# cookedsashimi/sheeit architecture

> Architecture diagram of the GitHub repository cookedsashimi/sheeit, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cookedsashimi/sheeit
- Repository: https://github.com/cookedsashimi/sheeit

## Overview

##### Main Components Identification
The project consists of several key crates that form distinct components:

- sheeit (core)
- sheeit_computation
- sheeit_parser
- sheeit_storage

##### Key Architectural Features to Highlight

Crucial aspects mentioned in the README:

##### Concurrent Access Model
- How multiple readers access immutable data structures
- Single-writer pattern
- Demonstrate background evaluation process

##### Performance Optimizations
- Immutable data structures
- Column-oriented storage design
- Concurrent evaluation paths

##### Dependency Management
- How formula dependencies are tracked
- Selective re-evaluation process

##### Additional Elements

Supporting elements:

- Version/date information
- Key performance metrics from README
- Notes about experimental status
- Scale indicators for different operation types

##### Detailed view of critical paths (concurrent access, evaluation)

Remember to emphasize the four architectural pillars mentioned in the README:

## Diagram (Mermaid)

```mermaid
graph TB
    %% Main Components
    subgraph Core["Core Components"]
        SheeitCore["Sheeit Core"]:::core
        Computation["Computation Engine"]:::computation
        Parser["Parser Engine"]:::parser
        Storage["Storage Engine"]:::storage
    end

    %% Core Internal Structure
    subgraph CoreInternals["Core Internal Components"]
        DependencyMgmt["Dependency Management"]:::core
        EvalEngine["Evaluation Engine"]:::core
        ModelMgmt["Model Management"]:::core
        StorageInterface["Storage Interface"]:::core
    end

    %% Computation Components
    subgraph ComputationInternals["Computation Components"]
        FunctionReg["Function Registry"]:::computation
        EvalHelpers["Evaluation Helpers"]:::computation
        UtilServices["Utility Services"]:::computation
    end

    %% Parser Components
    subgraph ParserInternals["Parser Components"]
        RawParser["Raw Parser"]:::parser
        Transformer["Transformer"]:::parser
    end

    %% Storage Components
    subgraph StorageInternals["Storage Components"]
        DocMgmt["Document Management"]:::storage
        LocationMgmt["Location Management"]:::storage
        ShiftLogic["Shifting Logic"]:::storage
    end

    %% Testing Components
    subgraph Testing["Testing Components"]
        ConcurrencyTest["Concurrency Testing"]:::test
        MutationTest["Structural Mutation Testing"]:::test
        Benchmarks["Benchmarking"]:::test
    end

    %% Relationships
    SheeitCore --> Computation
    SheeitCore --> Parser
    SheeitCore --> Storage
    
    SheeitCore --> DependencyMgmt
    SheeitCore --> EvalEngine
    SheeitCore --> ModelMgmt
    SheeitCore --> StorageInterface

    Computation --> FunctionReg
    Computation --> EvalHelpers
    Computation --> UtilServices

    Parser --> RawParser
    Parser --> Transformer

    Storage --> DocMgmt
    Storage --> LocationMgmt
    Storage --> ShiftLogic

    %% Click Events
    click SheeitCore "https://github.com/CookedSashimi/sheeit/tree/master/sheeit"
    click Computation "https://github.com/CookedSashimi/sheeit/tree/master/sheeit_computation"
    click Parser "https://github.com/CookedSashimi/sheeit/tree/master/sheeit_parser"
    click Storage "https://github.com/CookedSashimi/sheeit/tree/master/sheeit_storage"
    
    click DependencyMgmt "https://github.com/CookedSashimi/sheeit/tree/master/sheeit/src/dependency"
    click EvalEngine "https://github.com/CookedSashimi/sheeit/tree/master/sheeit/src/evaluation"
    click ModelMgmt "https://github.com/CookedSashimi/sheeit/blob/master/sheeit/src/model.rs"
    click StorageInterface "https://github.com/CookedSashimi/sheeit/blob/master/sheeit/src/storage.rs"
    
    click FunctionReg "https://github.com/CookedSashimi/sheeit/tree/master/sheeit_computation/src/functions"
    click EvalHelpers "https://github.com/CookedSashimi/sheeit/tree/master/sheeit_computation/src/functions/eval_helper"
    click UtilServices "https://github.com/CookedSashimi/sheeit/tree/master/sheeit_computation/src/util"
    
    click RawParser "https://github.com/CookedSashimi/sheeit/blob/master/sheeit_parser/src/raw_parser.rs"
    click Transformer "https://github.com/CookedSashimi/sheeit/blob/master/sheeit_parser/src/transformer.rs"
    
    click DocMgmt "https://github.com/CookedSashimi/sheeit/blob/master/sheeit_storage/src/document.rs"
    click LocationMgmt "https://github.com/CookedSashimi/sheeit/tree/master/sheeit_storage/src/location"
    click ShiftLogic "https://github.com/CookedSashimi/sheeit/blob/master/sheeit_storage/src/shifter.rs"
    
    click ConcurrencyTest "https://github.com/CookedSashimi/sheeit/blob/master/sheeit/tests/concurrency_test.rs"
    click MutationTest "https://github.com/CookedSashimi/sheeit/blob/master/sheeit/tests/structural_mutation_consistency_test.rs"
    click Benchmarks "https://github.com/CookedSashimi/sheeit/tree/master/sheeit/benches"

    %% Styles
    classDef core fill:#3498db,stroke:#2980b9,color:white
    classDef computation fill:#2ecc71,stroke:#27ae60,color:white
    classDef parser fill:#f1c40f,stroke:#f39c12,color:black
    classDef storage fill:#9b59b6,stroke:#8e44ad,color:white
    classDef test fill:#e74c3c,stroke:#c0392b,color:white

    %% Legend
    subgraph Legend
        CoreLegend["Core Components"]:::core
        CompLegend["Computation Components"]:::computation
        ParserLegend["Parser Components"]:::parser
        StorageLegend["Storage Components"]:::storage
        TestLegend["Testing Components"]:::test
    end
```
