📲cim(cross IM) 适用于开发者的分布式即时通讯系统

★ 9,491⑂ 2,856👁 385⑃ 89● 98▤ 9
JavaMITCreated 2018-05-20crossoverjie.top/categories/Netty/
More from this author
Download: v2.1.0v2.1.0 ↓2.1.02025-06-09
+0
Daily
9,491
stars
2,856
forks
385
watchers
89
prs
98
issues
9
releases

README

📘Introduction |📽Video Demo | 🏖TODO LIST | 🌈Architecture |💡Flow Chart|🌁Quick Start|👨🏻‍✈️Built-in Commands|🎤Chat|❓QA|💌Contact

中文文档




 V2.0
- [x] Upgrade to JDK17 & springboot3.0
- [x] Client SDK
- [ ] Client use picocli instead of springboot.
- [x] Support integration testing.
- [ ] Integrate OpenTelemetry .
- [ ] Support single node startup(Contains no components).
- [ ] Third-party components support replacement(Redis/Zookeeper, etc.).
- [ ] Support web client(websocket).
- [x] Support docker container.
- [ ] Support kubernetes operation.
- [ ] Supports binary client(build with golang).

 Introduction

CIM(CROSS-IM) is an IM (instant messaging) system for developers; it also provides some components to help developers build their own scalable IM.
Using CIM, you can achieve the following requirements:
- IM instant messaging system.
- Message push middleware for APP.
- Message middleware for IOT massive connection scenarios.

 If you have any questions during use or development, you can contact the author.

 Video Demo

 Click the links below to watch the video demo.

| YouTube | Bilibili|
| :------:| :------: |
| Group Chat Private Chat | Group Chat Private Chat |
|   | 

!demo.gif

 TODO LIST

 [x] Group Chat
 [x] Private Chat
 [x] Built-in Commands
 [x] Chat History Query
 [x] AI Mode
 [x] Efficient encoding/decoding with Google Protocol Buffer
 [x] Flexible horizontal scaling based on actual needs
 [x] Server-side automatic removal of offline clients
 [x] Client automatic reconnection
 [x] Delayed Messages
 [x] SDK development package
 [ ] Group categorization
 [ ] Offline messages
 [ ] Message encryption



 Architecture

!

- Each component in CIM is built using SpringBoot
  - Client build with cim-client-sdk
- Use Netty to build the underlying communication.
- MetaStore is used for registration and discovery of IM-server services.


 cim-server
IM server is used to receive client connections, message forwarding, message push, etc.
Support cluster deployment.

 cim-route

Route server; used to process message routing, message forwarding, user login, user offline, and some operation tools (get the number of online users, etc.).

 cim-client
IM client terminal, a command can be started and initiated to communicate with others (group chat, private chat).

 Flow Chart

!

- Server register to MetaStore
- Route subscribe MetaStore
- Client login to Route
  - Route get Server info from MetaStore
- Client open connection to Server
- Client1 send message to Route
- Route select Server and forward message to Server
- Server push message to Client2


 Quick Start

 Docker

The allin1 image comes with Zookeeper, Redis, cim-server, and cim-forward-route pre-installed, all managed by Supervisor for an out-of-the-box experience.

Supported platforms: linux/amd64, linux/arm64, linux/arm/v7

Port mapping:

| Port | Service | Description |
|------|---------|-------------|
| 2181 | Zookeeper | Service registration & discovery |
| 6379 | Redis | Data caching

Top issues

Latest release

v2.1.0 v2.1.0 2025-06-09
What's Changed
 Upgrade to protocol3 by @crossoverJie in https://github.com/crossoverJie/cim/pull/163
 Protocol add properties by @crossoverJie in https://github.com/crossoverJie/cim/pull/164
 [fix] Cross-platform compilation by @chenqwwq in https://github.com/crossoverJie/cim/pull/165
 feat: Support allin1 docker image by @crossoverJie in https://github.com/crossoverJie/cim/pull/169
 feat: Enhance messaging system with batch message support by @crossoverJie in https://github.com/crossoverJie/cim/pull/171
 Feat/offline msg by @Zdanquxunhuan in https://github.com/crossoverJie/cim/pull/170

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON