帮助设计可离线运行的边缘系统,处理同步、冲突恢复与弱网故障场景。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "system-type-edge-offline" 技能: 1. 下载 https://raw.githubusercontent.com/microsoft/amplifier-bundle-systems-design/main/skills/system-type-edge-offline/SKILL.md 2. 保存为 ~/.claude/skills/system-type-edge-offline/SKILL.md 3. 装好后重载技能,告诉我可以用了
请为一款野外巡检移动应用设计离线优先架构,重点说明本地数据存储、断网期间的操作队列、恢复联网后的同步协议、冲突解决策略,以及常见失败模式与恢复机制。
一份离线优先系统设计方案,包含架构要点、同步流程、冲突处理与容错建议。
请评估一个 IoT 边缘设备系统的同步方案:设备间歇性联网、资源受限、可能长时间离线。请分析数据同步、分区下的一致性取舍、冲突解决、重试机制和设备故障后的恢复策略。
一份针对边缘设备系统的技术评估,指出风险、权衡和优化建议。
请为一个需要离线工作的业务系统制定测试清单,覆盖断网、频繁重连、重复提交、时钟漂移、设备存储受限、同步冲突和异常恢复等场景,并给出优先级。
一份面向离线与弱网系统的测试用例清单与优先级建议。
Patterns, failure modes, and anti-patterns for systems that operate under intermittent connectivity and constrained resources.
The fundamental assumption shift: the network is not a dependency — it is an optimization. An offline-first system is fully functional without connectivity and becomes better when connectivity is available. This is the opposite of how most systems are built, where the server is the source of truth and the client is a thin rendering layer that breaks the moment the network disappears.
| Model | Description | Network requirement | Complexity | Example |
|---|---|---|---|---|
| Online-only | Server renders everything. Client is a viewport. | Continuous | Lowest | Traditional server-rendered web apps |
| Offline-tolerant | Works online, degrades gracefully offline. Shows cached data, queues writes. | Expected, with brief gaps | Low-medium | Gmail offline mode, Google Maps cached areas |
| Offline-first | Full functionality offline. Sync when connected. Network enhances, does not enable. | Optional, intermittent | High | Notion mobile, Field Service apps, CouchDB/PouchDB apps |
| Local-only | No server component. Data lives entirely on device. | None | Low (no sync) | Local note apps, single-player games, calculators |
| Local-first | Local-only experience with optional peer or cloud sync. User owns the data. | Optional, for collaboration | Highest | Automerge-based apps, Obsidian with sync, Linear's local model |
Most teams think they're building "offline-tolerant" but their users need "offline-first." The gap between those two is enormous — it's the difference between showing a spinner with "waiting for connection" and letting the user do their entire job on an airplane.
Local-first means the device has a complete, usable copy of the data the user needs. Not a cache — a replica. The distinction matters:
Design consequences of treating the device as a replica:
| Technology | Platform | Max storage | Strengths | Weaknesses |
|---|---|---|---|---|
| SQLite | iOS, Android, Desktop, WASM | Device storage | Full SQL, ACID transactions, mature tooling, single-file database | No built-in sync, schema migrations need care |
| IndexedDB | Web browsers | Varies (typically 50%+ of disk) | Async, transactional, structured data, available in service workers | Terrible API ergonomics (use a wrapper like Dexie.js), no SQL, browser eviction policies |
| Realm | iOS, Android, Web (partial) | Device storage | Object-oriented, live objects, built-in sync (MongoDB Atlas), reactive | Vendor lock-in to MongoDB ecosystem, schema constraints |
| Core Data | iOS, macOS | Device storage | Deep OS integration, CloudKit sync built-in | Apple-only, complex concurrency model, opaque conflict resolution |
| OPFS (Origin Private File System) | Web browsers | Varies | Fast synchronous file access in workers, good for WASM-based SQLite | Limited browser support, no structured query without SQLite on top |
…
帮助设计与评估企业系统集成方案,覆盖遗留改造、网关、事件与失效模式。
用于按七步法系统审查架构设计,识别风险、权衡并产出改进建议。
用 Unix/Linux 设计哲学评估系统方案的可组合性、简洁性与关注点分离。
帮助用户设计或评估基于 Azure 的系统架构与运维方案
帮助设计与评估数据管道架构,覆盖批流处理、调度、质量与故障策略。
帮助设计和评估多租户SaaS的平台隔离、计量计费与稳定性方案
帮助设计与评估实时协作系统的连接、同步、冲突处理与故障模式
帮助设计或评估单页应用架构,涵盖路由、状态、性能与离线能力。
帮助设计或评估命令行工具与开发者 SDK 的架构、兼容性和使用体验
帮助设计与评估去中心化点对点系统的架构模式与关键机制
帮助设计和评估事件驱动、消息驱动与异步工作流系统架构。
帮助你设计或评估Web服务架构、API模式、扩展性与可靠性问题。