https://github.com/kralicky/totem
gRPC bidirectional streaming middleware
https://github.com/kralicky/totem
go grpc service-discovery streaming
Last synced: 9 months ago
JSON representation
gRPC bidirectional streaming middleware
- Host: GitHub
- URL: https://github.com/kralicky/totem
- Owner: kralicky
- License: apache-2.0
- Created: 2022-01-02T06:45:14.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-06-10T23:05:44.000Z (almost 2 years ago)
- Last Synced: 2025-06-25T01:02:27.036Z (9 months ago)
- Topics: go, grpc, service-discovery, streaming
- Language: Go
- Homepage:
- Size: 221 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Totem is a Go library that can turn a single gRPC stream into bidirectional unary gRPC servers.
## Background
Streaming RPCs enable several useful design patterns for client-server connections that can't be done with unary RPCs. For example, keeping track of long-lived client connections, and sending server-initiated requests to such clients. However, implementing bidirectional messaging over streams can quickly become very complicated for non-trivial use cases. Totem enables these design patterns and abstracts away the underlying stream, allowing you to implement your streaming RPC in terms of simpler unary RPCs.
## Examples
See the [examples](examples/) directory for example code.