awesome-repositories.com
博客
MCP
awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索开源替代品自托管软件博客网站地图
项目MCP 服务器关于排名机制媒体报道
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
olahol avatar

olahol/melody

0
View on GitHub↗
4,066 星标·374 分支·Go·bsd-2-clause·6 次浏览

Melody

Melody is a WebSocket server framework designed to upgrade HTTP connections into bidirectional streams. It functions as a session manager and binary streaming library that facilitates real-time data exchange between a server and multiple remote clients.

The project features a broadcast engine that optimizes multi-client transmissions through wire-representation caching. It includes a dedicated session management system for attaching custom state to persistent network connections and an upgrade handler that validates handshake headers.

The framework covers broad capability areas including event-driven message dispatch, origin-based request filtering, and per-message deflate compression. It also provides tools for managing connection lifecycles, enforcing message size limits, and exchanging JSON, text, or binary data.

Features

  • Hybrid REST and WebSocket Servers - Provides a full server-side implementation for managing persistent, bidirectional communication channels.
  • Event-Driven Message Dispatching - Provides an event dispatcher to route incoming binary network frames to specific handler functions efficiently.
  • Session Variable Stores - Uses in-memory key-value stores to attach custom data and track user identity across a session.
  • Bidirectional Binary Streams - Facilitates the transmission of raw byte streams and encoded text between the server and remote clients.
  • Buffered Network Streaming Libraries - Ships a library for managing buffered incoming and outgoing raw bytes and text over network connections.
  • Broadcast Messaging - Implements a system for real-time event distribution by broadcasting messages to multiple connected sessions.
  • Websocket Connection Managers - Manages persistent WebSocket connections including lifecycle event handling and session state tracking.
  • WebSocket Servers - Provides a framework for implementing servers that manage bidirectional communication and persistent connections.
  • Full-Duplex HTTP Communication - Enables simultaneous bidirectional data exchange by upgrading HTTP server connections to a full-duplex protocol.
  • Handshake Upgrade Handlers - Includes a utility that validates handshake headers to convert HTTP requests into full-duplex communication channels.
  • HTTP Upgrade Handlers - Converts standard HTTP requests into persistent connections and attaches them to a session manager.
  • Incoming Message Processors - Executes specific functions to process incoming text or binary messages upon receipt.
  • Protocol Upgrade Negotiators - Implements the handshake and protocol transition logic to convert stateless HTTP requests into persistent bidirectional streams.
  • Session State Management - Maintains session state between clients and servers over persistent bidirectional connections.
  • Text and Binary Message Exchanges - Allows sending and receiving data as either UTF-8 encoded text or raw binary bytes.
  • Binary Buffer Transports - Implements low-level data transmission using raw memory buffers to optimize network throughput and minimize encoding overhead.
  • Protocol Upgrades - Provides mechanisms for negotiating and upgrading standard HTTP connections to persistent WebSocket protocols.
  • Real-Time Data Pushing - Implements capabilities for pushing real-time updates and broadcasting messages to WebSocket clients.
  • Session Connect-Disconnect Emitters - Triggers specific logic and emits events when clients connect, disconnect, or send messages.
  • Wire Representation Caches - Optimizes multi-client broadcasts by computing the binary payload once and sharing it across multiple connections.
  • JSON Data Exchange - Supports encoding and decoding JSON for transporting state and data between clients and the server.
  • Optimized Broadcast Engines - Features a broadcast engine that optimizes multi-client transmissions through wire-representation caching.
  • Connection Configurations - Provides settings for managing network communication parameters, including message size limits and timeouts.
  • Connection Control Frame Handlers - Provides custom handlers for protocol-level ping, pong, and close messages to maintain connection health.
  • Data Compression - Applies per-message deflate compression to outgoing payloads to reduce network bandwidth usage.
  • Request Source Filtering - Implements filtering logic based on the request origin to restrict access during the initial connection phase.
  • Session-Targeted Writes - Allows sending text or binary messages to a specific connected user with a custom write deadline.
  • Payload Transmissions - Supports per-message deflate compression to reduce bandwidth usage for outgoing payloads.
  • WebSocket Origin Validators - Enforces same-origin policies during the WebSocket handshake to restrict which hosts can establish a connection.
  • Request Size Limiters - Sets a maximum byte threshold for incoming messages to protect server resources from excessive data consumption.
  • Wire-Representation Caches - Optimizes multi-client broadcasts by caching the binary wire representation to avoid redundant processing.
  • Messaging Systems - Minimalist framework for WebSocket sessions.
  • Web Frameworks - Lightweight WebSocket framework for real-time interactions.
  • Communication and Real-time - A framework for building WebSocket services.
  • Messaging - Listed in the “Messaging” section of the Awesome Go awesome list.
  • Messaging Systems - Minimalist framework for WebSocket sessions.

