# eclipse-iceoryx/iceoryx architecture

> Architecture diagram of the GitHub repository eclipse-iceoryx/iceoryx, 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/eclipse-iceoryx/iceoryx
- Repository: https://github.com/eclipse-iceoryx/iceoryx

## Overview

##### Main Components and Architecture

a) Core Components:
- iceoryx_hoofs: Base library with platform abstractions and utilities
- iceoryx_posh: Main middleware implementation
- iceoryx_binding_c: C language binding
- RouDi (Runtime for Discovery): Central routing daemon

b) Communication Layer:
- Shared Memory Management
- Publisher/Subscriber Infrastructure
- Client/Server Communication
- Memory Management (mepoo - Memory Pool)

**[Application Layer]**

**[API Layer]**

**[Communication Layer]**

**[Platform Abstraction Layer]**

**[Operating System Layer]**

##### Specific Implementation Details

Specialized components:
- Memory Pool Management
- Port Manager
- Service Registry
- Introspection Tools

##### Cross-Platform Support

Platform-specific adaptations for:
- Linux
- QNX
- Windows
- macOS
- FreeBSD

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles
    classDef core fill:#2374ab
    classDef api fill:#48a9a6
    classDef comm fill:#4ad66d
    classDef platform fill:#d4b483
    classDef os fill:#c1666b
    classDef testing fill:#e4d6a7

    %% Application Layer
    subgraph AppLayer["Application Layer"]
        App[Applications]
        IntroTools[Introspection Tools]:::core
    end
    click IntroTools "https://github.com/eclipse-iceoryx/iceoryx/tree/main/tools/introspection/"

    %% API Layer
    subgraph APILayer["API Layer"]
        IceoryxBindingC[iceoryx_binding_c]:::api
        ServiceDiscovery[Service Discovery]:::api
        Gateway[Gateway Components]:::api
    end
    click IceoryxBindingC "https://github.com/eclipse-iceoryx/iceoryx/tree/main/iceoryx_binding_c/"
    click ServiceDiscovery "https://github.com/eclipse-iceoryx/iceoryx/blob/main/iceoryx_posh/include/iceoryx_posh/runtime/service_discovery.hpp"
    click Gateway "https://github.com/eclipse-iceoryx/iceoryx/tree/main/iceoryx_posh/include/iceoryx_posh/gateway/"

    %% Communication Layer
    subgraph CommLayer["Communication Layer"]
        IceoryxPosh[iceoryx_posh]:::core
        RouDi[RouDi Daemon]:::core
        PubSub[Publisher/Subscriber]:::comm
        ClientServer[Client/Server]:::comm
        PortMgmt[Port Management]:::comm
    end
    click IceoryxPosh "https://github.com/eclipse-iceoryx/iceoryx/tree/main/iceoryx_posh/"
    click RouDi "https://github.com/eclipse-iceoryx/iceoryx/tree/main/iceoryx_posh/source/roudi/"
    click PubSub "https://github.com/eclipse-iceoryx/iceoryx/tree/main/iceoryx_posh/include/iceoryx_posh/popo/"
    click ClientServer "https://github.com/eclipse-iceoryx/iceoryx/blob/main/iceoryx_posh/include/iceoryx_posh/popo/client.hpp"
    click PortMgmt "https://github.com/eclipse-iceoryx/iceoryx/blob/main/iceoryx_posh/include/iceoryx_posh/roudi/port_pool.hpp"

    %% Memory Management Layer
    subgraph MemLayer["Memory Management Layer"]
        SharedMem[Shared Memory]:::comm
        Mepoo[Memory Pool]:::comm
    end
    click SharedMem "https://github.com/eclipse-iceoryx/iceoryx/tree/main/iceoryx_posh/include/iceoryx_posh/mepoo/"
    click Mepoo "https://github.com/eclipse-iceoryx/iceoryx/tree/main/iceoryx_posh/source/mepoo/"

    %% Platform Abstraction Layer
    subgraph PlatformLayer["Platform Abstraction Layer"]
        IceoryxHoofs[iceoryx_hoofs]:::core
    end
    click IceoryxHoofs "https://github.com/eclipse-iceoryx/iceoryx/tree/main/iceoryx_hoofs/"

    %% Operating System Layer
    subgraph OSLayer["Operating System Layer"]
        Linux[Linux]:::os
        QNX[QNX]:::os
        Windows[Windows]:::os
        MacOS[macOS]:::os
        FreeBSD[FreeBSD]:::os
    end
    click Linux "https://github.com/eclipse-iceoryx/iceoryx/tree/main/iceoryx_platform/linux/"
    click QNX "https://github.com/eclipse-iceoryx/iceoryx/tree/main/iceoryx_platform/qnx/"
    click Windows "https://github.com/eclipse-iceoryx/iceoryx/tree/main/iceoryx_platform/win/"
    click MacOS "https://github.com/eclipse-iceoryx/iceoryx/tree/main/iceoryx_platform/mac/"
    click FreeBSD "https://github.com/eclipse-iceoryx/iceoryx/tree/main/iceoryx_platform/unix/"

    %% Testing Components
    subgraph TestLayer["Testing Infrastructure"]
        IntegrationTests[Integration Tests]:::testing
        ModuleTests[Module Tests]:::testing
    end
    click IntegrationTests "https://github.com/eclipse-iceoryx/iceoryx/tree/main/iceoryx_posh/test/integrationtests/"
    click ModuleTests "https://github.com/eclipse-iceoryx/iceoryx/tree/main/iceoryx_posh/test/moduletests/"

    %% Relationships
    App --> IceoryxBindingC
    App --> ServiceDiscovery
    IceoryxBindingC --> IceoryxPosh
    ServiceDiscovery --> RouDi
    Gateway --> IceoryxPosh
    IceoryxPosh --> SharedMem
    IceoryxPosh --> Mepoo
    RouDi --> PubSub
    RouDi --> ClientServer
    RouDi --> PortMgmt
    PubSub --> SharedMem
    ClientServer --> SharedMem
    PortMgmt --> SharedMem
    SharedMem --> IceoryxHoofs
    Mepoo --> IceoryxHoofs
    IceoryxHoofs --> Linux & QNX & Windows & MacOS & FreeBSD

    %% Legend
    subgraph Legend
        CoreComp[Core Components]:::core
        APIComp[API Components]:::api
        CommComp[Communication Components]:::comm
        PlatformComp[Platform Components]:::platform
        OSComp[OS Layer]:::os
        TestComp[Testing Components]:::testing
    end
```
