PROJECT CASE STUDY
Personal Internet Simulator
Thiết kế một infrastructure lab xác định được để quan sát packet routing, latency propagation và failure scenarios; implementation simulator hiện chưa được đưa vào repository.
A design for a deterministic infrastructure lab that makes packet routing, latency propagation, and failure scenarios observable; the simulator implementation has not yet landed in the repository.
- Trạng tháiStatus
- Research · documented-firstResearch · documented-first
- Lĩnh vựcDomain
- Distributed systems · Networking · Reliability labDistributed systems · Networking · Reliability lab
- Cập nhậtUpdated
- 2026-07-16
01 / PROBLEM
Vấn đềProblem
Networking và distributed-systems failures khó hiểu nếu chỉ đọc lý thuyết hoặc chỉ nhìn trạng thái cuối mà không theo dõi causal event flow.
Networking and distributed-systems failures are difficult to understand from theory or final-state snapshots without following causal event flow.
02
Bối cảnhContext
Repository hiện ở trạng thái documented-first với vision, architecture, invariants, protocol và roadmap. README cũng ghi rõ workflow chạy chỉ là expected workflow khi implementation được bổ sung.
The repository is currently documented-first, with vision, architecture, invariants, protocol, and roadmap documents. Its README explicitly marks the run workflow as an expected workflow for when implementation lands.
03
Ràng buộcConstraints
- Mô hình phải đủ nhỏ để chạy local, inspect từng event và replay bằng cùng seed/configuration.The model must remain small enough to run locally, inspect each event, and replay from the same seed/configuration.
- Renderer chỉ là projection; correctness phải nằm ở state transition, scheduler và invariant tests.The renderer is only a projection; correctness must live in state transitions, the scheduler, and invariant tests.
- Không gửi traffic thật, không mô phỏng Internet đầy đủ và không trình bày như production network platform.Send no real traffic, do not model the full Internet, and do not present the project as a production network platform.
04
Vai trò của tôiMy role
Xác định vision, kiến trúc actor/event-driven, invariants, protocol, roadmap và failure-first engineering principles; simulator code vẫn là planned work.
Defined the vision, actor/event-driven architecture, invariants, protocol, roadmap, and failure-first engineering principles; simulator code remains planned work.
05
Kiến trúcArchitecture
- Planned scheduler cung cấp central clock và deterministic event ordering.A planned scheduler provides a central clock and deterministic event ordering.
- Planned actors gồm client, router, DNS, CDN, firewall và monitor; topology/scenario được khai báo bằng configuration.Planned actors include client, router, DNS, CDN, firewall, and monitor; topology/scenarios are configuration-driven.
- Planned metrics/event log ghi packet flow, routing decision, latency, node state và failure/recovery events.Planned metrics/event logs record packet flow, routing decisions, latency, node state, and failure/recovery events.
06
Quyết định kỹ thuậtTechnical decisions
- Discrete-event simulation thay vì real sockets để giữ tính deterministic và dễ kiểm thử.Use discrete-event simulation instead of real sockets to preserve determinism and testability.
- Immutable packet structures và config-driven scenarios để giảm hidden state và hỗ trợ replay.Use immutable packet structures and config-driven scenarios to reduce hidden state and support replay.
- Failure handling và observability được thiết kế trước visualization polish.Design failure handling and observability before visualization polish.
07
Kiểm thử và validationTesting and validation
- Hiện có thể review documentation contract và roadmap; chưa có build, test hoặc executable simulation result.The current evidence is limited to reviewable documentation contracts and a roadmap; no build, test, or executable simulation result exists.
- Planned validation gồm deterministic replay, scheduler ordering, packet-location invariant, routing-loop detection và golden failure scenarios.Planned validation includes deterministic replay, scheduler ordering, packet-location invariants, routing-loop detection, and golden failure scenarios.
08
ObservabilityObservability
- Planned packet traces, routing logs, latency histograms, node metrics và replay sessions.Planned packet traces, routing logs, latency histograms, node metrics, and replay sessions.
09
Bảo mậtSecurity considerations
- Config input phải được validate và resource limits phải ngăn scenario làm event queue tăng không kiểm soát.Configuration input must be validated, and resource limits must prevent scenarios from growing the event queue without bounds.
10
Failure modesFailure modes
- Invalid scenario, routing loop, event queue runaway, deterministic replay mismatch hoặc node failure làm hỏng global state.Invalid scenarios, routing loops, runaway event queues, deterministic-replay mismatches, or node failures corrupting global state.
11
Kết quả hiện cóCurrent results
- Đã có README, vision, architecture, invariants, protocol và roadmap public; chưa có simulator implementation, visual demo hoặc benchmark.A public README, vision, architecture, invariants, protocol, and roadmap exist; no simulator implementation, visual demo, or benchmark exists yet.
12
Bài họcWhat I learned
- Design document có thể làm rõ boundary và invariant, nhưng chỉ code/test chạy được mới chứng minh behavior.Design documents can clarify boundaries and invariants, but only running code and tests prove behavior.
13
Bước tiếp theoWhat I would improve next
- Tạo vertical slice Zig tối thiểu gồm scheduler, packet model, hai node, deterministic seed và một link-failure test.Build a minimal Zig vertical slice with a scheduler, packet model, two nodes, a deterministic seed, and one link-failure test.
EVIDENCE
Bằng chứng và liên kếtEvidence and links
Chỉ liên kết artifact đang tồn tại; planned work luôn được ghi rõ.
Only existing artifacts are linked; planned work remains explicit.