diff --git a/docs/concepts/application-architecture.md b/docs/concepts/application-architecture.md index bde15849d..e1d190cf8 100644 --- a/docs/concepts/application-architecture.md +++ b/docs/concepts/application-architecture.md @@ -53,7 +53,9 @@ Adding a public header or CMake API target only makes an interface available to ## Ordering and ownership -The manager installs plugins before running the module initialization stages. It does not topologically sort module dependencies or make manifest list order a lifecycle-order contract. Missing-module lookups can return null, and module callback return values are not currently aggregated into a transactional startup result. Verify required plugins/resources and application logs; a running process alone does not prove every service initialized successfully. +The manager installs plugins before running `init()`, `post_init()`, `check_config()` and `pre_update()`. The first `false` return stops startup; a propagated startup exception also reaches the launcher. The launcher reports the failed phase and available module/plugin details, then terminates with exit code `1` before entering the update loop. It does not roll back partially started plugins or run normal shutdown hooks on this failure path. See [startup failure handling](../guides/applications.md#check-startup-and-stop-the-process). + +The manager does not topologically sort module dependencies or make manifest list order a lifecycle-order contract. Missing-module lookups can return null. Verify required plugins/resources, initialization logs and application-specific readiness before routing traffic; a running process alone does not prove every service initialized successfully. Pointers returned by `find_module()` belong to the loaded plugin. Stop asynchronous producers before teardown and do not retain those pointers after unload. Keeping connections and state through an in-flight business-plugin replacement is not an automatic consequence of this composition model. diff --git a/docs/concepts/application-architecture_CN.md b/docs/concepts/application-architecture_CN.md index 1c6799916..c36480be4 100644 --- a/docs/concepts/application-architecture_CN.md +++ b/docs/concepts/application-architecture_CN.md @@ -53,7 +53,9 @@ config = "" ## 顺序与所有权 -管理器先安装插件,再执行模块初始化阶段。它不按依赖关系排序模块,清单中的插件顺序也不是生命周期顺序保证。查找缺失模块可能返回空指针,模块回调返回值目前没有汇总为可回滚的启动结果。需要核对必需插件、资源和应用日志;进程仍在运行,不代表每个服务都已初始化成功。 +管理器先安装插件,再执行 `init()`、`post_init()`、`check_config()` 和 `pre_update()`。首个 `false` 返回值会中止启动;向外传播的启动异常也会到达启动器。启动器报告失败阶段及可用的模块/插件信息,在进入更新循环前以退出码 `1` 终止。这条失败路径不回滚部分启动的插件,也不执行正常停机钩子。见[启动失败处理](../guides/applications_CN.md#确认启动并停止进程)。 + +管理器不按依赖关系排序模块,清单中的插件顺序也不是生命周期顺序保证。查找缺失模块可能返回空指针。接收流量前,需要核对必需插件、资源、初始化日志与应用就绪状态;进程仍在运行,不代表每个服务都已初始化成功。 `find_module()` 返回的指针属于已加载插件。释放前先停止异步生产者,插件卸载后不再保留这些指针。在业务函数执行期间替换插件,同时保留连接和状态,需要另外的协调机制,不是这种组合方式自动提供的能力。 diff --git a/docs/project/roadmap-history.md b/docs/project/roadmap-history.md new file mode 100644 index 000000000..cb012016b --- /dev/null +++ b/docs/project/roadmap-history.md @@ -0,0 +1,71 @@ +# Historical roadmap + +This snapshot preserves the previous roadmap, including its original wording and checkbox states. It is a historical record, not a list of supported APIs, accepted capabilities or current priorities. English and Chinese snapshots retain their original differences. Use the [current roadmap](roadmap.md) for supported behavior and remaining acceptance. + +--- + +## Current modernization + +- [x] Complete the `include/ark/`, `src/` and `src/plugins//` layout and snake_case API migration, including Protobuf source naming. +- [x] Release native single-node MySQL and Redis clients in arknet 0.2.0. +- [ ] Replace ark database plugins' legacy drivers, with Asio coroutine entry points, native arknet owning results and module-thread completion. +- [ ] Integrate the remaining independent official plugins with optional builds and tests. +- [ ] Review Nimbus documentation locally while preserving existing articles and entry points. + +Hot-update discussions and implementation are deferred. The original planning list below retains its historical checkbox state; it is not a current API or capability list. Use the current items above, source code and acceptance records to determine implementation status. + +## High priority + +- [ ] Put all schemas in one Excel workbook and keep other configuration tables separate, while remaining compatible with the existing format. +- [x] Unify code style. +- [ ] Connect to logserver before process startup and fail startup if the connection cannot be established, so logging is available from the beginning. +- [x] Upgrade spdlog. +- [ ] Add a dirty data layer that batches changed data after each client request, instead of sending every change separately in small packets with repeated protocol headers. +- [ ] Complete documentation for concepts, design principles, server architecture and usage examples. +- [x] Align all basic data structures with C++ containers. +- [ ] Add service registry support, considering etcd or consul. +- [ ] Use timers for periodic logs and heartbeats instead of update and HeartBeat. +- [ ] Update configuration packaging: edit in Excel and generate `csv` files for the project to read. Use contributor-specific suffixes such as Item.A.xlsx and Item.B.xlsx to reduce collaboration conflicts. +- [ ] ~~Control plugin loading order through configuration fields or configuration order.~~ +- [x] Use the AFXml wrapper instead of accessing rapidxml directly. +- [x] Simplify interface class design. +- [ ] Generate repetitive code (_plugin and module classes_). + +## Low priority + +- [ ] Update protocol and client handling for Map and Layer (**the concepts have changed; client integration is pending**). +- [ ] Use a different approach to sorting and swapping entries in inventory tables. +- [ ] Reduce data synchronization traffic: remove repeated strings such as `NodeName` and `TableName`, send index-to-name mappings at login, then use indices for updates and names for persistence. +- [ ] Extend DataTable to support more complex structures, such as items containing gems with experience and enchantments, or weapons with random attributes. The existing fixed two-dimensional structure is difficult to extend. +- [ ] Add network library and performance benchmarks under benchmark/unittest. +- [ ] Add kcp. +- [ ] Use SWIG for the scripting module. +- [ ] Evaluate ECS: represent all objects as entities and use GUIDs to identify their group and position for fast lookup. Research references include Overwatch, ET and [ECS-unity](https://github.com/sschmid/Entitas-CSharp). +- [ ] Add coroutines, referring to libgo. +- [ ] Introduce tcmalloc. +- [ ] Add a monitoring web page using vue-admin. +- [ ] Add a Deployment web tool. +- [ ] Add message queue processing. +- [ ] Add operations tools (tcm & deploy). +- [ ] Use multiple threads for selected CPU-intensive work. + +## Partially finished + +- [x] Add spdlog sinks that organize files by directory and rotate by size or hour (*partially changed; further changes are needed for the tlog format, /data/binlog/1001/20180627/game1_hour.log*). +- [x] Add consistent_hash_map (**added, not yet enabled**). + +## Finished + +- [x] Implement the new architecture. +- [x] Configure connection relationships instead of setting them manually in code (bus_relation, server_settting). Detect IP addresses and generate ports dynamically instead of specifying them, and express network addresses as URLs such as tcp://0.0.0.0:9001 and wss://0.0.0.0:9001. +- [x] Place Debug and Release binaries together under bin, with separate Debug and Release settings so they can share one configuration set. +- [x] Change guid to an internal pointer type to reduce memory use for other non-guid types. ***Changed to int64_t; the memory concern no longer applies.*** +- [x] Add a network plugin to separate network modules from application logic (NetClient and NetServer are still too closely coupled to application logic). +- [x] Add endpoint to the net plugin. +- [x] Merge the kernel and config plugins because kernel depends heavily on config. + +## Bugs + +- [ ] ClearRow shifts subsequent row indices. Either preserve the indices and clear only the row contents, or have the client update subsequent indices when it receives DeleteRow. +- [x] Fix ConfigPlugin data loading. +- [x] Fix the return values of AFMapEx First and Next. diff --git a/docs/project/roadmap-history_CN.md b/docs/project/roadmap-history_CN.md new file mode 100644 index 000000000..6a5eb24f3 --- /dev/null +++ b/docs/project/roadmap-history_CN.md @@ -0,0 +1,88 @@ +# 历史路线图 + +本页保留原路线图的文字与勾选状态,仅供追溯,不作为支持的 API、已验收能力或当前优先级清单。中英文快照保留原有差异。支持范围与剩余验收见[当前路线图](roadmap_CN.md)。 + +--- + +## 当前改造 + +- [x] 完成 `include/ark/`、`src/` 与 `src/plugins/<名称>/` 的目录整理和 snake_case 接口迁移,包含 Protobuf 源码命名。 +- [x] 随 arknet 0.2.0 发布原生 MySQL、Redis 单节点客户端。 +- [ ] 替换 ark 数据库插件的旧驱动,提供 Asio 协程入口,直接使用 arknet 拥有型结果,并在模块线程恢复。 +- [ ] 整合其余独立官方插件,按需构建并补齐测试。 +- [ ] 在本地审阅 Nimbus 文档,保留原有文章和入口。 + +业务热更新的讨论与实现暂缓。下方保留原有规划的历史勾选状态,不作为当前 API 或能力清单;当前实现以以上条目、源码和验收记录为准。 + +## High priority + +- [x] excel格式修改为一张excel里放所有的schema,其他配置表分开来写,兼容现在的格式 +- [x] 调整代码风格统一 +- [x] spdlog升级 +- [x] 增加dirty data layer, 当一个客户端请求处理完成后统一下发变化数据,不能有变有发,会导致小包太碎,并且浪费协议的head(改为非实时数据下一帧统一发送,实时数据有变有发) +- [ ] 文档逐步补齐,概念介绍、设计理念、服务器架构、使用例子 +- [x] 所有的基础数据结构向C++容器看齐 +- [x] 服务中心注册(考虑etcd/consul来做), 已经使用consul来处理了 +- [x] 定时log和心跳改为timer方式,不要再是用update和HeartBeat了 +- [x] 修改配置打包工具(用Excel编辑,生成`xml`来给工程读取。为解决多人协作冲突, excel可以用名字后缀区分,类如Item.A.xlsx Item.B.xlsx) +- [x] 修改xml不再直接用rapidxml,用封装后的AFXml +- [x] 接口类重新设计纯粹化 +- [x] 增加生成器来生成重复代码(_插件类和模块类_) +- [x] 使用`std::chrono`改造`AFDateTime` +- [x] session id 使用GUID类型 +- [x] 增加murmur hash函数用来做consistent hash map +- [x] 增加xoshiro/xoroshiro随机算法 +- [x] 增加xxtea, crc16, crc32, crc64加密算法 +- [ ] 增加codec类,用来剥离框架对特定协议的依赖,方便外部替换协议类型 +- [ ] 增加插件动态热更新 +- [ ] 增加工具获取插件动态链接库版本号 +- [x] Linux下强杀进程处理(kill -9 xxx) +- [ ] 配置meta和entity meta的区分 +- [ ] 网络修改为asio系 +- [ ] web serever/client修改为asio/beast系 +- [ ] Redis 插件接入 arknet 自主实现的 Redis 客户端 + +## Low priority + +- [x] Map, Layer,对应修改协议和Client的处理(**概念已经修改, 还未对接客户端**) +- [x] 关于背包类的table,整理或者交换,需要改成别的方式 +- [x] 优化数据同步的流量,减小属性同步的体积(去掉`NodeName`和`TableName`类似的string同步, 上线先同步index和name的映射,后续全部用index下发,入库用name) +- [x] 拓展DataTable的组成,例如道具包含了宝石(带经验,附魔等)、武器(带随机属性)等东西,DataTable现有的二维结构是特定的,不方便做扩展 +- [ ] 增加网络库和性能的基准测试用例,放到目录benchmark/unittest +- [ ] 增加kcp +- [ ] 脚本模块使用SWIG +- [x] 考虑使用ECS,全部对象Entity化,~~通过GUID来确定属于哪个分组的哪个位置,能快速定位和查找(通过守望先锋、ET、[ECS-unity](https://github.com/sschmid/Entitas-CSharp),具体还要再调研)~~ +- [ ] 增加coroutine,参考libgo +- [ ] 引入tcmalloc +- [ ] 增加监控web页面(ant-design-for-vue) +- [ ] 增加Deployment web工具 +- [ ] ~~增加消息队列处理~~ +- [ ] 增加运维工具(tcm & deploy) +- [ ] 部分计算密集的地方使用多线程 +- [ ] 增加协议wrapper层,这样框架层包装后,可以甩出来给业务用,无需知道业务层用的协议类型 +- [ ] ~~升级至C++17~~ +- [ ] ~~`std::string_veiw`/`discard`/...~~ +- [ ] ~~插件加载顺序(通过配置中的字段, 或者通过配置的顺序)~~ +- [ ] ~~修改进程启动优先链接logserver,如果logserver连不上,则直接不能启动,这样就可以从一开始就能打log了~~ + +## Part finished + +- [x] spdlog增加按照文件夹/大小/小时滚动的sink(*已经修改了一部分,还需要进一步修改成tlog的格式,/data/binlog/1001/20180627/game1_hour.log*) +- [x] 增加consistent_hash_map + +## Finished + +- [x] 新架构修改 +- [x] 增加连接关系的配置,不再通过程序中手动设置关系(bus_relation, server_settting, IP和port不用再指定了, 通过获取IP和动态生成port), 网络地址修改为tcp://0.0.0.0:9001 wss://0.0.0.0:9001这样的URL +- [x] 修改bin文件夹debug和release在一起,debug和release分开配置(方便配置是一套) +- [x] guid改为内部指针类型(降低其他非guid类型的内存占用)***修改为int64_t了,不需要再考虑内存占用了*** +- [x] 增加网络插件,这样可以将网络模块和业务逻辑模块拆分开(现在NetClient和NetServer还是跟业务关联太紧密了) +- [x] net plugin增加endpoint +- [x] kernel和config插件还是得合并为一个,因为kernel非常依赖config插件 + +## Bugs + +- [x] ClearRow的时候后面的行号会变化,所以要考虑要么行号不变,只是置空,要么就得客户端来根据DeleteRow消息同步修改后续的row变化 +- [x] 现在的ConfigPlugin数据加载有问题 +- [x] AFMapEx的First Next返回值有问题 +- [ ] 单个进程开多个监听服务,busid会被覆盖和连接管理有问题 diff --git a/docs/project/roadmap.md b/docs/project/roadmap.md index 36c0b28ed..0b1f720ea 100644 --- a/docs/project/roadmap.md +++ b/docs/project/roadmap.md @@ -1,67 +1,26 @@ # Roadmap -## Current modernization +This page distinguishes supported source behavior from remaining design and deployment acceptance. C++20 is the build baseline; it does not mean every modernization or optional integration is complete. The [historical roadmap](roadmap-history.md) preserves the previous planning list and its checkbox states. -- [x] Complete the `include/ark/`, `src/` and `src/plugins//` layout and snake_case API migration, including Protobuf source naming. -- [x] Release native single-node MySQL and Redis clients in arknet 0.2.0. -- [ ] Replace ark database plugins' legacy drivers, with Asio coroutine entry points, native arknet owning results and module-thread completion. -- [ ] Integrate the remaining independent official plugins with optional builds and tests. -- [ ] Review Nimbus documentation locally while preserving existing articles and entry points. +## Supported behavior -Hot-update discussions and implementation are deferred. The original planning list below retains its historical checkbox state; it is not a current API or capability list. Use the current items above, source code and acceptance records to determine implementation status. +- Core code lives in `src/core/`, the launcher in `src/application/`, shared manifest/configuration reading in `src/config/`, and official plugin headers and implementation together in `src/plugins//`. Explicit CMake public-header mappings preserve `` include paths. See [project layout and public interfaces](../reference/directory-structure.md) for targets, rebuild requirements and optional plugin boundaries. +- Public [MySQL](../reference/mysql.md) and [Redis](../reference/redis.md) modules use arknet native clients through Asio coroutine entry points. Inputs and results own their storage; manager-owned task groups resume on the module owner thread. MySQL includes prepared statements and transactions; Redis includes commands and pipelines. Legacy database drivers are no longer the public plugin interface. +- Startup callbacks propagate the first failure. The launcher reports the failed phase and exits with code `1` before the update loop. Shutdown stops managed task admission, drains accepted tasks and waits for module readiness. A configured cooperative wait timeout retains the process/resources and disables unloading. These behaviors do not provide partial-startup rollback or a hard process-stop deadline. See [application startup and shutdown](../guides/applications.md) and [managed tasks](../guides/tasks.md). -## High priority +The four public database service/failure modes passed against isolated Redis and MySQL servers on macOS. The [database service acceptance record](../guides/database-validation.md) identifies the tested revisions, environment and exact scope; those results do not cover every deployment or current source revision. -- [ ] Put all schemas in one Excel workbook and keep other configuration tables separate, while remaining compatible with the existing format. -- [x] Unify code style. -- [ ] Connect to logserver before process startup and fail startup if the connection cannot be established, so logging is available from the beginning. -- [x] Upgrade spdlog. -- [ ] Add a dirty data layer that batches changed data after each client request, instead of sending every change separately in small packets with repeated protocol headers. -- [ ] Complete documentation for concepts, design principles, server architecture and usage examples. -- [x] Align all basic data structures with C++ containers. -- [ ] Add service registry support, considering etcd or consul. -- [ ] Use timers for periodic logs and heartbeats instead of update and HeartBeat. -- [ ] Update configuration packaging: edit in Excel and generate `csv` files for the project to read. Use contributor-specific suffixes such as Item.A.xlsx and Item.B.xlsx to reduce collaboration conflicts. -- [ ] ~~Control plugin loading order through configuration fields or configuration order.~~ -- [x] Use the AFXml wrapper instead of accessing rapidxml directly. -- [x] Simplify interface class design. -- [ ] Generate repetitive code (_plugin and module classes_). +## Remaining acceptance and design -## Low priority +| Area | Remaining work and acceptance boundary | +| --- | --- | +| Database deployment | Run separate real-service acceptance for request cancellation, server termination and dynamic-library unloading. Add target-environment and cross-machine capacity evidence before making deployment or capacity claims. Local protocol endpoints and construction checks do not replace these runs. | +| Startup and shutdown | Partial-startup rollback is not provided. A common dependency-aware shutdown protocol remains design work; managed task drain alone does not prove that arbitrary callbacks, native workers or background cleanup have ended. Define ownership and admission phases before extending unload guarantees. | +| Optional plugins | Kafka construction/export checks do not test broker delivery, flush behavior or service interoperability; its driver build needs independent platform acceptance. OSS SDK remains a scaffold without client/request functionality. Physic retains the explicit unsupported legacy PhysX 3 configuration failure. See [optional plugin boundaries](../reference/directory-structure.md). | +| C++20 modernization | Review each remaining module and optional integration against its own API, build and runtime requirements. The language baseline, header layout and focused construction checks do not establish completion of the whole modernization. | -- [ ] Update protocol and client handling for Map and Layer (**the concepts have changed; client integration is pending**). -- [ ] Use a different approach to sorting and swapping entries in inventory tables. -- [ ] Reduce data synchronization traffic: remove repeated strings such as `NodeName` and `TableName`, send index-to-name mappings at login, then use indices for updates and names for persistence. -- [ ] Extend DataTable to support more complex structures, such as items containing gems with experience and enchantments, or weapons with random attributes. The existing fixed two-dimensional structure is difficult to extend. -- [ ] Add network library and performance benchmarks under benchmark/unittest. -- [ ] Add kcp. -- [ ] Use SWIG for the scripting module. -- [ ] Evaluate ECS: represent all objects as entities and use GUIDs to identify their group and position for fast lookup. Research references include Overwatch, ET and [ECS-unity](https://github.com/sschmid/Entitas-CSharp). -- [ ] Add coroutines, referring to libgo. -- [ ] Introduce tcmalloc. -- [ ] Add a monitoring web page using vue-admin. -- [ ] Add a Deployment web tool. -- [ ] Add message queue processing. -- [ ] Add operations tools (tcm & deploy). -- [ ] Use multiple threads for selected CPU-intensive work. +## Deferred directions -## Partially finished +Registry design and business-plugin hot update remain paused. In-flight work, state ownership, dependency order and compatibility need an agreed design before implementation or broader unload claims. Business-configuration export changes are also deferred; the shared application-manifest reader does not replace business-resource formats or their export tools. -- [x] Add spdlog sinks that organize files by directory and rotate by size or hour (*partially changed; further changes are needed for the tlog format, /data/binlog/1001/20180627/game1_hour.log*). -- [x] Add consistent_hash_map (**added, not yet enabled**). - -## Finished - -- [x] Implement the new architecture. -- [x] Configure connection relationships instead of setting them manually in code (bus_relation, server_settting). Detect IP addresses and generate ports dynamically instead of specifying them, and express network addresses as URLs such as tcp://0.0.0.0:9001 and wss://0.0.0.0:9001. -- [x] Place Debug and Release binaries together under bin, with separate Debug and Release settings so they can share one configuration set. -- [x] Change guid to an internal pointer type to reduce memory use for other non-guid types. ***Changed to int64_t; the memory concern no longer applies.*** -- [x] Add a network plugin to separate network modules from application logic (NetClient and NetServer are still too closely coupled to application logic). -- [x] Add endpoint to the net plugin. -- [x] Merge the kernel and config plugins because kernel depends heavily on config. - -## Bugs - -- [ ] ClearRow shifts subsequent row indices. Either preserve the indices and clear only the row contents, or have the client update subsequent indices when it receives DeleteRow. -- [x] Fix ConfigPlugin data loading. -- [x] Fix the return values of AFMapEx First and Next. +Historical ideas in the archive are not automatically scheduled work. Future scope should name the affected API or deployment, its prerequisites and concrete acceptance evidence before it is promoted into this roadmap. diff --git a/docs/project/roadmap_CN.md b/docs/project/roadmap_CN.md index a089a6b9f..55895a2d5 100644 --- a/docs/project/roadmap_CN.md +++ b/docs/project/roadmap_CN.md @@ -1,84 +1,26 @@ # 路线图 -## 当前改造 +本页区分源码支持的行为与尚缺的设计、部署验收。C++20 是构建基线,不代表全部现代化改造或可选集成都已完成。[历史路线图](roadmap-history_CN.md)保留原规划清单与勾选状态。 -- [x] 完成 `include/ark/`、`src/` 与 `src/plugins/<名称>/` 的目录整理和 snake_case 接口迁移,包含 Protobuf 源码命名。 -- [x] 随 arknet 0.2.0 发布原生 MySQL、Redis 单节点客户端。 -- [ ] 替换 ark 数据库插件的旧驱动,提供 Asio 协程入口,直接使用 arknet 拥有型结果,并在模块线程恢复。 -- [ ] 整合其余独立官方插件,按需构建并补齐测试。 -- [ ] 在本地审阅 Nimbus 文档,保留原有文章和入口。 +## 支持的行为 -业务热更新的讨论与实现暂缓。下方保留原有规划的历史勾选状态,不作为当前 API 或能力清单;当前实现以以上条目、源码和验收记录为准。 +- 核心代码位于 `src/core/`,启动器位于 `src/application/`,共享清单与配置读取位于 `src/config/`,官方插件的头文件与实现共置于 `src/plugins//`。CMake 显式公开头文件映射保留 `` 包含路径。目标、重建要求和可选插件边界见[项目布局与公开接口](../reference/directory-structure_CN.md)。 +- 公开 [MySQL](../reference/mysql_CN.md) 与 [Redis](../reference/redis_CN.md) 模块通过 Asio 协程入口使用 arknet 原生客户端。输入与结果拥有自身存储;管理器拥有的任务组在模块所属线程恢复。MySQL 提供预处理语句与事务,Redis 提供命令与流水线。旧数据库驱动已不再作为公开插件接口。 +- 启动回调的首个失败会向上传递。启动器报告失败阶段,在进入更新循环前以退出码 `1` 终止。停止时关闭托管任务接收,排空已接收任务并等待模块就绪。配置的协作式等待超时会保留进程和资源,并禁止卸载。这些行为不提供部分启动回滚,也不构成强制进程退出期限。见[应用启动与停止](../guides/applications_CN.md)和[托管任务](../guides/tasks_CN.md)。 -## High priority +公开数据库接口的四种正常/故障模式已在 macOS 上通过隔离 Redis 与 MySQL 真实服务验收。[数据库服务验收记录](../guides/database-validation_CN.md)列明测试版本、环境与范围;这些结果不覆盖所有部署环境或当前源码版本。 -- [x] excel格式修改为一张excel里放所有的schema,其他配置表分开来写,兼容现在的格式 -- [x] 调整代码风格统一 -- [x] spdlog升级 -- [x] 增加dirty data layer, 当一个客户端请求处理完成后统一下发变化数据,不能有变有发,会导致小包太碎,并且浪费协议的head(改为非实时数据下一帧统一发送,实时数据有变有发) -- [ ] 文档逐步补齐,概念介绍、设计理念、服务器架构、使用例子 -- [x] 所有的基础数据结构向C++容器看齐 -- [x] 服务中心注册(考虑etcd/consul来做), 已经使用consul来处理了 -- [x] 定时log和心跳改为timer方式,不要再是用update和HeartBeat了 -- [x] 修改配置打包工具(用Excel编辑,生成`xml`来给工程读取。为解决多人协作冲突, excel可以用名字后缀区分,类如Item.A.xlsx Item.B.xlsx) -- [x] 修改xml不再直接用rapidxml,用封装后的AFXml -- [x] 接口类重新设计纯粹化 -- [x] 增加生成器来生成重复代码(_插件类和模块类_) -- [x] 使用`std::chrono`改造`AFDateTime` -- [x] session id 使用GUID类型 -- [x] 增加murmur hash函数用来做consistent hash map -- [x] 增加xoshiro/xoroshiro随机算法 -- [x] 增加xxtea, crc16, crc32, crc64加密算法 -- [ ] 增加codec类,用来剥离框架对特定协议的依赖,方便外部替换协议类型 -- [ ] 增加插件动态热更新 -- [ ] 增加工具获取插件动态链接库版本号 -- [x] Linux下强杀进程处理(kill -9 xxx) -- [ ] 配置meta和entity meta的区分 -- [ ] 网络修改为asio系 -- [ ] web serever/client修改为asio/beast系 -- [ ] Redis 插件接入 arknet 自主实现的 Redis 客户端 +## 剩余验收与设计 -## Low priority +| 领域 | 剩余工作与验收边界 | +| --- | --- | +| 数据库部署 | 为请求取消、服务端终止和动态库卸载分别执行真实服务验收。发布部署或容量结论前,补充目标环境与跨机器容量证据。本机协议端点与构造检查不能替代这些验收。 | +| 启动与停机 | 框架不提供部分启动回滚。通用的依赖感知停机协议仍需设计;托管任务排空不代表任意回调、原生工作线程或后台清理均已结束。扩展卸载保证前,先明确所有权与接收阶段。 | +| 可选插件 | Kafka 构造/导出检查不验证 broker 投递、flush 行为或服务互通;驱动构建仍需独立平台验收。OSS SDK 保持骨架状态,不提供客户端/请求功能。Physic 保留旧版 PhysX 3 不受支持的显式配置失败。见[可选插件边界](../reference/directory-structure_CN.md)。 | +| C++20 改造 | 按各模块与可选集成的 API、构建和运行要求继续审查。语言基线、头文件布局和局部构造检查不足以证明全部改造完成。 | -- [x] Map, Layer,对应修改协议和Client的处理(**概念已经修改, 还未对接客户端**) -- [x] 关于背包类的table,整理或者交换,需要改成别的方式 -- [x] 优化数据同步的流量,减小属性同步的体积(去掉`NodeName`和`TableName`类似的string同步, 上线先同步index和name的映射,后续全部用index下发,入库用name) -- [x] 拓展DataTable的组成,例如道具包含了宝石(带经验,附魔等)、武器(带随机属性)等东西,DataTable现有的二维结构是特定的,不方便做扩展 -- [ ] 增加网络库和性能的基准测试用例,放到目录benchmark/unittest -- [ ] 增加kcp -- [ ] 脚本模块使用SWIG -- [x] 考虑使用ECS,全部对象Entity化,~~通过GUID来确定属于哪个分组的哪个位置,能快速定位和查找(通过守望先锋、ET、[ECS-unity](https://github.com/sschmid/Entitas-CSharp),具体还要再调研)~~ -- [ ] 增加coroutine,参考libgo -- [ ] 引入tcmalloc -- [ ] 增加监控web页面(ant-design-for-vue) -- [ ] 增加Deployment web工具 -- [ ] ~~增加消息队列处理~~ -- [ ] 增加运维工具(tcm & deploy) -- [ ] 部分计算密集的地方使用多线程 -- [ ] 增加协议wrapper层,这样框架层包装后,可以甩出来给业务用,无需知道业务层用的协议类型 -- [ ] ~~升级至C++17~~ -- [ ] ~~`std::string_veiw`/`discard`/...~~ -- [ ] ~~插件加载顺序(通过配置中的字段, 或者通过配置的顺序)~~ -- [ ] ~~修改进程启动优先链接logserver,如果logserver连不上,则直接不能启动,这样就可以从一开始就能打log了~~ +## 暂缓方向 -## Part finished +Registry 设计与业务插件热更新仍暂缓。扩展实现或卸载保证前,需要先确定在途任务、状态所有权、依赖顺序与兼容性设计。业务配置导出调整也暂缓;共享应用清单读取器不替换业务资源格式及其导出工具。 -- [x] spdlog增加按照文件夹/大小/小时滚动的sink(*已经修改了一部分,还需要进一步修改成tlog的格式,/data/binlog/1001/20180627/game1_hour.log*) -- [x] 增加consistent_hash_map - -## Finished - -- [x] 新架构修改 -- [x] 增加连接关系的配置,不再通过程序中手动设置关系(bus_relation, server_settting, IP和port不用再指定了, 通过获取IP和动态生成port), 网络地址修改为tcp://0.0.0.0:9001 wss://0.0.0.0:9001这样的URL -- [x] 修改bin文件夹debug和release在一起,debug和release分开配置(方便配置是一套) -- [x] guid改为内部指针类型(降低其他非guid类型的内存占用)***修改为int64_t了,不需要再考虑内存占用了*** -- [x] 增加网络插件,这样可以将网络模块和业务逻辑模块拆分开(现在NetClient和NetServer还是跟业务关联太紧密了) -- [x] net plugin增加endpoint -- [x] kernel和config插件还是得合并为一个,因为kernel非常依赖config插件 - -## Bugs - -- [x] ClearRow的时候后面的行号会变化,所以要考虑要么行号不变,只是置空,要么就得客户端来根据DeleteRow消息同步修改后续的row变化 -- [x] 现在的ConfigPlugin数据加载有问题 -- [x] AFMapEx的First Next返回值有问题 -- [ ] 单个进程开多个监听服务,busid会被覆盖和连接管理有问题 +归档中的历史设想不自动成为排期任务。将新范围纳入路线图前,应明确受影响的 API 或部署、前置条件与具体验收证据。 diff --git a/docs/site/src/navigation.ts b/docs/site/src/navigation.ts index 2949f2b9b..0c2f1aa64 100644 --- a/docs/site/src/navigation.ts +++ b/docs/site/src/navigation.ts @@ -256,6 +256,11 @@ const tree: Entry[] = [ "project/roadmap", "Roadmap", "路线图" + ], + [ + "project/roadmap-history", + "Historical roadmap", + "历史路线图" ] ] },