Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. buffstreams

buffstreams

Apache-2.0Go

A Go library for streaming Protocol Buffers messages over TCP with minimal overhead and simplified networking boilerplate.

GitHubGitHub
255 stars33 forks0 contributors

What is buffstreams?

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.

Target Audience

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.

Value Proposition

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.

Overview

A library to simplify writing applications using TCP sockets to stream protobuff messages

Use Cases

Best For

  • Building custom TCP-based streaming services with Protocol Buffers
  • Creating high-throughput microservices that need low-latency communication
  • Implementing lightweight RPC systems without heavy framework dependencies
  • Developing real-time data pipelines between Go services
  • Prototyping networked applications quickly without writing socket code from scratch
  • Streaming any serialized data with a simple header+payload format over TCP

Not Ideal For

  • Applications requiring HTTP/2, gRPC, or RESTful APIs with built-in service discovery and streaming
  • Projects that need out-of-the-box support for multiple serialization formats like JSON or XML without manual handling
  • Systems where UDP or other non-TCP transport protocols are essential for low-latency or broadcast communication
  • Teams looking for a full-featured RPC framework with authentication, encryption, and automatic load balancing

Pros & Cons

Pros

High Performance Streaming

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.

Simplified TCP Abstraction

Handles low-level details like message framing with fixed-length headers and connection management, eliminating boilerplate socket code for Protocol Buffers over TCP.

Flexible Callback Interface

Provides a ListenCallback for custom deserialization and business logic, allowing developers to process raw bytes as needed, as demonstrated in the example code.

Thread-Safe Connection Manager

Includes a Manager class with internal locks for caching and managing multiple listeners and writers concurrently, simplifying connection handling in multi-goroutine environments.

Cons

Manual Serialization Required

The library does not handle Protocol Buffers serialization internally; developers must use proto.Unmarshal in callbacks, adding extra steps and potential for errors.

TCP-Only Transport Limitation

Limited to TCP connections with no support for UDP, HTTP, or other protocols, restricting its use in scenarios requiring different networking approaches.

Callback-Based Async Complexity

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.

Logging Performance Penalty

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.

Frequently Asked Questions

Quick Stats

Stars255
Forks33
Contributors0
Open Issues4
Last commit6 years ago
CreatedSince 2015

Tags

#tcp#high-performance#protocol-buffers#microservices#socket#streaming#rpc#go#networking

Built With

G
Go

Included in

Go169.1k
Auto-fetched 13 hours ago

Related Projects

fasthttpfasthttp

Fast HTTP package for Go. Tuned for high performance. Zero memory allocations in hot paths. Up to 10x faster than net/http

Stars23,420
Forks1,841
Last commit3 days ago
webrtcwebrtc

Pure Go implementation of the WebRTC API

Stars16,661
Forks1,872
Last commit1 day ago
cloudflaredcloudflared

Cloudflare Tunnel client

Stars14,949
Forks1,363
Last commit1 day ago
kcptunkcptun

Reliable UDP Transmission Optimizer based on KCP: Enhancing network efficiency in poor connectivity environments.

Stars14,403
Forks2,631
Last commit3 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub