Files
Arcrun/system-dev/wiki/cards/decisions/service-binding-vs-cypher-binding.md
T
uncle6me-web 558e80b4da chore(wiki): wiki-init 補骨架 + system-dev-template 安裝/更新腳本
wiki 已初始化過(push 檔活躍維護),本次補從沒建的 pull 層 + arcrun 化範本:
- cards/decisions/ 14 張決策原子卡(含 gloss/實體/typed-edge 三元組):
  從 decisions-summary 全量改寫 13 + 新增「薄殼規則晚於實作-MCP漂移是歷史債」1
- TAXONOMY 從 PKM 範本換成 arcrun 軸(子系統 零件架構/cypher/credential/recipe/kbdb/
  薄殼/部署/平台原則 + 形態 架構決策/踩坑/機制說明/禁令/案例經驗)
- principles 填 13 條跨全局原則(從 rules/ + mindset 蒸餾)
- INDEX 真實視圖(子系統角度 + 決策角度,指向 cards)
- system-dev/scripts/ + scripts/ install/update 安裝腳本(template 接入)

純基建/文檔,無業務 code(功能 code 見前一 commit)。
raw source(docs/)0 異動、wiki 卡際連結無斷鏈。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-27 17:53:37 +08:00

2.4 KiB
Raw Blame History

tags, gloss
tags gloss
零件架構
cypher
架構決策
零件串接用 Cypher bindingYAML URL 清單)not Service Bindingwrangler.toml)——後者靜態、不適合動態 workflow。

Service Binding vs Cypher Binding

decisions/00-INDEX

來源system-dev/wiki/decisions-summary.mdService Binding vs Cypher Binding)、.claude/rules/03-component-architecture.md §1 最後更新2026-06-27

摘要

Cypher binding 是 YAML/KV 裡的 URL 清單(用戶定義、動態);Service Binding 是 wrangler.toml 的 [[services]](平台內建、靜態)。workflow 層一律走 HTTP URL,禁止新增 Service Binding。

重點

  • Cypher binding 用 HTTP 呼叫,workflow 是用戶定義的動態圖,不能要求每改 workflow 就 redeploy。
  • Service Binding 靜態、修改 wrangler.toml 要重新部署——完全違反 workflow 靈活性,故只保留 13 個邏輯零件間的歷史遺產綁定、禁止擴展。
  • 新零件部署流程:registry/components/{name}/main.go → 編譯 .wasm → 包進 .component-builds/{name}/ WorkerHono + WASI shim)→ 獨立部署成 arcrun-{name}.{sub}.workers.dev(對內)+ {name}.arcrun.dev(對外)→ cypher 透過 HTTP fetch 呼叫。
  • self-hosted 同 zone 1042 不是加 Service Binding 解——那樣更死。改用 flag 解(見卡「same-zone-1042用flag解不用binding」)。

實體

  • Cypher bindingworkflow binding)— YAML/KV 裡存的 URL 清單,workflow 執行時動態查表呼叫零件。
  • Service BindingCloudflare service binding)— wrangler.toml 的 [[services]] 區塊,靜態綁定、修改須重新部署。
  • 零件串接component invocation)— workflow 在執行時呼叫零件的過程。
  • HTTP 呼叫HTTP fetch)— 用 fetch() 透過公網 URL 呼叫零件,cypher 實踐零件串接的標準方式。
  • 新零件new component)— 新部署到 arcrun 系統的 WASM 零件(如新的第三方服務串接)。

關聯

內文知識關係

  • Cypher binding >> 用 HTTP 呼叫 >> 零件串接
  • Service Binding >> 靜態化 >> 零件串接
  • 新零件 >> 禁止用 >> Service Binding
  • Cypher binding >> 支撑 >> workflow

卡片關係