Skip to main content

real-time

Real-time systems and processing

来源信息

仓库
ffsshhttiikk/opencode-agents-skills
最近来源活动
2026年2月28日 22:54
检测到的 SKILL.md 语言
英语
星标
3
Forks
2

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
real-time
description
Real-time systems and processing
license
MIT
metadata
{"audience":"developers","category":"software-development"}
## What I do - Build real-time data pipelines - Implement WebSocket communication - Design streaming architectures - Handle time-sensitive processing - Manage event-driven systems - Optimize latency requirements ## When to use me When building applications requiring immediate data processing, live updates, or time-critical operations. ## Key Concepts ### Real-Time Classifications ``` Hard Real-Time: Missed deadline = failure Firm Real-Time: Missed deadline = degraded quality Soft Real-Time: Missed deadline = performance drop ``` ### WebSocket Implementation ```javascript // Server const wss = new WebSocket.Server({ port: 8080 }); wss.on('connection', ws => { ws.on('message', message => { broadcast(message); }); }); // Client const ws = new WebSocket('ws://localhost:8080'); ws.onmessage = (event) => { updateUI(JSON.parse(event.data)); }; ``` ### Streaming Architectures ```python # Apache Kafka + Spark Streaming from pyspark.streaming import StreamingContext ssc = StreamingContext(sc, 1) kafka_stream = KafkaUtils.createDirectStream( ssc, ['topic'], {'bootstrap.servers': 'localhost:9092'} ) ``` ### Latency Optimization ``` Target latencies: - Hard real-time: < 1ms - Trading systems: < 10ms - Gaming: < 50ms - Web updates: < 100ms ``` ### Event-Driven Patterns ```javascript // Event sourcing const store = createStore((state, event) => { switch (event.type) { case 'USER_UPDATED': return { ...state, user: event.data }; } }); // CQRS pattern Command: writeModel.execute(command) Query: readModel.query(query) ``` ### Technologies - WebSockets, SSE - Apache Kafka, RabbitMQ - Redis Pub/Sub - gRPC streaming - WebRTC - Edge computing ### Monitoring ```python # Latency tracking from prometheus_client import Histogram request_latency = Histogram('request_latency_seconds') ```
在 GitHub 查看