Skip to content

docs: design-18 舰队即线路数据库(平台脊柱:从纳管到订阅) - #7

Open
lr00rl wants to merge 2 commits into
mainfrom
docs/design-18-fleet-line-database
Open

docs: design-18 舰队即线路数据库(平台脊柱:从纳管到订阅)#7
lr00rl wants to merge 2 commits into
mainfrom
docs/design-18-fleet-line-database

Conversation

@lr00rl

@lr00rl lr00rl commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

立意

把 2026-08-12 的运营商愿景落成架构:散布在各 VPS 上的 sing-box 就是一个抽象数据库——不做外部注册,只通过 Lattice 自有的元数据读写它。框架(L0)→ 扩展(L1)→ 节点生命周期(L2)→ 线路数据库投影(L3)→ 链式图谱(L4)→ 订阅组合(L5),每层都是下层数据的视图。

关键裁决

# 裁决
D1 投影是唯一读路径;请求路径永不触节点
D2 身份载体=sidecar,不是 in-config _lattice(sing-box 严格解析未知键;重申 design-15 §4.4)——下划线字段的直觉以更安全的形式保留
D3 扩展合同 v2.1:manifest 声明 plugin↔plugin 依赖;每个变更计划携带 typed preflight checks,应用前重验
D4 绿地纳管:一条审批计划从我们的 fork 安装 sing-box(checksum 钉死)→ 零 inbound 基座 → 进入投影
D5 链式构建器:line 描述符服务端编译成消费节点的 outbound 片段,走 design-17 S2 原子通道;边在 sidecar 声明,与发现证据 join 成 jump_edges
D6 运行时教义:平台管线全 Go;QuickJS 只跑用户脚本;无 Node 可借也无 Node 可引(dashboard 是静态 SPA;sidecar 在 olympus 已架构性排除)
D7 性能教义:投影优先、内容 hash 差量同步、单任务通道+单审批事件、Go-only 渲染、预算测试钉死;目标 10³–10⁴ 节点
D8 订阅=数据库视图:舰队线路经 vpn-core 源进 sub-store,与外部订阅/手写配置同一变换管线——顺理成章字面化

切片

E1 扩展合同 → E2 绿地安装 → E3 链式构建(依赖 design-17 S2)→ E4 jump_edges+拓扑 → E5 舰队订阅流(可并行起步)。

与 design-17(#6)关系:托管线路覆盖层是线路数据库的第一个公民,两文档互补无冲突。

lr00rl added 2 commits August 11, 2026 23:48
…doption to subscription)

From the operator directive 2026-08-12: the sing-box fleet is one abstract
database, read through the server projection and written through planned,
approved tasks; extensions declare dependencies and pre-apply checks; the
chain graph and the subscription layer follow as views over the same rows.

Decision registry: projection-only reads (D1); identity in the sidecar, not
in-config _lattice (D2, reaffirms design-15 §4.4); extension contract v2.1
with dependencies + preflight (D3); greenfield install from our sing-box
fork (D4); chain builder over line descriptors with declared edges (D5);
runtime doctrine — platform paths pure Go, QuickJS for user scripts only,
no Node anywhere (D6); performance doctrine for many small nodes (D7);
subscriptions as a view over the database (D8).

Slices E1-E5 sequence the gaps to the sub-store endpoint; design-17 S1/S2
remains the in-flight first citizen of the line database.
The dependency contract is enforced at load and activation; per-plugin
manifest declarations ride each plugin's next signed release with a
compatibility.server floor bump (strict decode requires a18+).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant