
Websocket Implementation
This handles the full WebSocket stack from connection management to horizontal scaling with Redis adapters. You get reference implementations for Socket.IO servers, browser clients, Python with aiohttp, plus message protocols and room-based routing. The examples are production-minded, covering reconnection logic, rate limiting, and cleaning up dead connections. If you're building chat, live notifications, or collaborative features and need more than a basic tutorial, this gives you the patterns for handling thousands of concurrent connections without the common pitfalls. The best practices section is honest about what breaks at scale, like keeping unlimited history in memory or ignoring authentication.
- skills.sh installs
- 668
- GitHub stars
- 379
- last updated
- Aug 21, 2026
Install
$ npx -y skills add aj-geddes/useful-ai-prompts --skill websocket-implementation --agent claude-codeInstalls into .claude/skills of the current project.
Files
WebSocket Implementation
Table of Contents
Overview
Build scalable WebSocket systems for real-time communication with proper connection management, message routing, error handling, and horizontal scaling support.
When to Use
- Building real-time chat and messaging
- Implementing live notifications
- Creating collaborative editing tools
- Broadcasting live data updates
- Building real-time dashboards
- Streaming events to clients
- Live multiplayer games
Quick Start
Minimal working example:
const express = require("express");
const http = require("http");
const socketIo = require("socket.io");
const redis = require("redis");
const app = express();
const server = http.createServer(app);
const io = socketIo(server, {
cors: { origin: "*" },
transports: ["websocket", "polling"],
reconnection: true,
reconnectionDelay: 1000,
reconnectionDelayMax: 5000,
reconnectionAttempts: 5,
});
Sponsors
Details
- Repository
- github.com/aj-geddes/useful-ai-prompts
- Categories
- Backend & APIs, AI & Agent Building
- First seen
- Jun 3, 2026
More from aj-geddes/useful-ai-prompts
All 258- Requirements Gathering663
- Image Optimization662
- Ruby Rails Application660
- Api Rate Limiting647
- Internationalization I18n642
- Information Architecture641
- Backup Disaster Recovery626
- Github Actions Workflow626
- Color Accessibility624
- Fastapi Development624
- Static Code Analysis622
- Unit Testing Framework622
- Aws Lambda Functions619
- User Research Analysis618
- Vulnerability Scanning617
- Data Encryption616
- Api Authentication612
- Performance Testing609
- Competitor Analysis608
- Refactor Legacy Code608
- Security Testing607
- Frontend Accessibility604
- Design Patterns Implementation600
- Database Schema Design597