A Go library for streaming Protocol Buffers messages over TCP with minimal overhead and simplified networking boilerplate.
BuffStreams is a Go library that simplifies building networked applications that stream Protocol Buffers messages over TCP. It abstracts away the complexities of socket programming, message framing, and connection management, providing a clean interface for sending and receiving serialized data. The library handles the low-level details like adding size headers and reading complete messages, allowing developers to focus on their application's core logic.
Go developers building high-performance networked services, microservices, or distributed systems that need to communicate using Protocol Buffers over TCP. It's particularly useful for those who want to avoid writing repetitive socket handling code.
Developers choose BuffStreams because it eliminates TCP streaming boilerplate while maintaining exceptional performance (over 1M messages/sec). It provides a simple, focused API for Protocol Buffers over TCP without the overhead of full RPC frameworks, making it ideal for custom streaming protocols.
A library to simplify writing applications using TCP sockets to stream protobuff messages
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Benchmarks show over 1.1 million messages per second on a single socket, saturating a 1Gb NIC, as cited in the README, making it ideal for high-throughput applications.
Handles low-level details like message framing with fixed-length headers and connection management, eliminating boilerplate socket code for Protocol Buffers over TCP.
Provides a ListenCallback for custom deserialization and business logic, allowing developers to process raw bytes as needed, as demonstrated in the example code.
Includes a Manager class with internal locks for caching and managing multiple listeners and writers concurrently, simplifying connection handling in multi-goroutine environments.
The library does not handle Protocol Buffers serialization internally; developers must use proto.Unmarshal in callbacks, adding extra steps and potential for errors.
Limited to TCP connections with no support for UDP, HTTP, or other protocols, restricting its use in scenarios requiring different networking approaches.
Relies on goroutines and callbacks for async processing, which can complicate error handling and debugging compared to channel-based patterns, though a channel-based approach is on the roadmap.
Enabling logging incurs a performance hit under extreme load, as noted in the README, which may deter use in ultra-high-performance environments where monitoring is needed.