https://github.com/rupc/grpc-async
Asynchronous gRPC request & response with goroutine and communication pattern
https://github.com/rupc/grpc-async
async go grpc
Last synced: 19 days ago
JSON representation
Asynchronous gRPC request & response with goroutine and communication pattern
- Host: GitHub
- URL: https://github.com/rupc/grpc-async
- Owner: rupc
- License: mit
- Created: 2017-07-08T18:59:56.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-07-16T04:31:21.000Z (over 8 years ago)
- Last Synced: 2024-06-20T16:41:16.384Z (almost 2 years ago)
- Topics: async, go, grpc
- Language: Go
- Homepage:
- Size: 17 MB
- Stars: 19
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# grpc-async(peer)
Example code of asynchronous communication using gRPC with goroutine
```
go get google.golang.org/grpc
```
## Multiple request
Client sends multiple messages asynchronously with go routine. This is useful when client don't need to wait response.
## Atomic counter
Client send a request asynchronously without immediate response. Client send another request to increase atomic counter on server side. When the counter has value of 2, original request is going to get a response.
## Relay server
It would be useful when a program has both client side and server side. An example of this is relay server. It waits for cilent's request and relay this to the different server. Picture below shows the communication process.
