{"id":13469953,"url":"https://github.com/Terry-Mao/goim","last_synced_at":"2025-03-26T09:31:46.569Z","repository":{"id":31292538,"uuid":"34854605","full_name":"Terry-Mao/goim","owner":"Terry-Mao","description":"goim","archived":false,"fork":false,"pushed_at":"2023-05-05T02:28:56.000Z","size":12750,"stargazers_count":7194,"open_issues_count":63,"forks_count":1782,"subscribers_count":397,"default_branch":"master","last_synced_at":"2024-10-29T14:59:38.985Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://goim.io/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Terry-Mao.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2015-04-30T13:01:32.000Z","updated_at":"2024-10-28T09:33:48.000Z","dependencies_parsed_at":"2023-01-14T18:44:12.362Z","dependency_job_id":"24deb16c-93d9-484a-9403-429f6c2403fc","html_url":"https://github.com/Terry-Mao/goim","commit_stats":{"total_commits":512,"total_committers":48,"mean_commits":"10.666666666666666","dds":0.552734375,"last_synced_commit":"1800484a45334ace0bfa63a56ab9cbbbb4b22dca"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Terry-Mao%2Fgoim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Terry-Mao%2Fgoim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Terry-Mao%2Fgoim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Terry-Mao%2Fgoim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Terry-Mao","download_url":"https://codeload.github.com/Terry-Mao/goim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222131035,"owners_count":16936304,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T16:00:19.584Z","updated_at":"2024-10-29T23:31:44.918Z","avatar_url":"https://github.com/Terry-Mao.png","language":"Go","funding_links":[],"categories":["开源类库","Go","Misc","Open source library","Other"],"sub_categories":["即时通信","Instant Messages","General Purpose Libraries"],"readme":"goim v2.0\n==============\n\n[![Language](https://img.shields.io/badge/Language-Go-blue.svg)](https://golang.org/)\n[![Build Status](https://github.com/Terry-Mao/goim/workflows/Go/badge.svg)](https://github.com/Terry-Mao/goim/actions)\n[![GoDoc](https://godoc.org/github.com/go-kratos/kratos?status.svg)](https://pkg.go.dev/github.com/Terry-Mao/goim)\n[![Go Report Card](https://goreportcard.com/badge/github.com/Terry-Mao/goim)](https://goreportcard.com/report/github.com/Terry-Mao/goim)\n\ngoim is an im server writen in golang.\n\n## Features\n * Light weight\n * High performance\n * Pure Golang\n * Supports single push, multiple push and broadcasting\n * Supports one key to multiple subscribers (Configurable maximum subscribers count)\n * Supports heartbeats (Application heartbeats, TCP, KeepAlive, HTTP long pulling)\n * Supports authentication (Unauthenticated user can't subscribe)\n * Supports multiple protocols (WebSocket，TCP，HTTP）\n * Scalable architecture (Unlimited dynamic job and logic modules)\n * Asynchronous push notification based on Kafka\n\n## Architecture\n![arch](./docs/arch.png)\n\n## Quick Start\n\n### Build\n```\n    make build\n```\n\n### Run\n```\n    make run\n    make stop\n\n    // or\n    nohup target/logic -conf=target/logic.toml -region=sh -zone=sh001 -deploy.env=dev -weight=10 2\u003e\u00261 \u003e target/logic.log \u0026\n    nohup target/comet -conf=target/comet.toml -region=sh -zone=sh001 -deploy.env=dev -weight=10 -addrs=127.0.0.1 2\u003e\u00261 \u003e target/logic.log \u0026\n    nohup target/job -conf=target/job.toml -region=sh -zone=sh001 -deploy.env=dev 2\u003e\u00261 \u003e target/logic.log \u0026\n\n```\n### Environment\n```\n    env:\n    export REGION=sh\n    export ZONE=sh001\n    export DEPLOY_ENV=dev\n\n    supervisor:\n    environment=REGION=sh,ZONE=sh001,DEPLOY_ENV=dev\n\n    go flag:\n    -region=sh -zone=sh001 deploy.env=dev\n```\n### Configuration\nYou can view the comments in target/comet.toml,logic.toml,job.toml to understand the meaning of the config.\n\n### Dependencies\n[Discovery](https://github.com/bilibili/discovery)\n\n[Kafka](https://kafka.apache.org/quickstart)\n\n## Document\n[Protocol](./docs/protocol.png)\n\n[English](./README_en.md)\n\n[中文](./README_cn.md)\n\n## Examples\nWebsocket: [Websocket Client Demo](https://github.com/Terry-Mao/goim/tree/master/examples/javascript)\n\nAndroid: [Android](https://github.com/roamdy/goim-sdk)\n\niOS: [iOS](https://github.com/roamdy/goim-oc-sdk)\n\n## Benchmark\n![benchmark](./docs/benchmark.jpg)\n\n### Benchmark Server\n| CPU | Memory | OS | Instance |\n| :---- | :---- | :---- | :---- |\n| Intel(R) Xeon(R) CPU E5-2630 v2 @ 2.60GHz  | DDR3 32GB | Debian GNU/Linux 8 | 1 |\n\n### Benchmark Case\n* Online: 1,000,000\n* Duration: 15min\n* Push Speed: 40/s (broadcast room)\n* Push Message: {\"test\":1}\n* Received calc mode: 1s per times, total 30 times\n\n### Benchmark Resource\n* CPU: 2000%~2300%\n* Memory: 14GB\n* GC Pause: 504ms\n* Network: Incoming(450MBit/s), Outgoing(4.39GBit/s)\n\n### Benchmark Result\n* Received: 35,900,000/s\n\n[中文](./docs/benchmark_cn.md)\n\n[English](./docs/benchmark_en.md)\n\n## LICENSE\ngoim is is distributed under the terms of the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTerry-Mao%2Fgoim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTerry-Mao%2Fgoim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTerry-Mao%2Fgoim/lists"}