update_docs #10
@@ -22,42 +22,49 @@ This walkthrough serves as the primary onboarding guide for new developers and e
|
||||
|
||||
NATSBridge implements the **Claim-Check pattern** for efficient handling of large payloads (>0.5MB):
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────────────────────────────────────┐
|
||||
│ NATSBridge Architecture │
|
||||
├─────────────────────────────────────────────────────────────────────┤
|
||||
│ │
|
||||
│ ┌──────────────┐ ┌──────────────┐ │
|
||||
│ │ Sender │ │ Receiver │ │
|
||||
│ │ │ │ │ │
|
||||
│ │ ┌──────────┐ │ │ ┌──────────┐ │ │
|
||||
│ │ │smartsend │◀─────────┤ │smartreceive│ │ │
|
||||
│ │ └────┬─────┘ │ │ └────┬─────┘ │ │
|
||||
│ │ │ │ │ │ │ │
|
||||
│ │ ▼ │ │ ▼ │ │
|
||||
│ │ ┌──────────┐ │ │ ┌──────────┐ │ │
|
||||
│ │ │Serialize │◀─────────┤ │Deserialize│ │ │
|
||||
│ │ └────┬─────┘ │ │ └────┬─────┘ │ │
|
||||
│ │ │ │ │ │ │ │
|
||||
│ │ ▼ │ │ ▼ │ │
|
||||
│ │ ┌──────────┐ │ │ ┌──────────┐ │ │
|
||||
│ │ │Transport │◀─────────┤ │Transport │ │ │
|
||||
│ │ │Selection │ │ │ │Selection │ │ │
|
||||
│ │ └────┬─────┘ │ │ └────┬─────┘ │ │
|
||||
│ │ │ │ │ │ │ │
|
||||
│ │ ▼ │ │ ▼ │ │
|
||||
│ │ ┌──────────┐ │ │ ┌──────────┐ │ │
|
||||
│ │ │ NATS │◀─────────┤ │ NATS │ │ │
|
||||
│ │ │Publish │ │ │ │Subscribe │ │ │
|
||||
│ │ └──────────┘ │ │ └──────────┘ │ │
|
||||
│ │ │ │ │ │
|
||||
│ │ ┌──────────┐ │ │ ┌──────────┐ │ │
|
||||
│ │ │File Server│◀─────────┤ │File Server│ │ │
|
||||
│ │ │Upload │ │ │ │Download │ │ │
|
||||
│ │ └──────────┘ │ │ └──────────┘ │ │
|
||||
│ └──────────────┘ └──────────────┘ │
|
||||
│ │
|
||||
└─────────────────────────────────────────────────────────────────────┘
|
||||
```mermaid
|
||||
flowchart TD
|
||||
subgraph "Sender Application"
|
||||
A1[User Code]
|
||||
A2[smartsend Function]
|
||||
A3[Serialize Data]
|
||||
A4[Transport Selection]
|
||||
A5[Publish to NATS]
|
||||
A6[File Server Upload]
|
||||
end
|
||||
|
||||
subgraph "NATS Broker"
|
||||
B1[NATS Server]
|
||||
end
|
||||
|
||||
subgraph "Receiver Application"
|
||||
C1[Subscribe to NATS]
|
||||
C2[smartreceive Function]
|
||||
C3[Deserialize Data]
|
||||
C4[Transport Selection]
|
||||
C5[Fetch from File Server]
|
||||
end
|
||||
|
||||
A1 --> A2
|
||||
A2 --> A3
|
||||
A3 --> A4
|
||||
A4 -->|Direct| A5
|
||||
A4 -->|Link| A6
|
||||
A6 --> A5
|
||||
A5 --> B1
|
||||
B1 --> C1
|
||||
C1 --> C2
|
||||
C2 --> C3
|
||||
C2 --> C4
|
||||
C4 -->|Fetch| C5
|
||||
C5 --> C3
|
||||
C3 --> C4
|
||||
|
||||
style A1 fill:#e8f5e9,stroke:#4caf50
|
||||
style B1 fill:#fff3e0,stroke:#f57c00
|
||||
style C1 fill:#e3f2fd,stroke:#2196f3
|
||||
style A6 fill:#fef3c7,stroke:#f59e0b
|
||||
style C5 fill:#fef3c7,stroke:#f59e0b
|
||||
```
|
||||
|
||||
### Key Design Principles
|
||||
|
||||
Reference in New Issue
Block a user