# agileguru/graalvm_cloud_native architecture

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

- Interactive diagram: https://gitdiagram.com/agileguru/graalvm_cloud_native
- Repository: https://github.com/agileguru/graalvm_cloud_native

## Overview

##### Main Components

A. Application Components:
- GraalVM Client Application
- GraalVM Server Application
- WebSocket Communication Layer
- Chat System

B. Infrastructure Components:
- Kubernetes Cluster
- Argo CD (Continuous Delivery)
- Istio Service Mesh
- KEDA (Kubernetes Event-driven Autoscaling)
- Prometheus (Monitoring)
- Kiali (Service Mesh Visualization)

##### Connection Types

- HTTP/HTTPS traffic
- WebSocket connections
- Kubernetes control flow
- Monitoring data flow
- Deployment pipelines

##### Key Elements to Highlight

a. Client-Server Communication:
- WebSocket connection between client and server
- Chat message flow
- REST endpoints

b. Scalability Features:
- KEDA scaling rules
- Load balancing configuration
- Autoscaling policies

c. Observability Stack:
- Prometheus monitoring paths
- Kiali service mesh visualization
- Logging flow

d. Deployment Flow:
- Argo CD GitOps pipeline
- Configuration management
- Namespace isolation

##### Additional Details

Annotations for:
- GraalVM native image compilation
- Resource limits and requests
- Security policies
- Environment-specific configurations (dev/devops)

##### Notes for Implementation

- Maintain consistent sizing for similar components
- Related components in containers or bounded contexts
- Version information for major components
- Brief descriptions for complex interactions

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "External Access Layer"
        LB["Load Balancer"]
        ING["Nepa Ingress"]:::ingress
    end

    subgraph "Application Layer"
        subgraph "Client Pod"
            CL["GraalVM Client"]:::client
            SR["Static Resources"]:::client
            CC["Default Client Controller"]:::client
        end

        subgraph "Server Pod"
            SV["GraalVM Server"]:::server
            WS["WebSocket Config"]:::server
            CH["Chat Controller"]:::server
            DC["Default Controller"]:::server
        end
    end

    subgraph "Platform Services"
        subgraph "Scaling"
            KD["KEDA"]:::scaling
            KH["KEDA HTTP Addon"]:::scaling
        end

        subgraph "Service Mesh"
            IB["Istio Base"]:::mesh
            ID["Istiod"]:::mesh
            KI["Kiali"]:::mesh
        end

        subgraph "Monitoring"
            PR["Prometheus"]:::monitoring
        end

        AG["Argo CD"]:::cicd
    end

    subgraph "Kubernetes Infrastructure"
        subgraph "Namespaces"
            NS1["dev"]:::k8s
            NS2["devops"]:::k8s
        end

        subgraph "Configurations"
            KC["Client Config"]:::k8s
            KS["Server Config"]:::k8s
        end
    end

    %% Connections
    LB --> ING
    ING --> CL
    CL --> SV
    WS --> CH
    KD --> KH
    IB --> ID
    PR --> KI

    %% Component Mappings
    click CL "https://github.com/agileguru/graalvm_cloud_native/tree/main/graalvmcloudnativeclient/src/main/java/com/doit/agileguru/graalvmcloudnativeclient"
    click SV "https://github.com/agileguru/graalvm_cloud_native/tree/main/graalvmcloudnativeserver/src/main/java/com/doit/demo/graalvmcloudnativeserver"
    click WS "https://github.com/agileguru/graalvm_cloud_native/blob/main/graalvmcloudnativeserver/src/main/java/com/doit/demo/graalvmcloudnativeserver/config/WebSocketConfig.java"
    click CH "https://github.com/agileguru/graalvm_cloud_native/tree/main/graalvmcloudnativeserver/src/main/java/com/doit/demo/graalvmcloudnativeserver/chat"
    click KC "https://github.com/agileguru/graalvm_cloud_native/tree/main/k8s/base/client"
    click KS "https://github.com/agileguru/graalvm_cloud_native/tree/main/k8s/base/server"
    click NS1,NS2 "https://github.com/agileguru/graalvm_cloud_native/tree/main/k8s/base/namespaces"
    click AG "https://github.com/agileguru/graalvm_cloud_native/blob/main/k8s/base/argo-cd/argo-cd.yaml"
    click IB "https://github.com/agileguru/graalvm_cloud_native/blob/main/k8s/base/argo-cd/istio-base.yaml"
    click ID "https://github.com/agileguru/graalvm_cloud_native/blob/main/k8s/base/argo-cd/istio-istiod.yaml"
    click KD "https://github.com/agileguru/graalvm_cloud_native/blob/main/k8s/base/argo-cd/keda.yaml"
    click KH "https://github.com/agileguru/graalvm_cloud_native/blob/main/k8s/base/argo-cd/kedahttpaddon.yaml"
    click PR "https://github.com/agileguru/graalvm_cloud_native/tree/main/k8s/base/prometheus"
    click KI "https://github.com/agileguru/graalvm_cloud_native/blob/main/k8s/base/argo-cd/kiali.yaml"
    click ING "https://github.com/agileguru/graalvm_cloud_native/tree/main/k8s/base/nepa-ingress"

    %% Styles
    classDef client fill:#3498db
    classDef server fill:#2ecc71
    classDef ingress fill:#e74c3c
    classDef mesh fill:#9b59b6
    classDef monitoring fill:#f1c40f
    classDef scaling fill:#e67e22
    classDef cicd fill:#8e44ad
    classDef k8s fill:#95a5a6
```
