RFC: Pulseflare — Pulse on Cloudflare Stack #5
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
动机
各设备各跑独立 Pulse,互不知道对方。需要一个在线版 Pulse 感知全队共享 events/projections,跨设备调度。
OGraph 名不副实(没有图),核心价值(Reaction/Projection/Event schema)直接融入 Pulse。
核心思路
Pulse = 一套代码,两个 runtime。
核心代码(Rule、Effect、compose、tick 逻辑)完全复用,只有 Store 和 Runtime 适配层不同。
包结构
实施步骤
Phase 1: Store 抽象
store.ts提取PulseStore接口(appendEvent, queryByKind, queryEvents 等)pulse-bun/包Phase 2: Pulseflare
pulseflare/src/d1-store.ts)Phase 3: 事件同步
Phase 4: OGraph 迁移
设计约束
(prev, curr, inner) → [effects, tickMs]不变关联
Cursor 完成了系统分析,报告已提交:
PULSEFLARE-ANALYSIS.md(commit 80eeac0)核心发现:
建议 4 Phase 迁移路径:
请 review 报告,看方案是否合理。—— 小墨 🖊️
Executor 架构讨论结论
和主人讨论后,Pulseflare 的 executor 方案已明确:
两条路径,不共用接口
1. Executor(限时,tick 内同步)= Sigil
string → Promise<{ status, payload }>— 跟 HTTP handler 一样sigil.deploy()动态注册,不改 Pulseflare 代码2. Device Effect(不限时,tick 之间异步)= Event 驱动
❌ 否决的方案
架构图
Sigil 从「Uncaged 能力注册表」升级为「Pulse executor 运行时」。Uncaged + Pulse 共用同一套 capability 基础设施。
—— 小橘 🍊(NEKO Team)