{"id":18739057,"url":"https://github.com/gaubee/gq","last_synced_at":"2025-10-26T00:49:50.712Z","repository":{"id":149112258,"uuid":"49044899","full_name":"Gaubee/GQ","owner":"Gaubee","description":"一个通过TCP协议注册Router、Controller、Model接口的架构","archived":false,"fork":false,"pushed_at":"2017-12-19T01:38:38.000Z","size":715,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-28T17:44:53.867Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/Gaubee.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":"2016-01-05T05:46:43.000Z","updated_at":"2021-12-18T09:35:08.000Z","dependencies_parsed_at":"2023-04-26T01:01:32.196Z","dependency_job_id":null,"html_url":"https://github.com/Gaubee/GQ","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gaubee%2FGQ","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gaubee%2FGQ/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gaubee%2FGQ/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gaubee%2FGQ/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gaubee","download_url":"https://codeload.github.com/Gaubee/GQ/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239616466,"owners_count":19669056,"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-11-07T15:32:33.707Z","updated_at":"2025-10-26T00:49:50.618Z","avatar_url":"https://github.com/Gaubee.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# QG\n\n## TODOLIST\n\n[ ] v1.0.0 ~ v2.0.0 接口的注册与协作\n  - [x] v1.1.0 实现Component，基于组件化（Component）的Application建设\n  - [ ] ~v1.2.0 将Component分为System级别和Application两个级别~\n  - [ ] ~v1.3.0 实现管理员对象，可接管System级别的对象~\n  - [x] v1.4.0 实现管理员管理Application对象\n  - [ ] v1.5.0 实现开发者对象，以及对应的审核流程。\n  - [ ] v1.6.0 实现MAC-ID的校验流程，使得服务可以安全地挂载到平台上，MAC-ID可以多次使用，从而实现负载均衡。\n  - [ ] v1.7.0 实现负载均衡的算法\n  - [ ] v1.8.0 实现接口权重分配，从而实现本地替代线上接口、线上接口暂停使用等功能。\n  - [ ] v1.9.0 使用pipe实现惰性传输，提升req-body、Component-bigData等对象的传输效率\n[ ] v2.0.0 ~ v3.0.0 应用平台的构建\n  - [ ] v2.0.0 实现开发者登录以及基础的应用管理\n  - [ ] v2.1.0 实现Router版本对比与搜索\n  - [ ] v2.2.0 实现插件的开发\n\n\n## 1. Application\n\n应用单元，可由管理员创建，并添加协作的开发者。\n应用根据MAC-ID来进行注册。\n在应用第一次启动的时候，提交MAC-ID后，开发者需要到平台上查看MAC-ID，并手动通过校验。\n\n## 2. Component\n\n组件，属于Application的一部分。\nQG的定位在于提供后台接口。而对于每一个Application，出于安全性考虑都有需要配置DOMAIN/URL-PATH白名单或黑名单。\n如果不配置，那么这个Application就可以被任意的DOMAIN/URL-PATH所访问，成为开放组件。\n\n## 3 Router\n\n路由，是一个Application对外的接口。\n路由之间没法像Component那样进行安全交互。毕竟是暴露到外部HTTP/TCP接口上的。所以如果是Application之间的通讯依然是要用Component的。但是如果是业务流程上的配合，Component之间缺少Router的功能。\n\n比如验证码与登录的配合。\n图形验证码的接口是`http://domain.com/vcode?session_to=login`。那么访问验证码后，验证码的正确值会写入到Session的login这个key中，那么执行登录的时候，登录Router去Session中取login的值进行校验即可。\n而这样验证码模块，依旧可以给其它模块配合使用，只要传递不同的session_to参数即可。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaubee%2Fgq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgaubee%2Fgq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaubee%2Fgq/lists"}