projection-patterns

仓库创建 2025年7月25日最近提交 5 天前SkillHot 收录 21 天前
▸ 精选理由

便于实现 CQRS 的读侧、物化视图与实时仪表盘需求。

这个 Skill 做什么

从事件流构建投影与读模型以提高查询性能与实时性。

把事件流转换成供查询的投影/读模型,常用于 CQRS 的 read side、物化视图、实时面板或搜索索引,目的是把写入事件和读取查询分离开来。当你需要把海量事件聚合成高性能的查询层、降低读延迟或做跨流汇总时会用到。特点是侧重增量更新、幂等处理和可扩展的重放策略,能显著提升查询性能和实时性。

▸ 展开 SKILL.md 英文原文

Build read models and projections from event streams. Use when implementing CQRS read sides, building materialized views, or optimizing query performance in event-sourced systems.

开发编程投影读模型物化视图通用
3.8w
Stars
4.1k
Forks
40
仓库内 Skill
+713
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/wshobson/agents/main/plugins/backend-development/skills/projection-patterns/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/wshobson/agents/main/plugins/backend-development/skills/projection-patterns/SKILL.md"
SKILL.MD 节选查看完整文件 ↗
# Projection Patterns

Comprehensive guide to building projections and read models for event-sourced systems.

## When to Use This Skill

- Building CQRS read models
- Creating materialized views from events
- Optimizing query performance
- Implementing real-time dashboards
- Building search indexes from events
- Aggregating data across streams

## Core Concepts

### 1. Projection Architecture

```
┌─────────────┐     ┌─────────────┐     ┌─────────────┐
│ Event Store │────►│ Projector   │────►│ Read Model  │
│             │     │             │     │ (Database)  │
│ ┌─────────┐ │     │ ┌─────────┐ │     │ ┌─────────┐ │
│ │ Events  │ │     │ │ Handler │ │     │ │ Tables  │ │
│ └─────────┘ │   
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有