45 lines
840 B
Markdown
45 lines
840 B
Markdown
# Architecture Overview
|
|
|
|
## Stack Diagram
|
|
|
|
```mermaid
|
|
graph TB
|
|
subgraph \"App Layer\"
|
|
App[Your App]
|
|
end
|
|
subgraph \"Runtime\"
|
|
Pear[Pear Runtime]
|
|
Bare[Bare JS Runtime]
|
|
end
|
|
subgraph \"Networking\"
|
|
Swarm[Hyperswarm]
|
|
DHT[HyperDHT]
|
|
end
|
|
subgraph \"Data Layer\"
|
|
HC[Hypercore]
|
|
Drive[Hyperdrive]
|
|
Bee[Hyperbee]
|
|
AB[Autobase]
|
|
end
|
|
subgraph \"Storage\"
|
|
CS[Corestore]
|
|
end
|
|
|
|
App --> Pear
|
|
Pear --> Bare
|
|
App --> Swarm
|
|
Swarm --> DHT
|
|
App --> HC
|
|
HC --> CS
|
|
Drive --> Bee
|
|
Drive --> HC
|
|
AB --> HC
|
|
```
|
|
|
|
## Key Interconnections
|
|
|
|
- **Hyperdrive**: Hyperbee (file tree) + Hyperblobs (content) on Corestore.
|
|
- **Replication**: Hyperswarm joins discoveryKey, replicate cores.
|
|
- **Multi-writer**: Autobase merges multiple Hypercores.
|
|
- **Encoding**: Compact-encoding for efficient serialization.
|