Components Overview
Components under src/component/ all follow a "service + client SDK + protocol" trio pattern; a business
service simply links the corresponding SDK to use it.
| Component | Service | SDK | Description |
|---|---|---|---|
| dtmq | dtmq-proxysvr | dtmq-proxy-sdk / dtmq-common-sdk | Distributed message queue: channel subscription, message send/receive, WAL master-slave replication |
| distributed_transaction | dtcoordsvr | sdk/ | Distributed transaction (2PC): coordinator + participator/initiator handles |
| rank | rank_board_svr | sdk/ | Rank board: sharded boards, mirrors, WAL master-standby sync |
| orbit | controller / agent | Four SDKs | Orbit scheduling framework (controller/agent/server/client) |
Additionally:
GameSharedComponent/: shared pure algorithm libraries for games (BattleUtilityrandom numbers,ItemAlgorithminventory slot algorithms,Orbitclient-side runtime), with no standalone process;component/test/: component unit tests (ItemAlgorithmTest, etc.).
Common Component Structure
component/<name>/
├── protocol/ # Component protocol (pbdesc + config)
├── <name>-*svr/ # Service implementation (task action + data layer)
├── sdk/ # Client SDK (generated caller stubs + wrapped APIs)
└── CMakeLists.txt # Protocol target and RPC generation rules
The service's RPC handlers and task action skeletons are generated by Mako templates; the SDK contains the
generated caller-side code (*svrservice.atfw.gen.*) plus hand-wrapped, easy-to-use APIs.
Current Business Adoption
- lobbysvr has integrated dtmq (
logic/dtmq/task_action_channel_event_sync.*receives the channel event stream, typically used for chat channel delivery) and rank (rank/rank board queries); - rank_settlement_svr works with the rank component for periodic settlement;
- orbitsvr demonstrates the orbit component's server/client RPC.