{"id":15096077,"url":"https://github.com/xyhubl/yim","last_synced_at":"2026-02-06T02:31:33.273Z","repository":{"id":170935359,"uuid":"647145241","full_name":"xyhubl/yim","owner":"xyhubl","description":"长连接推送系统-server","archived":false,"fork":false,"pushed_at":"2023-06-25T09:46:12.000Z","size":156,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-12T05:07:35.850Z","etag":null,"topics":["chat","gin","im","push","tcp","websocket","yim"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xyhubl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-30T06:47:56.000Z","updated_at":"2023-06-20T10:54:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"bcfc2a9c-d0c0-4f1f-aee5-6160eb91ed4c","html_url":"https://github.com/xyhubl/yim","commit_stats":{"total_commits":56,"total_committers":2,"mean_commits":28.0,"dds":0.0535714285714286,"last_synced_commit":"e9f25fde020f5d3c0b7e575478921d7505f8f6ab"},"previous_names":["qq727366586/yim","qq727366586/xytool","xyhubl/yim","xyhubl/xytool"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/xyhubl/yim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyhubl%2Fyim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyhubl%2Fyim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyhubl%2Fyim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyhubl%2Fyim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xyhubl","download_url":"https://codeload.github.com/xyhubl/yim/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyhubl%2Fyim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29145832,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T01:13:33.096Z","status":"online","status_checked_at":"2026-02-06T02:00:08.092Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["chat","gin","im","push","tcp","websocket","yim"],"created_at":"2024-09-25T15:45:20.143Z","updated_at":"2026-02-06T02:31:33.229Z","avatar_url":"https://github.com/xyhubl.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YIM 聊天推送系统\n\n该项目可以业务于 推送、聊天等系统，鉴于goim 不怎么维护，所以复刻了此项目。欢迎感兴趣的伙伴一起维护(v: -Xy961025 ＋注明来意)。\n\n效果:\nhttp://120.27.141.27/h123/\nhttp://120.27.141.27/h124/\n\nComet:\n\n有状态服务，目前只支持ws通信(支持多节点部署)\n\nJob:\n\n消息分发层\n\nLogic:\n\nlogic路由层，目前实现单聊\n\n\n\n流程:\n\n客户端连接ws -\u003e auth- \u003e 建立连接\n\nlogic发送消息 -\u003e job分发 -\u003e comet发送消息到客户端\n\n\n\n需要环境:\n\nzookeeper kafka redis golang环境（建议\u003e=1.17） \n\n\n\n\n\n启动:\n\n**comet:**\n\n**docker build -t comet:v1 . -f Dockerfile_comet**\n\n**docker run -d  -p 8081:8081 -p 8083:8083 -it comet:v1  -config ./cmd/comet/dev/comet.yaml** \n\n\n\n**job:**\n\n**docker build -t job:v1 . -f Dockerfile_job**\n\n**docker run -d   job:v1  -config ./cmd/job/dev/job.yaml** \n\n\n\n**logic:**\n\n**docker build -t logic:v1 . -f Dockerfile_logic**\n\n**docker run -d  -p 8080:8080 -p 9091:9091 -it logic:v1  -config ./cmd/logic/dev/logic.yaml** \n\n\n\n消息协议：\n\n```\n| parameter             | is required  | type     | comment|\n| :-----                | :---         | :---     | :---       |\n| package length        | true  | int32 bigendian | package length |\n| header Length         | true  | int16 bigendian | header length |\n| ver                   | true  | int16 bigendian | Protocol version |\n| operation             | true |  int32 bigendian | Operation |\n| seq                   | true |  int32 bigendian | jsonp callback |\n| body                  | false | binary          | $(package lenth) - $(header length) |\n\n\n| operation     | comment | \n| :-----     | :---  |\n| 2 | Client send heartbeat|\n| 3 | Server reply heartbeat|\n| 7 | authentication request |\n| 8 | authentication response |\n```\n\n\n目前完成:\n1. 单聊、群聊\n\n后续规划:\n1. 离线消息存储漫游\n2. ack机制\n3. 等等..\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxyhubl%2Fyim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxyhubl%2Fyim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxyhubl%2Fyim/lists"}