소스 정보
- 저장소
- mikailustuner/OmniRule
- 최근 소스 활동
- 2026년 5월 8일 23:36
- 감지된 SKILL.md 언어
- 영어
- 스타
- 5
- 포크
- 1
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/mikailustuner/OmniRule --skill real-time-patterns명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | real-time-patterns |
| description | Real-time: WebSockets, SSE, polling, rooms, presence, reconnection |
| triggers | {"keywords":["real-time","WebSocket","SSE","Socket.io","live","streaming","presence","room","broadcast"]} |
| auto_load_when | Implementing real-time features |
| agent | infra-specialist |
| tools | ["Read","Write","Bash"] |
Focus: Choosing real-time strategy, implementation patterns, scaling
Use WebSockets when:
├── Bidirectional communication needed
├── Low-latency updates (chat, games)
├── High frequency messages
└── State synchronization
Use SSE when:
├── Server-to-client only
├── Simple one-way updates
├── Works with HTTP/2
└── Firewall-friendly
Use Polling when:
├── Infrequent updates
├── Simple implementation
├── No server state needed
└── Budget constraints
Connection lifecycle:
├── Handshake: HTTP upgrade
├── Connected: persistent
├── Ping/Pong: keep-alive
└── Close: graceful or error
Message patterns:
├── Text: JSON payloads
├── Binary: protocol buffers
└── Control frames: ping, pong, close
Scaling:
├── Sticky sessions or Redis pub/sub
├── Message brokers (Redis, Kafka)
└── Horizontal scaling
Room structure:
├── userId + roomId: private chat
├── roomId only: group channel
└── projectId: collaborative doc
Implementation:
├── Map roomId to subscriber set
├── Pub/sub to room channels
└── Add/remove on join/leave
State management:
├── In-memory: fast, single instance
├── Redis: distributed, persistent
└── Database: slow, last resort
Presence tracking:
├── Online/offline status
├── Last seen timestamp
├── Currently viewing (optional)
Implementation:
├── Heartbeat: every 30-60s
├── Expire: 2-3x heartbeat
└── Broadcast on join/leave
Use cases:
├── Show "user is typing"
├── Online indicators
└── Active user list
Reconnection strategy:
├── Exponential backoff: 1s, 2s, 4s, 8s, 32s max
├── Max retries: 5-10 then give up
└── User notification after max
State recovery:
├── Replay missed messages (with cursor)
├── Full state refetch
└── Optimistic UI, reconcile
Edge cases:
├── Network switch (wifi/cellular)
├── Sleep/wake
└── Tab backgrounding
Delivery guarantees:
├── At-most-once: fire and forget
├── At-least-once: ack + retry
└── Exactly-once: complex, rarely needed
Implementation:
├── Sequence numbers
├── Client ack
└── Server retry until ack
Offline queue:
├── Queue locally while disconnected
├── Sync on reconnect
└── Handle conflicts
❌ Polling every second from client
✅ Server-Sent Events for server→client; WebSocket for bidirectional
❌ Broadcasting every event to every connected client
✅ Room/channel-based routing — clients subscribe to relevant streams
❌ No backpressure handling on fast publishers
✅ Implement flow control; drop/buffer when consumer is slow
❌ Storing real-time state only in memory (lost on restart)
✅ Persist to Redis / DB; reconnecting clients can catch up
❌ WebSocket without heartbeat/ping-pong
✅ Send heartbeat every 30s; disconnect silent clients
| Pattern | Transport | Use case |
|---|---|---|
| Chat / collaboration | WebSocket | Bidirectional |
| Notifications | SSE | Server→client only |
| Live dashboards | SSE | Server→client only |
| Game state | WebSocket | Low latency |
| Presence | WebSocket + Redis | User online/offline |
| Event stream | Kafka / Redis Streams | Durable replay |