Tất cả dự án

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.

Trạng thái
Research · documented-first
Lĩnh vực
Distributed systems · Networking · Reliability lab
Cập nhật
2026-07-16

01 / PROBLEM

Vấn đề

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.

02

Bối cảnh

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.

03

Ràng buộc

  • Mô hình phải đủ nhỏ để chạy local, inspect từng event và replay bằng cùng seed/configuration.
  • Renderer chỉ là projection; correctness phải nằm ở state transition, scheduler và 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.

04

Vai trò của tôi

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.

05

Kiến trúc

  • Planned scheduler cung cấp central clock và deterministic event ordering.
  • Planned actors gồm client, router, DNS, CDN, firewall và monitor; topology/scenario được khai báo bằng configuration.
  • Planned metrics/event log ghi packet flow, routing decision, latency, node state và failure/recovery events.

06

Quyết định kỹ thuật

  • Discrete-event simulation thay vì real sockets để giữ tính deterministic và dễ kiểm thử.
  • Immutable packet structures và config-driven scenarios để giảm hidden state và hỗ trợ replay.
  • Failure handling và observability được thiết kế trước visualization polish.

07

Kiểm thử và validation

  • Hiện có thể review documentation contract và roadmap; chưa có build, test hoặc executable simulation result.
  • Planned validation gồm deterministic replay, scheduler ordering, packet-location invariant, routing-loop detection và golden failure scenarios.

08

Observability

  • Planned packet traces, routing logs, latency histograms, node metrics và replay sessions.

09

Bảo mật

  • 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.

10

Failure modes

  • Invalid scenario, routing loop, event queue runaway, deterministic replay mismatch hoặc node failure làm hỏng global state.

11

Kết quả hiện có

  • Đã có README, vision, architecture, invariants, protocol và roadmap public; chưa có simulator implementation, visual demo hoặc benchmark.

12

Bài học

  • Design document có thể làm rõ boundary và invariant, nhưng chỉ code/test chạy được mới chứng minh behavior.

13

Bước tiếp theo

  • Tạo vertical slice Zig tối thiểu gồm scheduler, packet model, hai node, deterministic seed và một link-failure test.

EVIDENCE

Bằng chứng và liên kết

Chỉ liên kết artifact đang tồn tại; planned work luôn được ghi rõ.