/mixmicro-openim

Mixmicro OpenIM System is a distributed messaging and streaming platform with low latency, high performance and reliability, trillion-level capacity and flexible scalability

Primary LanguageJavaGNU Lesser General Public License v3.0LGPL-3.0

🥳 Mixmicro OpenIM


Mixmicro+ OpenIM is a distributed messaging and streaming platform with low latency, high performance and reliability, trillion-level capacity and flexible scalability.

It offers a variety of features:

  • Group & Topic message model
  • Pub/Sub messaging model
  • Message retroactivity by time or offset
  • Flexible distributed scale-out deployment architecture
  • Lightning-fast batch message exchange system
  • Efficient pull&push consumption model
  • Docker images for isolated testing and cloud isolated clusters
  • Scheduled message delivery
  • Log collection for streaming
  • Big data integration
  • Reliable FIFO and strict ordered messaging in the same queue
  • Million-level message accumulation capacity in a single queue
  • Feature-rich administrative dashboard for configuration, metrics and monitoring

RoadMap

Master Server

Naming server , support client load-balance ,query & execute endpoints;

Cluster Server

  • Protocol Support

    • TCP
    • R-UDP
    • WebSocket
  • Develop Kit

    • JDK SDK Kit
    • Android SDK Kit
    • NodeJS SDK Kit

Push Server

  • Protocol Support

    • R-UDP
  • Develop Kit

    • JDK SDK Kit
    • Android SDK Kit

Message Queue Server

Message Queue Server ,support topic ,queue ...

Endpoint Client

Development Kit for application to use master endpoint , like:

  • Group Management
  • Group Member Refs Management
  • Send Message Apis
  • Media Message Api

Quick-start

building

Core Library

Storage Component

MongoDB

Document storage database;

WARN Mongo4.x Single Cluster not support transaction.

Docker Running

  # pull images
  docker pull mongo
  
  # start container
  docker run -p 27017:27017 -v /mixmicro/data/mongo:/data/db --name docker_mongodb -d mongo
  

Deploy MongoDB CLuster Replica

  # 创建数据目录
  mkdir /mixmicro/replica-datas/cluster{1..3} -pv
  ...
  ...

Detail @See MongoDB Development Doc

MySQL (Removed)

The MySQL v1 component currently is only tested with MySQL 5.6-7. It is designed to be easy to understand, and get started with. For example, it deconstructs spans into columns, so you can perform ad-hoc queries using SQL. However, this component has known performance issues: queries will eventually take seconds to return if you put a lot of data into it.

Running in Docker

  • Pull Master & Cluster images
docker pull docker.apiacmed.com/library/remoting-master:2.3.2-BUILD.SNAPSHOT
docker pull docker.apiacmed.com/library/remoting-server-wss:2.3.2-BUILD.SNAPSHOT
  • Startup All

注意: Master需要映射宿主机端口: 13111 & 13110 , Cluster需要映射到宿主机端口: 23111 & 8888

192.168.1.151

# 启动 Master 
docker run -p 13111:13111 -p 13110:13110 \ 
    --net docker-br0 --ip 172.172.1.155 \ 
    --add-host node1.mongodb.mixmicro.com:172.172.0.103 \ 
    --add-host node2.mongodb.mixmicro.com:172.172.0.104 \ 
    --add-host node3.mongodb.mixmicro.com:172.172.0.105 \ 
    -d -v /tmp/logs/remoting-master:/remoting-master/logs \ 
    --name remoting-master docker.apiacmed.com/library/remoting-master:2.3.2-BUILD.SNAPSHOT

# 启动 Cluster

docker run -p 43111:43111 -p 23111:23111 -p 33111:33111 -p 8888:8888 \ 
    --net docker-br0 --ip 172.172.1.160 \ 
    --env WSS_HOST=192.168.1.151 \ 
    --env NEWIM_MASTER_ADDR=172.172.0.155:13111,172.172.1.155:13111 \ 
    --env WSS_PORT=8888 \ 
    --add-host gateway.mixmicro.com:172.172.1.108 \ 
    --add-host node1.mongodb.mixmicro.com:172.172.0.103 \ 
    --add-host node2.mongodb.mixmicro.com:172.172.0.104 \
    --add-host node3.mongodb.mixmicro.com:172.172.0.105 \ 
    -d -v /tmp/logs/remoting-server-wss:/remoting-server-wss/logs \ 
    --name remoting-server-wss docker.apiacmed.com/library/remoting-server-wss:2.3.2-BUILD.SNAPSHOT

192.168.1.152

# 启动Master
docker run -p 13111:13111 -p 13110:13110 \ 
    --net docker-br0 --ip 172.172.0.155 \ 
    --add-host node1.mongodb.mixmicro.com:172.172.0.103 \ 
    --add-host node2.mongodb.mixmicro.com:172.172.0.104 \ 
    --add-host node3.mongodb.mixmicro.com:172.172.0.105 \ 
    -d -v /tmp/logs/remoting-master:/remoting-master/logs \ 
    --name remoting-master docker.apiacmed.com/library/remoting-master:2.3.2-BUILD.SNAPSHOT

# 启动 Cluster

docker run -p 43111:43111 -p 23111:23111 -p 33111:33111 -p 8888:8888 \ 
    --net docker-br0 --ip 172.172.0.160 \ 
    --env WSS_HOST=192.168.1.151 \ 
    --env NEWIM_MASTER_ADDR=172.172.0.155:13111,172.172.1.155:13111 \ 
    --env WSS_PORT=8888 \ 
    --add-host gateway.mixmicro.com:172.172.1.108 \ 
    --add-host node1.mongodb.mixmicro.com:172.172.0.103 \ 
    --add-host node2.mongodb.mixmicro.com:172.172.0.104 \
    --add-host node3.mongodb.mixmicro.com:172.172.0.105 \ 
    -d -v /tmp/logs/remoting-server-wss:/remoting-server-wss/logs \ 
    --name remoting-server-wss docker.apiacmed.com/library/remoting-server-wss:2.3.2-BUILD.SNAPSHOT

Running the server from source

  • Building
  git clone https://www.github.com/miss Elve I/Mixmicro-OpenIM.git
  cd Mixmicro-OpenIM
  mvn clean install -DskipTests=true
  • Running

Master server

  cd remoting-master/target/
  unzip remoting-master-*.zip -d remoting-master-server
  cd remoting-master-server
  
  # startup
  sh bin/startup.sh -e dev -p test

Cluster server

  cd remoting-server-wss/target/
  unzip remoting-server-wss-*.zip -d remoting-server-wss
  cd remoting-server-wss
  
  # startup
  sh bin/startup.sh -e dev -p test

Plans

Thanks