百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
G

goim

> 编程语言
开源

goim

7.4K stars0 点赞1 次浏览
访问官网GitHub

工具介绍

goim

goim v2.0

goim is an im server writen in 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

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 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.

Issues· 64 开放

查看全部 Issues在 GitHub 打开
  • #405

    将go版本升级到最新的1.23是否会有影响?

    更新于 2024年11月7日
  • #403

    ===========================================================================================

    更新于 2024年6月13日
  • #262

    kafka,建议换成 nats

    更新于 2024年5月8日
  • #390

    这么好的项目,好像很久没更新了。有点可惜啊!!

    更新于 2024年4月18日
  • #396

    discovery 是否可以将此服务发现注册换成其他服务? 这个 discovery 似乎早已不再维护。 而且除了 2.* 版本之外,其他版本都不兼容。

    更新于 2024年4月18日
  • #366

    一个房间的消息是否要广播到所有的 Comet?

    更新于 2024年1月10日
  • #401

    如果看代码时遇到困惑的地方,请问为什么这个地址 discovery://default/goim.logic 可以直接拨打?

    更新于 2023年11月6日
  • #355

    消息发送有疑问

    更新于 2023年10月7日
  • #402

    在线演示无法运行

    更新于 2023年9月20日
  • #391

    明显的逻辑问题,难道没有人发现吗?

    更新于 2023年8月4日

> 标签

Go

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年10月2日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言