# xlinkout/sol-fss architecture

> Architecture diagram of the GitHub repository xlinkout/sol-fss, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/xlinkout/sol-fss
- Repository: https://github.com/xlinkout/sol-fss

## Overview

##### Main Components Identification

a) Client Component (/src/client)
- API interface layer
- Request queue management
- Client core functionality

b) Server Component (/src/server)
- Hash table implementation (icl_hash)
- Storage management
- Queue management
- Configuration handling

c) Core Component (/src/core)
- Shared utilities
- Linked list implementation
- Read-write lock mechanism

**┌─────────────────────────────────────────────────┐**
- File System                     │
- ┘
- ▲

**┌─────────────────────────────────────────────────┐**
- Server                        │
- ┬──────────────────┬────────────┤
- Hash Table    │     Storage      │   Queue    │
- ┴──────────────────┴────────────┘
- ▲

**┌─────────────────────────────────────────────────┐**
- Client                        │
- ┬──────────────────┬────────────┤
- API        │  Request Queue   │    Core    │
- ┴──────────────────┴────────────┘

##### Component Details

- Blue rectangles for main components (Client, Server)
- Green rectangles for storage-related components
- Yellow diamonds for queue-related components
- Gray rectangles for utility/core components

##### Additional Elements

Important elements:
- Configuration file input (config-example.txt) to Server
- Core utilities shared between Client and Server
- RWLock mechanism for concurrent access
- Hash table for efficient storage management

##### Technical Details

Annotations for:
- Socket communication path
- Configuration file path
- Shared core utilities
- Queue management system
- Storage replacement algorithm (mentioned in test2)

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph FileSystem
        FS[File System Storage]
    end

    subgraph Server
        SRV["Server Core"]:::server
        HT["Hash Table"]:::server
        SM["Storage Manager"]:::storage
        QM["Queue Manager"]:::queue
        CF["Configuration"]:::config
    end

    subgraph Client
        CL["Client Core"]:::client
        API["API Interface"]:::client
        RQ["Request Queue"]:::queue
    end

    subgraph Core
        CU["Core Utilities"]:::core
        LL["Linked List"]:::core
        RW["RW Lock"]:::core
        CN["Constants"]:::core
    end

    %% Connections
    CL --> |Socket| SRV
    API --> CL
    CL --> RQ
    RQ --> CL
    
    SRV --> HT
    SRV --> SM
    SRV --> QM
    CF --> SRV
    
    SM --> FS
    
    %% Core connections
    CU --- CL
    CU --- SRV
    LL --- HT
    LL --- QM
    RW --- SM
    CN --- API
    CN --- SRV

    %% Click events
    click CL "https://github.com/xlinkout/sol-fss/blob/master/src/client/client.c"
    click API "https://github.com/xlinkout/sol-fss/blob/master/src/client/API.c"
    click RQ "https://github.com/xlinkout/sol-fss/blob/master/src/client/request_queue.c"
    click HT "https://github.com/xlinkout/sol-fss/blob/master/src/server/icl_hash.c"
    click SM "https://github.com/xlinkout/sol-fss/blob/master/src/server/storage.c"
    click QM "https://github.com/xlinkout/sol-fss/blob/master/src/server/queue.c"
    click CF "https://github.com/xlinkout/sol-fss/blob/master/src/server/includes/config.h"
    click CU "https://github.com/xlinkout/sol-fss/blob/master/src/core/utils.c"
    click LL "https://github.com/xlinkout/sol-fss/blob/master/src/core/linkedlist.c"
    click RW "https://github.com/xlinkout/sol-fss/blob/master/src/core/rwlock.c"
    click CN "https://github.com/xlinkout/sol-fss/blob/master/src/core/includes/constants.h"

    %% Styles
    classDef server fill:#2196F3,stroke:#1565C0,color:white
    classDef client fill:#4CAF50,stroke:#2E7D32,color:white
    classDef storage fill:#FFC107,stroke:#FFA000,color:black
    classDef queue fill:#FF5722,stroke:#E64A19,color:white
    classDef core fill:#9C27B0,stroke:#7B1FA2,color:white
    classDef config fill:#607D8B,stroke:#455A64,color:white

    %% Legend
    subgraph Legend
        L1["Server Component"]:::server
        L2["Client Component"]:::client
        L3["Storage Component"]:::storage
        L4["Queue Component"]:::queue
        L5["Core Component"]:::core
        L6["Configuration"]:::config
    end
```
