Skip to content
Branch: master
Clone or download
Latest commit af040a2 Apr 24, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
api fix benchmark and heartbeat Dec 30, 2018
benchmarks fix benchmark and heartbeat Dec 30, 2018
cmd fix discovery path Apr 19, 2019
docs update config Dec 28, 2018
examples update config Dec 28, 2018
internal Merge pull request #287 from withlin/patch-1 Apr 19, 2019
pkg add logic ut Dec 22, 2018
scripts Update and rename README to README.md Dec 20, 2018
.gitignore update goreleaser Jan 6, 2019
.goreleaser.yml update goreleaser Jan 6, 2019
.travis.yml fix lint Apr 19, 2019
CHANGELOG.md add changelog Jan 6, 2019
LICENSE Initial commit Apr 30, 2015
Makefile fix flag Jan 14, 2019
README.md fix discovery path Apr 19, 2019
README_cn.md fix docs Oct 30, 2018
README_en.md fix docs Oct 30, 2018
codecov.sh exclude docs&scripts Dec 20, 2018
go.mod fix golang source Apr 24, 2019
go.sum fix golang source Apr 24, 2019

README.md

goim v2.0

Build Status Go Report Card codecov

goim is a im server writen by golang.

Features

  • Light weight
  • High performance
  • Pure Golang
  • Supports single push, multiple push and broadcasting
  • Supports one key to multiple subscribers (Configurable maximum subscribers count)
  • Supports heartbeats (Application heartbeats, TCP, KeepAlive, HTTP long pulling)
  • Supports authentication (Unauthenticated user can't subscribe)
  • Supports multiple protocols (WebSocket,TCP,HTTP)
  • Scalable architecture (Unlimited dynamic job and logic modules)
  • Asynchronous push notification based on Kafka

Architecture

arch

Quick Start

Build

    make build

Run

    make run
    make stop

    // or
    nohup target/logic -conf=target/logic.toml -region=sh -zone=sh001 -deploy.env=dev -weight=10 2>&1 > target/logic.log &
    nohup target/comet -conf=target/comet.toml -region=sh -zone=sh001 -deploy.env=dev -weight=10 -addrs=127.0.0.1 2>&1 > target/logic.log &
    nohup target/job -conf=target/job.toml -region=sh -zone=sh001 -deploy.env=dev 2>&1 > target/logic.log &

Environment

    env:
    export REGION=sh
    export ZONE=sh001
    export DEPLOY_ENV=dev

    supervisor:
    environment=REGION=sh,ZONE=sh001,DEPLOY_ENV=dev

    go flag:
    -region=sh -zone=sh001 deploy.env=dev

Configuration

You can view the comments in target/comet.toml,logic.toml,job.toml to understand the meaning of the config.

Dependencies

Discovery

Kafka

Document

Protocol

English

中文

Examples

Websocket: Websocket Client Demo

Android: Android

iOS: iOS

Benchmark

benchmark

Benchmark Server

CPU Memory OS Instance
Intel(R) Xeon(R) CPU E5-2630 v2 @ 2.60GHz DDR3 32GB Debian GNU/Linux 8 1

Benchmark Case

  • Online: 1,000,000
  • Duration: 15min
  • Push Speed: 40/s (broadcast room)
  • Push Message: {"test":1}
  • Received calc mode: 1s per times, total 30 times

Benchmark Resource

  • CPU: 2000%~2300%
  • Memory: 14GB
  • GC Pause: 504ms
  • Network: Incoming(450MBit/s), Outgoing(4.39GBit/s)

Benchmark Result

  • Received: 35,900,000/s

中文

English

LICENSE

goim is is distributed under the terms of the MIT License.

You can’t perform that action at this time.