awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
primus avatar

primus/primus

0
View on GitHub↗
4,473 stars·269 forks·JavaScript·MIT·11 views

Primus

Primus is a real-time communication abstraction layer and middleware framework. It provides a standardized interface for messaging that allows developers to switch between different transport engines without rewriting application logic, while also serving as a wrapper for managing socket lifecycles.

The project distinguishes itself by functioning as a real-time client library generator, producing compatible client-side code based on server configurations. It further organizes data flow through virtual stream multiplexing and the ability to group connections into named communication rooms for targeted broadcasting.

The framework covers a broad range of capabilities, including connection management with automated recovery via randomized exponential back-off and network latency monitoring using heartbeat mechanisms. It also includes systems for authenticating connections, transforming data packets through middleware, and utilizing pluggable serialization for various data formats.

Features

  • Transport Abstractions - Provides a unified interface that abstracts underlying socket implementations to allow swapping transport engines.
  • Unified Transport Abstractions - Provides a single API that abstracts multiple transport protocols so the same code works across environments.
  • Room Management - Organizes connections into named rooms to facilitate targeted broadcasting of messages to specific subsets of users.
  • Automatic Reconnection Logic - Implements automatic reconnection logic using randomized exponential back-off to restore dropped connections without stressing the server.
  • Middleware-Based Request Pipelines - Implements a modular chain of pluggable components to intercept and modify network requests and responses.
  • Connection Multiplexing - Bundles multiple logical data streams into a single physical connection for organized data flow.
  • Connection Lifecycle Managers - Manages the full lifecycle of persistent connections, including heartbeats and automated reconnection logic.
  • Room-Based Client Grouping - Organizes connected clients into named rooms for efficient targeted broadcasting and event delivery.
  • Multi-Transport Real-time Layers - Standardizes the real-time messaging interface to allow swapping between different transport engines without rewriting application logic.
  • Transport Abstraction Layers - Standardizes messaging interfaces to allow swapping transport layers without changing application logic.
  • Real-Time Message Routing - Organizes real-time data flows using communication rooms and virtual stream multiplexing for targeted broadcasting.
  • Virtual Channel Multiplexing - Supports streaming multiple distinct data flows over a single physical network connection using logical channels.
  • WebSocket Transports - Provides a standardized wrapper for managing WebSocket lifecycles, connection recovery, and transport abstraction.
  • Named Event Exchanges - Enables the exchange of named events with serializable data over persistent real-time connections.
  • Real-Time Middleware Pipelines - Provides a framework for intercepting and transforming incoming and outgoing data packets to apply security and serialization rules.
  • Client Library Generators - Automates the creation of compatible client-side libraries based on the server's current configuration.
  • Client Library Generators - Automatically creating compatible client-side libraries based on server configurations to ensure consistent communication protocols.
  • Request Interception Middleware - Provides pipeline handlers for intercepting and modifying network traffic before it reaches the transformer.
  • Real-Time Frameworks - Provides a framework for real-time communication with built-in support for intercepting and transforming bidirectional data streams.
  • WebSocket Connection Validations - Validates WebSocket connection requests using authentication headers to authorize sessions before they are established.
  • Data Type Serialization Configurations - Allows configuring how data is serialized to support various formats like JSON or binary.
  • Latency Monitors - Implements heartbeat-based monitoring to track network latency and detect dead connections.
  • Broadcast Messaging - Sends messages to all connected clients or targeted subsets within a room.
  • Connection Loss Detection - Identifies when a client loses connectivity to trigger automatic reconnection attempts once the network returns.
  • Health Monitoring - Implements heartbeat mechanisms using ping-pong signaling to calculate network latency and detect dead connections.
  • Automatic Connection Recovery - Provides mechanisms for automatically re-establishing lost network connections to maintain service stability.
  • Message Content Transformation - Modifies the content and metadata of messages before they trigger application events.
  • Message Encoders and Decoders - Implements customizable parsers to encode and decode messages between raw bytes and structured domain objects.
  • Pluggable Serialization - Provides an extensible system for using custom encoders and decoders to support multiple data formats.
  • Transport Engine Swappers - Allows changing real-time transformers to adapt to specific browser requirements or network constraints.
  • Exponential Backoff Retries - Restores dropped connections using a timing strategy that increases retry intervals to prevent server congestion.
  • Connection Authentication Mechanisms - Provides server-side validation of incoming client identities using customizable authentication hooks.
  • Plugin Extenders - Supports loading custom external libraries at runtime to augment core application functionality via plugins.
  • Heartbeat - Calculates network latency and detects dead connections by exchanging periodic heartbeat ping and pong messages.
  • Request Interception Middlewares - Provides middleware pipelines to intercept and modify incoming requests before they reach the primary transformation logic.
  • Real Time Communication - Abstraction layer for real-time frameworks.

