Skip to main content

πŸ—οΈ Nexus Architecture

"A solid foundation does not merely bear today's load β€” it is ready for tomorrow's demands."


🎯 Design Philosophy​

Nexus architecture is built on three core principles:

PrinciplePractical Meaning
Module IndependenceEach tool operates standalone β€” deploy incrementally, no all-or-nothing commitment
Deployment SimplicitySingle binary per tool, no runtime dependencies, no complex installation
Cross-Platform NativeWindows (Dev) and Linux (Production) β€” identical behavior, no surprises

🧬 System Architecture​

Nexus is a Rust workspace of 11 specialized crates sharing a common core library while maintaining clear separation of responsibility.

graph TB
subgraph "Developer Environment"
VSCODE["VS Code Extension"]
NEXUS_CLI["nexus CLI"]
ICOMP["icomp β€” Compiler"]
end

subgraph "Management Server β€” isman"
AXUM["Axum HTTP Server"]
IPOL_SVC["Policy Service (ipol)"]
ING_SVC["Ingenium Service (ing)"]
JOBS["Job Scheduler"]
HEALTH["Health Monitor"]
end

subgraph "Core Library"
TERMINAL["Terminal Abstraction"]
DB2["DB2 Integration"]
CRYPTO["AES-256-GCM Crypto"]
SSH_LIB["SSH Library"]
POOL["Terminal Pool"]
PROCESS["Process Manager"]
end

subgraph "Target Systems"
LOCAL["Local Terminal"]
REMOTE["Remote SSH Servers"]
DB2_SERVER["DB2 Database"]
end

VSCODE --> NEXUS_CLI
VSCODE --> ICOMP
VSCODE --> AXUM
NEXUS_CLI --> TERMINAL
ICOMP --> TERMINAL
AXUM --> IPOL_SVC
AXUM --> ING_SVC
AXUM --> JOBS
AXUM --> HEALTH
IPOL_SVC --> TERMINAL
IPOL_SVC --> DB2
ING_SVC --> TERMINAL
JOBS --> TERMINAL
TERMINAL --> LOCAL
TERMINAL --> REMOTE
DB2 --> DB2_SERVER
REMOTE -.-> SSH_LIB
TERMINAL -.-> POOL

πŸ“¦ Dependency Map​

Every component builds on the Core Library β€” ensuring consistent behavior system-wide:

CrateTypeFunction
coreLibraryFoundation: terminal, DB2, crypto, parallel execution
sshLibrarySSH connection management and pooling
policyLibraryPolicy data models and business logic
nexusBinaryCLI for environment orchestration
icompBinaryIntelligent COBOL compiler
imanBinaryIngenium management (CLI)
ipolBinaryPolicy management (CLI)
ismanBinaryCentral HTTP management server
benovaBinaryDeveloper utilities
vscextExtensionVS Code integration

πŸ”Œ Terminal Abstraction Layer​

This is the most important architectural decision in Nexus β€” a unified abstraction allowing every operation to run identically on a local machine or remote server via SSH.

               β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Terminal Trait β”‚
β”‚ execute() β”‚
β”‚ read_all() β”‚
β”‚ change_directory() β”‚
β”‚ get_variable() β”‚
β””β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”˜
β”‚ β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Local β”‚ β”‚ SSH Terminal β”‚
β”‚ Terminal β”‚ β”‚ (Remote) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Practical Benefits:

  • Write once, run anywhere β€” code managing a local dev machine and a production server is identical
  • Terminal Pooling β€” efficient connection reuse, preventing resource exhaustion
  • Configurable timeouts β€” from quick queries (seconds) to long-running batch jobs (minutes)
  • Automatic health checks β€” dead connections are transparently detected and replaced, zero disruption

🌐 Management Server Architecture​

isman is built on Axum + Tokio β€” a high-performance async Rust stack handling thousands of concurrent requests with minimal resources.

Client Request
β”‚
β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Router │────▢│ Validation │────▢│ spawn_blocking β”‚
β”‚ (Axum) β”‚ β”‚ (Params) β”‚ β”‚ (Tokio) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”
β”‚ Terminal Pool β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”
β”‚ DB2 / SSH Ops β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

API Endpoints​

EndpointMethodFunction
/pingGETFast connectivity check
/statusGETSystem health and uptime
/ipol/tasksGETList policy tasks
/ipol/copyPOSTCopy policy between environments
/ipol/exportPOSTExport policy artifacts
/ipol/importPOSTImport policy artifacts
/ipol/uploadPOSTUpload archive via HTTP
/ipol/downloadGETDownload archive via HTTP
/shutdownPOSTControlled server shutdown

πŸ—„οΈ DB2 Integration​

  • βœ… Automatic connection management β€” connect once, reuse, auto-close on cleanup
  • βœ… Secure credential handling β€” decrypted in memory, zeroed immediately after use, never logged
  • βœ… SQL injection prevention β€” built-in sql_escape() function and parameterized queries
  • βœ… Atomic operations β€” supports BEGIN ATOMIC ... END for multi-statement transactions
  • βœ… Intelligent error detection β€” SQLSTATE and SQL code analysis for precise error reporting

πŸ“ Technology Stack​

LayerTechnologyReason
Core languageRustHigh performance + memory safety + single binary
Async runtimeTokioThousands of concurrent connections, zero overhead
HTTP frameworkAxumFastest in Rust, type-safe routing
EncryptionAES-256-GCMMilitary-grade, authentication built-in
SSHlibssh2Battle-tested, production-proven SSH library
Serializationserde + serde_jsonZero-copy, maximum throughput
CompressionzstdBest compression ratio available today

This document is provided for informational and advisory purposes only. All trademarks are the property of their respective owners. This project has no affiliation with DXC Technology, Sun Life, or any other third parties mentioned herein.