{"id":37150338,"url":"https://github.com/shockerjue/gffg","last_synced_at":"2026-01-14T17:45:08.361Z","repository":{"id":248652713,"uuid":"829289055","full_name":"shockerjue/gffg","owner":"shockerjue","description":"Natively implemented asynchronous RPC development framework based on the protobuf protocol includes the interfaces of various components. It can be better integrated with the service node management center, promethums, kafka and other components, and has high scalability.","archived":false,"fork":false,"pushed_at":"2025-12-03T13:52:39.000Z","size":4470,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-06T18:11:42.069Z","etag":null,"topics":["ai","asynchronous","native","protobuf","rpc-client","rpc-framework","rpc-server"],"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/shockerjue.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-07-16T06:21:51.000Z","updated_at":"2025-03-28T02:05:35.000Z","dependencies_parsed_at":"2025-03-28T03:29:13.228Z","dependency_job_id":null,"html_url":"https://github.com/shockerjue/gffg","commit_stats":null,"previous_names":["shockerjue/gffg"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/shockerjue/gffg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shockerjue%2Fgffg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shockerjue%2Fgffg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shockerjue%2Fgffg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shockerjue%2Fgffg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shockerjue","download_url":"https://codeload.github.com/shockerjue/gffg/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shockerjue%2Fgffg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28428932,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T16:38:47.836Z","status":"ssl_error","status_checked_at":"2026-01-14T16:34:59.695Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["ai","asynchronous","native","protobuf","rpc-client","rpc-framework","rpc-server"],"created_at":"2026-01-14T17:45:07.638Z","updated_at":"2026-01-14T17:45:08.334Z","avatar_url":"https://github.com/shockerjue.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gffg\nThe asynchronous RPC framework based on the protobuf protocol includes the interfaces of various components.It implements service registration, discovery, current limiting, and circuit breaking.The most important thing is that it can be developed secondary and expanded better. \u003cbr\u003e\u003cbr\u003e\n![Architecture](https://github.com/shockerjue/gffg/blob/master/docs/structure.png)\n\u003cbr\u003e\u003cbr\u003e\nIt can be expanded further and combined into a super application as follows.\n![Architecture](https://github.com/shockerjue/gffg/blob/master/docs/platom.png)\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n\n\n## Service manage\nUse polaris as the service registration center and management center. [polaris](https://github.com/polarismesh/polaris). The entire RPC service framework relies on Polaris, which serves as a route between services and is also used to provide service information.\n``` docker run\ndocker run -d --privileged=true -p 15010:15010 -p 8101:8101 -p 8100:8100 -p 8080:8080 -p 8090:8090 -p 8091:8091 -p 8093:8093 -p 8761:8761 -p 8848:8848 -p 9848:9848 -p 9090:9090 -p 9091:9091 polarismesh/polaris-standalone:latest\n```\n![Polaris](https://github.com/shockerjue/gffg/blob/master/docs/polaris.png)\n\u003cbr\u003e\u003cbr\u003e\nYou can also use your own service management and implement the corresponding interface to use custom service registration and discovery.\n```interface\ntype IRegistry interface {\n\tProvider(*node)\n\tConsumer()\n\tRegister(string, string)\n\tDestroy()\n\tGetNode(context.Context, string, string) (NodeInstance, error)\n\tLimiter(context.Context, string) error\n}\n```\n\u003cbr\u003e\u003cbr\u003e\n\n## Service Monitoring\nUse grafana to monitor the framework service nodes and track the status. Report monitoring information by Kafka.\n``` docker run - admin:admin\ndocker run -d --name=grafana -p 3000:3000 grafana/grafana-enterprise\n```\n\u003cbr\u003e\u003cbr\u003e\n\n## Kafka \nKafka is used for monitoring and reporting related\n``` kafka run \ndocker run -d -p 9092:9092 --name broker apache/kafka:latest\n```\n\u003cbr\u003e\u003cbr\u003e\n\n## Monitoring and reporting service\nSubscribe to the monitoring information of each service from Kafka, report the monitoring information to Promethums, and check the monitoring status of each node and interface.\n- [metricsvr](https://github.com/gfzwh/metricsvr)\n![grafana](https://github.com/shockerjue/gffg/blob/master/docs/metricsvr.png)\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n\n\n## protocol generate\nThe framework protocol uses protobuf. Once the .proto file is defined, the corresponding protocol file and service interface can be generated with one click.To generate protocols and interfaces, we rely on the following tools.\n\n- [protoc](https://github.com/google/protobuf) [mac: brew install protobuf]\n- [protoc-gen-gofast](https://github.com/gogo/protobuf/tree/master/protoc-gen-gofast)\n- [protoc-gen-micro](https://github.com/shockerjue/protoc-gen-micro)\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n\n### Protocol File\n```xxx.proto\nsyntax = \"proto3\";\npackage protocol;\n\nmessage Request {\n    string      username        = 1;\n    string      telephone       = 2;\n    string      email           = 3;\n}\n\nmessage Response {\n    int32   Code                = 1;\n    string  msg                 = 2;\n    map\u003cstring,string\u003e extra    = 3;\n}\n\n\nservice XXXService {\n    rpc  XxxCall(Request) returns (Response) {}\n}\n```\n\u003cbr\u003e\u003cbr\u003e\n\n### Generate Commands\n```\nprotoc -I. --gofast_out=. --micro_out=.  xxx.proto\n```\n\u003cbr\u003e\u003cbr\u003e\n\n\n### Generated Files\n```\nxxx.proto          struct and interface define\nxxx.pb.go          Generate Service interface struct\nxxx.pb.micro.go    Generate Service interface implement, client, server\n```\n\u003cbr\u003e\u003cbr\u003e\n\n## Example\n- [Protocol Generation](https://github.com/shockerjue/gffg/tree/master/example/protocol) \u003cbr\u003e\nDefine the .proto file and use the tool to generate the protocol file.\n\n- [Server implement](https://github.com/shockerjue/gffg/tree/master/example/server) \u003cbr\u003e\nThe rpc service mainly implements the interface defined by proto.\n\n- [Client implement](https://github.com/shockerjue/gffg/tree/master/example/client)\n\u003cbr\u003e\u003cbr\u003e\n\n\n## Performance Analysis\nPerformance analysis can be achieved using the Pprof method under tools, which can generate the corresponding function call graph and Firefox graph.How to use it:\n```\npackage main\n\nimport (\n  ...\n  \"github.com/shockerjue/gffg/tools\"\n)\n\nfunc main() {\n\t...\n\n\t// Asynchronous Execution\n\ttools.PProf()\n\t...\n\treturn\n}\n\n```\nYou can execute the following command to collect data. After collecting data, you can access the performance indicator data through http://127.0.0.1:7778.\n\n```\ngo tool pprof -http=:7778 -seconds=20 http://localhost:7777/debug/pprof/profile\n```\n\n- [flame](https://github.com/shockerjue/gffg/blob/master/docs/flame.png)\n![flame](https://github.com/shockerjue/gffg/blob/master/docs/flame.png)\n- [pprof](https://github.com/shockerjue/gffg/blob/master/docs/pprof.png)\n![pprof](https://github.com/shockerjue/gffg/blob/master/docs/pprof.png)\n\u003cbr\u003e\u003cbr\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshockerjue%2Fgffg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshockerjue%2Fgffg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshockerjue%2Fgffg/lists"}