ekfa/docs/todo.md

51 lines
1.9 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# TODO
## 协议层
### 高优先级
-`message.proto` 收敛为 `efka``iot` 共用的一份单一事实来源,避免协议定义漂移和双端重复维护。
### 中优先级
- 增强 protobuf 映射和 Docker JSON 生成相关的自动化契约测试。
## Docker 层
### 高优先级
-`docker_commands` 拆分为更清晰的层次Docker HTTP 客户端、Docker JSON 构造层、以及 efka 本地补丁逻辑。
- 明确 `docker_task_reporter` 的投递语义;当前只有内存缓冲,还缺少持久化能力和队列上限控制。
### 中优先级
- 丰富 `docker_deploy_manager` 的任务跟踪状态,把部署元数据、耗时、阶段、失败原因等信息纳入统一管理,避免后续再回头重构。
- 统一 `docker_container_service` 的返回结构,避免调用方分支处理 `ok | {ok, binary()} | {error, binary()}` 这种混合形式。
- 消除 `docker_commands` 中重复的 Docker HTTP 响应解析逻辑。
### 低优先级
- 对于像 `docker_events.erl` 这样当前未启用的模块,要么清理掉,要么补充说明其保留原因。
## 订阅与通道层
### 高优先级
-`efka_subscription` 当前基于列表扫描的匹配方式替换为更可扩展的索引结构,例如 trie 或基于 ETS 的索引。
### 中优先级
- 继续收敛 `efka_iot_client` 的职责,将传输层状态管理与 request/cast 协议处理进一步拆开。
- 评估并落实 `efka_service_channel``subscribed_topics` 集合的用途;如果只是被动保存状态,则应简化。
### 低优先级
- 如果 `efka_iot_client` 的缓存指标量继续增长,可以为缓存刷出增加批量发送或节流机制。
## 基础设施层
### 低优先级
- 如果上传相关能力已经不再属于当前运行时,移除或补充说明残留的启动逻辑,例如 `ensure_upload_dir/0`
- 评估是否将 `efka_logger` 与 OTP `logger` 统一,避免长期维护两套日志链路。