A Node.js network swarm that uses discovery-channel to find and connect to peers over TCP or UTP.
discovery-swarm is a Node.js module that implements a network swarm for peer-to-peer applications. It uses discovery-channel to find peers advertising the same channel key and manages the connection lifecycle between them, supporting both TCP and UTP protocols. It solves the problem of building decentralized networks where peers need to automatically discover and connect to each other without a central server.
Node.js developers building decentralized applications, peer-to-peer networks, or distributed systems that require automatic peer discovery and connection management.
Developers choose discovery-swarm for its simplicity, modular design, and tight integration with discovery-channel. It provides a robust, event-driven API for managing peer connections while abstracting away the complexity of peer discovery and network protocol handling.
A network swarm that uses discovery-channel to find peers
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Leverages discovery-channel to automatically find and connect to peers advertising the same channel key, reducing boilerplate code for decentralized networks.
Handles peer connection state, retries, and lifecycle events with configurable limits like maxConnections and whitelists, ensuring stable network behavior.
Supports both TCP and experimental UTP, allowing developers to choose protocols based on networking needs, as shown in the opts configuration.
Emits detailed events for peer discovery, connection, handshaking, and disconnection, providing fine-grained control and debugging capabilities.
UTP support is marked as experimental in the README, indicating it may be unstable or lack full feature parity with TCP, limiting reliability for certain use cases.
Focuses solely on discovery and connection management without built-in data streaming or security features, requiring additional modules for complete P2P applications.
Limited to Node.js environments, with no native support for browsers or other platforms, restricting its use in cross-platform or web-based projects.