Star 历史

olahol/melody 的 Star 历史图表olahol/melody 的 Star 历史图表

AI 搜索

探索更多 awesome 仓库

用简单的语言描述您的需求 —— AI 将根据相关性为您从数千个精选开源项目中进行排序。

Start searching with AI

Melody 的开源替代方案

相似的开源项目,按与 Melody 的功能重合度排序。
  • coder/websocketcoder 的头像

    coder/websocket

    5,299在 GitHub 上查看↗

    This is a minimal WebSocket library for Go designed for bidirectional real-time communication. It serves as a network protocol implementation for managing handshakes, frame masking, and control signals to enable the exchange of text and binary messages over persistent connections. The library distinguishes itself by providing a connectivity layer that wraps browser WebSocket APIs for applications compiled to WebAssembly. It also functions as data compression middleware, utilizing deflate compression to reduce bandwidth usage for transmitted messages. The project covers a broad range of netwo

    Gogohttp2idiomatic
    在 GitHub 上查看↗5,299
  • python-websockets/websocketspython-websockets 的头像

    python-websockets/websockets

    5,692在 GitHub 上查看↗

    websockets is a Python library that provides both client and server implementations for the WebSocket protocol, enabling real-time, bidirectional communication between applications. At its core, it offers the fundamental primitives for establishing persistent connections, managing their lifecycles, and exchanging text or binary messages asynchronously using coroutines. The library distinguishes itself through comprehensive support for various messaging patterns, including broadcast messaging to all connected clients, targeted messaging to specific clients, and shared application state synchro

    Pythonpythonpython3websocket
    在 GitHub 上查看↗5,692
  • websockets/wswebsockets 的头像

    websockets/ws

    22,768在 GitHub 上查看↗

    This project is a Node.js WebSocket library that provides a high-performance client and server implementation for the WebSocket protocol. It functions as a transport layer for real-time bidirectional communication, supporting both UTF-8 strings and binary data transport through the use of TCP socket wrappers. The library enables the creation of WebSocket servers that manage full-duplex connections and broadcast messages to multiple clients, as well as WebSocket clients that establish persistent links to remote servers. It handles the protocol upgrade process via TCP-based handshake negotiatio

    JavaScript
    在 GitHub 上查看↗22,768
  • nanohttpd/nanohttpdNanoHttpd 的头像

    NanoHttpd/nanohttpd

    7,215在 GitHub 上查看↗

    NanoHTTPD is a lightweight, embeddable HTTP server for Java applications. It allows developers to integrate web server capabilities directly into a Java project to handle incoming requests without requiring a standalone installation. The project provides specialized implementations for an HTTPS web server, a WebSocket server for bidirectional real-time communication, and a static file web server. These capabilities enable secure network traffic through SSL certificates and the delivery of local files with automatic MIME type detection. The server includes systems for request routing and hand

    Java
    在 GitHub 上查看↗7,215
查看 Melody 的所有 30 个替代方案→

常见问题解答

olahol/melody 是做什么的?

Melody is a WebSocket server framework designed to upgrade HTTP connections into bidirectional streams. It functions as a session manager and binary streaming library that facilitates real-time data exchange between a server and multiple remote clients.

olahol/melody 的主要功能有哪些?

olahol/melody 的主要功能包括:Hybrid REST and WebSocket Servers, Event-Driven Message Dispatching, Session Variable Stores, Bidirectional Binary Streams, Buffered Network Streaming Libraries, Broadcast Messaging, Websocket Connection Managers, WebSocket Servers。

olahol/melody 有哪些开源替代品?

olahol/melody 的开源替代品包括: coder/websocket — This is a minimal WebSocket library for Go designed for bidirectional real-time communication. It serves as a network… python-websockets/websockets — websockets is a Python library that provides both client and server implementations for the WebSocket protocol,… websockets/ws — This project is a Node.js WebSocket library that provides a high-performance client and server implementation for the… nanohttpd/nanohttpd — NanoHTTPD is a lightweight, embeddable HTTP server for Java applications. It allows developers to integrate web server… centrifugal/centrifugo — Centrifugo is a self-hosted real-time messaging server that provides infrastructure for scalable notifications, a… partykit/partykit — PartyKit is a serverless WebSocket backend platform for building real-time multiplayer applications. It provides a…