{"id":37135535,"url":"https://github.com/snippetor/bingo","last_synced_at":"2026-01-14T15:48:14.743Z","repository":{"id":57555891,"uuid":"83291785","full_name":"snippetor/bingo","owner":"snippetor","description":"基于golang开发的高性能，高并发分布式框架。","archived":false,"fork":false,"pushed_at":"2018-09-12T11:00:12.000Z","size":7531,"stargazers_count":10,"open_issues_count":0,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-06-20T08:14:56.556Z","etag":null,"topics":["concurrent","distributed","framework","golang","service"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/snippetor.png","metadata":{"files":{"readme":"README-bak.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-27T09:23:04.000Z","updated_at":"2022-09-14T06:39:48.000Z","dependencies_parsed_at":"2022-09-10T17:02:00.846Z","dependency_job_id":null,"html_url":"https://github.com/snippetor/bingo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/snippetor/bingo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snippetor%2Fbingo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snippetor%2Fbingo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snippetor%2Fbingo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snippetor%2Fbingo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snippetor","download_url":"https://codeload.github.com/snippetor/bingo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snippetor%2Fbingo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28424964,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T15:24:48.085Z","status":"ssl_error","status_checked_at":"2026-01-14T15:23:41.940Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["concurrent","distributed","framework","golang","service"],"created_at":"2026-01-14T15:48:13.949Z","updated_at":"2026-01-14T15:48:14.701Z","avatar_url":"https://github.com/snippetor.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bingo\n基于golang开发的高性能，高并发分布式框架。\n* 高性能，使用原生和第三方高性能包作为底，比如fasthttp, gogoprotobuf等\n* 高并发，基于go语言的特性，尽量保留了并发、异步处理，减少同步处理，包括RPC，service等\n* 可扩展型，每个模块都有接口定义，可以轻松实现扩展\n* 可灵活配置，使用配置文件可以轻松运行多个服务；日志也可配置\n* 提供多种网络及编解码方式，目前网络支持http, tcp, websocket，编解码包括json和protobuf\n\n# 高性能组件\n* http服务使用[fasthttp](https://github.com/valyala/fasthttp)，具体性能数据可以参考[HTTP server performance comparison with net/http](https://github.com/valyala/fasthttp#http-server-performance-comparison-with-nethttp)\n* 编解码中protobuf使用[gogoprotobuf](https://github.com/gogo/protobuf)，并使用gogofaster模式，性能参考[Golang 序列化反序列化库的性能比较](https://github.com/smallnest/gosercomp)\n* RPC使用protobuf作为消息协议，性能更高，流量更小，减少各服务之间通信消耗\n* 尽量使用protobuf，不要使用json，bingo中使用的是原生json包，性能相比gogoprotobuf相差接近10倍，详细可参考[Golang 序列化反序列化库的性能比较](https://github.com/smallnest/gosercomp)\n\n# 日志配置\n```\n#-------------------------------------------------------------------\n# level 日志输出的最小等级\n# 0: Info [默认]\n# 1: Debug\n# 2: Warning\n# 3: Error\n#-------------------------------------------------------------------\n# outputType 输出类型\n# 1: 控制台(Console)\n# 2: 文件(File)\n# 3: 控制台+文件(Console+File) [默认]\n#-------------------------------------------------------------------\n# logFileOutputDir 文件输出路径，默认\".\"\n#-------------------------------------------------------------------\n# logFileRollingType 日志文件分割方式\n# 1: RollingDaily 按天分割一个日志文件 [默认]\n# 2: RollingSize 按固定大小分割日志文件\n# 3: RollingDaily+RollingSize\n#-------------------------------------------------------------------\n# logFileName 日志文件名，默认\"bingo\"\n#-------------------------------------------------------------------\n# logFileMaxSize 单个日志最大字节数，当包含RollingSize时生效，默认500MB\n# * 可用的单位有 KB,MB,GB,TB，没有\n#-------------------------------------------------------------------\n# logFileScanInterval 定时扫描文件间隔，检查是否达到分割条件，单位秒，默认1秒\n#-------------------------------------------------------------------\n# logFileNameDatePattern 日志文件名中日期的格式，默认20060102，\n# * 格式符合go标准日期格式化\n#-------------------------------------------------------------------\n# logFileNameExt 日志文件后缀，默认.log\n#-------------------------------------------------------------------\n\n#当前运行模式\nworkMode = dev\n\n[dev]\nlevel = 0\noutputType = 3\nlogFileOutputDir = .\nlogFileRollingType = 3\nlogFileName = dev\nlogFileNameDatePattern = 20060102\nlogFileNameExt = .log\nlogFileMaxSize = 1KB\nlogFileScanInterval = 3\n\n[prod]\nlevel = 2\noutputType = 2\nlogFileOutputDir = .\nlogFileRollingType = 3\nlogFileName = prod\nlogFileNameDatePattern = 20060102\nlogFileNameExt = .log\nlogFileMaxSize = 1GB\nlogFileScanInterval = 3\n```\n\n# 服务节点配置\n\n```\n{\n  \"domains\": [                  -- 所有物理机内网ip地址，用于RPC通信使用\n    \"192.168.1.128\"\n  ],\n  \"node\": [                     -- 所有服务节点\n    {\n      \"name\": \"master\",         -- 节点名称\n      \"model\": \"master\",        -- 节点模型名称，启动时将绑定golang类型\n      \"domain\": 0,              -- domains中的索引\n      \"rpc-port\": 9092          -- RPC监听端口，如果是RPC服务端，需要配置此项\n    },\n    {\n      \"name\": \"auth\",\n      \"model\": \"auth\",\n      \"domain\": 0,\n      \"service\": [              -- 对外服务，比如网关、认证服务器需要对外服务\n        {\n          \"name\":\"http8080\",    -- 对外服务名称\n          \"type\": \"http\",       -- 网络协议类型\n          \"port\": 8080          -- 端口\n        }\n      ]\n    },\n    {\n      \"name\": \"gate1\",\n      \"model\": \"gate\",\n      \"domain\": 0,\n      \"service\": [\n        {\n          \"name\":\"tcp9090\",\n          \"type\": \"tcp\",\n          \"port\": 9090,\n        }\n      ],\n      \"rpc-port\": 9091,\n      \"rpc-to\": [               -- RPC要连接的节点，RPC客户端需要配置\n        \"master\"\n      ]\n    },\n    {\n      \"name\": \"game1\",\n      \"model\": \"game\",\n      \"domain\": 0,\n      \"rpc-to\": [\n        \"master\",\n        \"gate1\"\n      ]\n    }\n  ]\n}\n```\n\n# 启动实例\n\n```\n* echo为发布的可执行文件\n\n# 启动echo.json中的master节点\necho start echo.json -n master \n\n# 启动echo.json中的所有节点，单机运行\necho start echo.json\n\n# 命令帮助\necho -h 或者 echo\n```\n\n# TODO\n\n * v0.1 重大重构\n ###[完成]\n * RPC，Service消息和webApi将使用MVC模式\n * 提供中间件扩展\n * 提供模块扩展，并内置数据库模型和数据库操作模块\n ###[未完成]\n * 增加bingo工具，提供配置文件编辑、app管理命令、调试和发布相关命令等\n * 修改配置文件格式为yaml\n * 将app转换为独立编译运行，目前是统一编译为一个可执行文件。\n * 增加监控app并提供后台管理\n\n# 示例\n[bingo-example](https://github.com/snippetor/bingo-example)\n\n\n# 开源协议\n\nBingo项目采用[Apache License v2](https://github.com/snippetor/bingo/LICENSE).发布","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnippetor%2Fbingo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnippetor%2Fbingo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnippetor%2Fbingo/lists"}