Star history

Star history chart for primus/primusStar history chart for primus/primus

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Frequently asked questions

What does primus/primus do?

Primus is a real-time communication abstraction layer and middleware framework. It provides a standardized interface for messaging that allows developers to switch between different transport engines without rewriting application logic, while also serving as a wrapper for managing socket lifecycles.

What are the main features of primus/primus?

The main features of primus/primus are: Transport Abstractions, Unified Transport Abstractions, Room Management, Automatic Reconnection Logic, Middleware-Based Request Pipelines, Connection Multiplexing, Connection Lifecycle Managers, Room-Based Client Grouping.

What are some open-source alternatives to primus/primus?

Open-source alternatives to primus/primus include: atmosphere/atmosphere — Atmosphere is a Java-based framework for building and coordinating AI agents. It provides a real-time transport layer… guzzle/guzzle — Guzzle is a PHP HTTP client used for sending synchronous and asynchronous requests to web services. It serves as a… googollee/go-socket.io — go-socket.io is a Go implementation of the Socket.IO protocol used to build real-time, bidirectional, and event-driven… asynchttpclient/async-http-client — This is a non-blocking network client for Java applications that provides asynchronous HTTP request capabilities and… elbywan/wretch — Wretch is a chainable HTTP client library and Fetch API wrapper designed to simplify network request configuration,… nats-io/nats.go — This is a Golang client library for interacting with a cloud native distributed messaging system. It provides the…

Open-source alternatives to Primus

Similar open-source projects, ranked by how many features they share with Primus.
  • atmosphere/atmosphereAtmosphere avatar

    Atmosphere/atmosphere

    3,780View on GitHub↗

    Atmosphere is a Java-based framework for building and coordinating AI agents. It provides a real-time transport layer for streaming data via WebSockets, SSE, gRPC, and WebTransport, alongside a multi-agent orchestration framework for managing agent fleets through sequential, parallel, and graph-based execution workflows. The project features a durable workflow engine that persists agent state as snapshots, allowing long-running tasks to survive system restarts and incorporate human-in-the-loop approvals. It also implements Model Context Protocol servers to expose tools, resources, and prompt

    Javaacpagentic-aiembabel
    View on GitHub↗3,780
  • guzzle/guzzleguzzle avatar

    guzzle/guzzle

    23,453View on GitHub↗

    Guzzle is a PHP HTTP client used for sending synchronous and asynchronous requests to web services. It serves as a concurrent HTTP request manager, an HTTP stream handler, and a middleware-based HTTP pipeline. The project is a PSR-7 compliant client, utilizing standardized PHP interfaces for requests, responses, and streams. The library differentiates itself through a customizable functional handler stack that allows for the interception and modification of the request and response lifecycle. It features an adapter-based transport system that enables swapping between network implementations,

    PHP
    View on GitHub↗23,453
  • googollee/go-socket.iogoogollee avatar

    googollee/go-socket.io

    5,787View on GitHub↗

    go-socket.io is a Go implementation of the Socket.IO protocol used to build real-time, bidirectional, and event-driven communication between servers and clients. It functions as a communication framework that manages persistent connections and maps incoming network packets to specific handler functions to execute application logic. The library enables horizontal scaling of real-time connections through a distributed pub/sub adapter, which synchronizes events across multiple server instances using an external data store. It ensures reliability across different network environments by automatic

    Go
    View on GitHub↗5,787
  • asynchttpclient/async-http-clientAsyncHttpClient avatar

    AsyncHttpClient/async-http-client

    6,392View on GitHub↗

    This is a non-blocking network client for Java applications that provides asynchronous HTTP request capabilities and bidirectional WebSocket connectivity. It leverages a Netty-based architecture to handle high volumes of network input and output. The library utilizes native transport abstractions such as Epoll, KQueue, and io_uring to reduce system latency. It supports HTTP/2 multiplexing to run multiple concurrent request-response streams over a single connection and provides automatic response body decompression for various formats. Core capabilities cover the management of complex network

    Javaahcasyncasynchttpclient
    View on GitHub↗6,392
  • See all 30 alternatives to Primus→