用 Jev CHOICE/GATE 做 worker 路由,替代 Kafka
CHOICE 返回带置信度的目标 worker,GATE 低于 0.85 转人工,结果写成 JSON 文件供 8 个 worker 并行读取。
WHOEVER LEAKED THIS JEV ROUTER CODE SHOULD BE REPLACING KAFKA I thought handing a job between workers meant Kafka, Redis, a schema registry, and a retry topic that no one is paged on. Apparently not. This router's setup is much more interesting: → CHOICE returns the next worker name from the result, pinned to a labeled set with confidence attached, no "pick the fastest branch" guess → GATE compares confidence against 0.85, if it falls short the destination becomes "review" automatically, no silent slip into write → FOLDER writes to queue/[destination]/ with mkdir parents true, no central broker, no database, no connection pool to leak → JOB name is a uuid4 hex with a .json extension (payload serialized once with json dumps), one file per handoff, no key collision on the queue → DISPATCH reads 8 workers in parallel across 14 bus readers (worker loads 68, 77, 6, 25, 95, 29, 58, 82%), flags 7 workers whose queue drifted past baseline this frame so you get: Choices named. Gates defaulted. Jobs filed. Workers parallel. the interesting part isn't picking the right broker. it's giving every handoff a json file the next worker can read on its own. Instead of a weekend configuring Kafka with retention and partitions, you write queue/[destination]/[uuid].json, let 8 workers tail their folder, and route 10,000 decisions at $0.02 total with 251ms median. Pick the worker. Gate the choice. Write the file.
这条是引用着另一条写的:「长文:如何搭好 Jev 驱动的 agent 技术栈」