realtime-architect

Implement a hybrid WebSocket and polling architecture with FastAPI and JSON protocol.

1|Updated Jan 25, 2026
One-click install
npx skills add https://github.com/kellyson520/TG-ONE --skill realtime-architect
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: realtime-architect
Source: https://github.com/kellyson520/TG-ONE/tree/main/.agent/skills/realtime-architect
Command: npx skills add https://github.com/kellyson520/TG-ONE --skill realtime-architect

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Real-time systems often struggle with reliability when streaming events. This skill provides a standardized WebSocket-based architecture with a graceful fallback to polling to ensure continuous data delivery.

Core Features & Use Cases

  • Hybrid WebSocket + polling architecture for reliable real-time messaging.
  • JSON-based protocol with server-to-client events and client actions.
  • Backend implementation guidance using a global ConnectionManager in FastAPI.
  • Frontend lifecycle management and graceful reconnects with a dedicated WebSocketManager.
  • Use Case: dashboards, live analytics, and chat where consistent updates are required.

Quick Start

Initialize and deploy the Real-time Architect module and activate the heartbeat-protected WebSocket connection to validate end-to-end communication.

Frequently Asked Questions about realtime-architect

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a reliable real-time WebSocket architecture for a live dashboard?

Implementing real-time WebSocket updates in FastAPI requires a global ConnectionManager to handle active client connections. This skill guides you through setting up topic-based Pub/Sub and an EventBus to route server-to-client events efficiently across concurrent connections.

Why do my WebSocket connections drop and how can I handle reconnects gracefully?

WebSocket connections drop due to network instability, but graceful reconnects are handled by a dedicated frontend WebSocketManager. It manages the connection lifecycle and uses a heartbeat-protected mechanism to detect failures and trigger automatic reconnection.

What is the best way to fall back to polling when WebSocket fails in a real-time app?

The best way to fall back to polling when WebSocket fails is a hybrid WebSocket and polling architecture. This ensures continuous data delivery by automatically switching to HTTP polling if the real-time connection drops, maintaining reliable event updates.

Does this real-time WebSocket architecture support chat applications and live analytics?

Yes, this real-time WebSocket architecture explicitly supports chat applications and live analytics. It delivers consistent, low-latency updates through a JSON-based protocol with server-to-client events and client actions, applicable to any scenario requiring reliable streaming.