Overview of TangSengDaoDao Architecture
mainTangSengDaoDao is an enterprise-grade open-source instant messaging (IM) system. The architecture is split into two distinct layers to ensure simplicity, scalability, and high availability:
- Communication Layer (WuKongIM): Responsible for maintaining long connections, message delivery, and efficient message storage.
- Business Layer (TangSengDaoDao): Responsible for business logic such as friend relationships, group management, moments (朋友圈), and other IM-related business features.
Inter-layer Communication:
- WuKongIM to TangSengDaoDao: WuKongIM pushes chat-related data required by the business layer to TangSengDaoDao using a gRPC Webhook mechanism.
- TangSengDaoDao to WuKongIM: When TangSengDaoDao needs to deliver system messages, it calls the WuKongIM message sending APIs.
Client Interaction:
- Clients establish long connections with WuKongIM via an SDK for sending and receiving messages.
- Clients interact with TangSengDaoDao APIs to handle business logic like managing friends, groups, and moments.