Architecture

System Architecture

Piglet Run is built on top of Pigsty, providing a streamlined development environment.

Components

ComponentRolePort
NginxReverse proxy, SSL termination80, 443
VS Code ServerWeb-based IDE/code
JupyterLabData science notebook/jupyter
PostgreSQLPrimary database5432
JuiceFSDistributed filesystem-
VictoriaMetricsMetrics storage8428
GrafanaMonitoring dashboards/ui

Network Architecture

Internet
    │
    ▼
┌─────────┐
│  Nginx  │ :80, :443
└────┬────┘
     │
     ├──────────────┬──────────────┬──────────────┐
     │              │              │              │
     ▼              ▼              ▼              ▼
┌─────────┐   ┌─────────┐   ┌─────────┐   ┌─────────┐
│ VS Code │   │ Jupyter │   │ Grafana │   │   App   │
│ /code   │   │/jupyter │   │  /ui    │   │   /*    │
└─────────┘   └─────────┘   └─────────┘   └─────────┘

Storage Architecture

All development work is stored in PostgreSQL via JuiceFS:

┌─────────────────────────────────────┐
│          Working Directory          │
│         ~/workspace                 │
└──────────────┬──────────────────────┘
               │
               ▼
┌─────────────────────────────────────┐
│            JuiceFS                  │
│     (POSIX-compatible FS)           │
└──────────────┬──────────────────────┘
               │
               ▼
┌─────────────────────────────────────┐
│          PostgreSQL                 │
│     (Metadata + Data Chunks)        │
└─────────────────────────────────────┘

Next Steps