{"id":29656016,"url":"https://github.com/bscpaz/poc-grpc-go","last_synced_at":"2026-04-21T10:02:30.050Z","repository":{"id":163589896,"uuid":"426367519","full_name":"bscpaz/poc-grpc-go","owner":"bscpaz","description":"This is a POC (proof of concept) to understand better the behavior of gRPC with Go Lang.","archived":false,"fork":false,"pushed_at":"2022-03-10T14:16:28.000Z","size":95,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-20T19:52:32.841Z","etag":null,"topics":["grpc","grpc-go"],"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/bscpaz.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":"2021-11-09T19:57:09.000Z","updated_at":"2022-03-16T13:10:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"8c31fcfa-35a8-45c8-96bc-f36bfe052f15","html_url":"https://github.com/bscpaz/poc-grpc-go","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bscpaz/poc-grpc-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bscpaz%2Fpoc-grpc-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bscpaz%2Fpoc-grpc-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bscpaz%2Fpoc-grpc-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bscpaz%2Fpoc-grpc-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bscpaz","download_url":"https://codeload.github.com/bscpaz/poc-grpc-go/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bscpaz%2Fpoc-grpc-go/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266455664,"owners_count":23931361,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["grpc","grpc-go"],"created_at":"2025-07-22T08:10:11.622Z","updated_at":"2026-04-21T10:02:29.916Z","avatar_url":"https://github.com/bscpaz.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003egRPC with Go\u003c/h1\u003e\n\u003cp align=\"center\"\u003eThis is a POC (proof of concept) to understand better the behavior of gRPC with Go Lang.\u003c/p\u003e\n\n\n#### Technologies:\n\n* Go (https://golang.org/);\n  * _Go is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of **multicore** and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It's a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language._\n  * https://go.dev/ref/spec\n\n\n* gRPC (https://grpc.io/);\n  * _In gRPC, a client application can directly call a method on a server application on a different machine as if it were a local object, making it easier for you to create distributed applications and services._\n  \u003cimg src=\"https://user-images.githubusercontent.com/9732874/142060820-6dac8f12-1b1e-4c53-9e30-d3f856004557.png\" width=\"700\" align=\"center\"/\u003e\n\n* Protocol Buffers (https://developers.google.com/protocol-buffers)\n  * _Protocol buffers are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data – think XML, but smaller, faster, and simpler. You define how you want your data to be structured once, then you can use special generated source code to easily write and read your structured data to and from a variety of data streams and using a variety of languages._\n\n#### How to get started:\n\n```console\n#.profile\nexport GOROOT=/usr/local/go\nexport GOPATH=$HOME/projects/go\nexport PROTOC=$GOPATH/bin\nexport GOBIN=$GOPATH/bin\nexport PATH=$PATH:$GOROOT:$GOPATH:$PROTOC:$GOBIN\n```\n#### Initial settings\n```console\nmkdir pb\n```\n```console\nmkdir proto\n```\n```console\nsudo chown bscpaz:bscpaz pb proto\n```\n\n###### Creating a new go module.\n```console\ngo mod init github.com/bscpaz/poc-grpc-go\n```\n\n###### Installing protocol buffers on machine.\n```console\ngo get -u google.golang.org/grpc\n```\n\n```console\ngo get google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest\n```\n\n```console\ngo install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest\n```\n\n###### Generating stubs in Go language\n```console\nprotoc --proto_path=proto proto/*.proto --go_out=pb --go-grpc_out=pb\n```\n\n#### How to start gRPC server (stream server):\n```console\ngo run cmd/server/server.go\n```\n\n#### How to call gRPC server:\n```console\ngo run cmd/client/client.go\n```\n\n#### How to test gRPC calls:\nInstall and use the Evans project:\n\n* https://github.com/ktr0731/evans\n\n###### After extract evans program into \"/usr/local/go/bin\" folder, add evans into .profile file:\n```console\nexport EVANS=$GOBIN/evans\nexport PATH=$PATH:$GOROOT:$GOPATH:$GOBIN:$EVANS\n```\n\n###### Create needed folder at user's home directory.\n```console\nsudo mkdir .cache/evans\n```\n```console\nsudo chown -R bscpaz:bscpaz .cache/\n```\n\n###### From project's folder.\n```console\nevans -r repl --host localhost --port 50051\npb.UserService@localhost:50051\u003e service UserService\npb.UserService@localhost:50051\u003e call AddUser\nid (TYPE_INT32) =\u003e 0\nname (TYPE_STRING) =\u003e Bruno Paz\nemail (TYPE_STRING) =\u003e soujava@gmail.com\n```\n\n###### Below is the result of client call to server. Note the value of \"id\":\n```console\n{\n  \"email\": \"soujava@gmail.com\",\n  \"id\": 123456,\n  \"name\": \"Bruno Paz\"\n}\n\npb.UserService@localhost:50051\u003e exit\n```\n\n\n\u003chr\u003e\n\u003ch4 align=\"center\"\u003eKnown issues\u003c/h4\u003e\n\n```console\nIssue:\n  could not import \"google.golang.org/grpc\"\nSolution:\n  bscpaz@2am:/$ go get -u google.golang.org/grpc\n``` \n```console\nIssue:\n    bscpaz@2am:$ evans -r repl --host localhost --port 50051\n    evans: failed to run REPL mode: failed to instantiate a new spec: failed to instantiate the spec: \n    failed to list packages by gRPC reflection: failed to list services from reflection enabled gRPC server: \n    rpc error: code = Unimplemented desc = unknown service grpc.reflection.v1alpha.ServerReflection\nSolution:\n    Add reflection mode into code: \n      reflection.Register(grpcServer)\n``` \n```console\nIssue:\n  Command 'go' not found, but can be installed with:\n  or\n  evans: command not found\nSolution:\n  You've opened a new terminal and it requires a new refresh on .profile file.\n  bscpaz@2am:/$ cd ~\n  bscpaz@2am:/$ source .profile\n``` \n```console\nIssue:\n  protoc-gen-go: program not found or is not executable\nSolution:\n  protoc-ge-go is installed into '~/projects/go/bin'. Add that path into .profile file\n  export PROTOC=$GOPATH/bin\n  \n  bscpaz@2am:/$ source .profile\n  bscpaz@2am:/$ cd ~/projects/go/poc-grpc-go\n  bscpaz@2am:/$ sudo chown -R bscpaz:bscpaz poc-grpc-go/\n``` \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbscpaz%2Fpoc-grpc-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbscpaz%2Fpoc-grpc-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbscpaz%2Fpoc-grpc-go/lists"}