Hasty Briefsbeta

Bilingual

Show HN: BinaryRPC – Lightweight WebSocket-based RPC framework in modern C++

10 months ago
  • #RPC
  • #C++
  • #WebSocket
  • BinaryRPC is a high-throughput RPC framework built on uWebSockets, designed for latency-sensitive applications like multiplayer games and financial tick streams.
  • The framework supports configurable reliability levels (None, AtLeastOnce, ExactlyOnce) with retries, ACKs, and two-phase commit mechanisms.
  • BinaryRPC features pluggable layers for protocols, transports, middleware, and plugins, allowing for extensive customization.
  • Stateful sessions with automatic expiry and indexed fields enable reconnect-friendly operations.
  • Middleware chains support functionalities like JWT auth and rate-limiting, similar to Express.js.
  • The framework is header-only, making it lightweight and easy to integrate into projects.
  • Dependencies include CMake (3.16+), a C++20 compiler, vcpkg, and Git. Optional dependencies like JWT and JSON support can be added as needed.
  • Installation involves cloning the repository, building with CMake, and linking the library in your project.
  • BinaryRPC provides a modular architecture with replaceable components for QoS, serialization, transport, middleware, and plugins.
  • The framework includes utilities for logging, error handling, and session management, with detailed examples provided for common use cases.