# ADR-0004: Process model — Electron + Bare worker + Squid child - **Status:** Superseded by [ADR-0013](./0013-bare-pear-only-runtime-and-distribution.md) - **Date:** 2026-07-30 - **Superseded:** 2026-07-30 ## Context We need a polished desktop GUI, a P2P runtime with OTA hooks, and a Node-compatible Minecraft server. One process cannot optimally host all three. ## Decision | Process | Runtime | Responsibility | |---------|---------|----------------| | Main | Electron (Node) | Window, Squid lifecycle, ports, IPC hub | | Renderer | Chromium | GUI only | | Worker | Bare via `pear-runtime` | Hyperswarm, HyperDHT tunnels, Autobase, Protomux | | Squid | Node child | Authoritative MC sim, Anvil I/O | IPC: Electron ↔ Bare via `framed-stream`; Main ↔ Squid via child_process (stdio/JSON or control socket). Template: `hello-pear-electron`. ## Consequences ### Positive - Crash isolation for Squid - P2P off the UI thread - OTA patterns from Pear ### Negative / tradeoffs - Multi-process complexity - Packaging must include Node-compatible Squid deps beside Electron ### Follow-ups - [ ] Phase 1 implement managers - [ ] Decide exact Squid IPC schema