Logo Data Streaming

Data Streaming

Cộng đồng
vasilyu1983
data-streaming

Thiết kế nền tảng truyền dữ liệu trực tuyến cho Kafka, Flink, CDC và nạp dữ liệu vào lakehouse. Dùng khi lập kế hoạch cho hạ tầng sự kiện, pipeline CDC, quản trị schema hoặc phân phối dữ liệu lakehouse theo thời gian thực.

Tổng quan

Nhà phát hànhvasilyu1983
Kho mãAI-Agents-public
Tên kỹ năngdata-streaming
Sao
87
Bản fork
19
Tệp đi kèm
15
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 15 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được vasilyu1983 công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Data Streaming trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/vasilyu1983/AI-Agents-public/tree/main/frameworks/shared-skills/skills/data-streaming
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/vasilyu1983/AI-Agents-public.git /tmp/AI-Agents-public
mkdir -p .claude/skills
cp -r /tmp/AI-Agents-public/frameworks/shared-skills/skills/data-streaming .claude/skills/data-streaming
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Data Streaming trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Data Streaming ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Data Streaming với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Data Streaming

Modern Best Practices: choose the event backbone and stream processor separately, treat schemas and replay as product interfaces, default to event-time processing for stateful analytics, and verify managed-service behavior from primary docs before making vendor-specific recommendations.

Primary sources live in data/sources.json. Refresh time-sensitive claims against official docs before making definitive recommendations about managed services, version-specific features, limits, or pricing.

This skill covers the data platform side of streaming: event backbones, CDC, stateful processing, schema governance, and real-time delivery into lakes, warehouses, search, or serving systems.

When to Use

  • Choose between Kafka, Redpanda, Pulsar, Kinesis, or managed Kafka offerings
  • Design topic strategy, partitioning, retention, replay, and ordering guarantees
  • Build or fix CDC pipelines with Debezium, Flink CDC, or managed database-streaming tools
  • Choose between Flink, Kafka Streams, Spark Structured Streaming, or lighter transformation paths
  • Define schema registry, compatibility, contract, and tombstone handling rules
  • Deliver streams into Iceberg, Hudi, Delta, ClickHouse, warehouses, caches, or search systems
  • Review streaming SLOs, lag, checkpointing, reprocessing, and operational failure modes

When NOT to Use

  • Lakehouse storage formats, catalogs, or medallion architecture -> Use data-lake-platform
  • OLTP schema tuning or transactional query optimization -> Use data-sql-optimization
  • Event-driven application architecture, CQRS, or domain event design -> Use software-architecture-design
  • BI dashboard automation and Metabase APIs -> Use data-metabase
  • Product instrumentation and attribution strategy -> Use marketing-product-analytics

Triage Questions

  1. What is the real requirement: operational events, CDC, analytical enrichment, or customer-facing low-latency delivery?
  2. What matters most: portability, managed simplicity, geo-replication, cost, or end-to-end latency?
  3. Where must ordering hold: globally, per key, or only within a local processing step?
  4. What is the replay model: full retention, compacted snapshots, time-bounded backfills, or one-shot delivery?
  5. Which guarantees are required: at-most-once, at-least-once, or business-level exactly-once with idempotent sinks?
  6. Which downstream systems consume the stream: lakehouse tables, warehouses, search, caches, APIs, or ML features?
  7. What is the operational baseline: small team, platform team, managed service, or self-hosted multi-region cluster?

Default Workflow (Use Unless User Overrides)

  1. Choose the backbone first with references/platform-selection.md.
  2. Define topic, key, retention, replay, and schema strategy before discussing processors. Use assets/topic-contract-template.md.
  3. Choose the processing model with references/stream-processing-patterns.md: pass-through, enrich, aggregate, join, dedupe, or CDC normalization.
  4. Lock CDC and schema-governance rules with references/cdc-and-schema-governance.md and assets/cdc-rollout-checklist.md.
  5. Define delivery and sink behavior: upserts, deletes, late data, watermarking, and reprocessing boundaries.
  6. Add SLOs, lag monitoring, checkpoint and savepoint policy, and incident drills with references/operations-and-slos.md.
  7. Score tradeoffs explicitly with assets/streaming-platform-scorecard.md when the user asks for the "best" platform.

ASCII Flow

text
streaming data request
  -> classify need: events, CDC, enrichment, analytics, or low-latency delivery
  -> choose backbone: Kafka-compatible, Pulsar, Kinesis, or managed service
  -> define topics: owner, key, partitions, retention, replay, schema
  -> choose processor: pass-through, enrich, join, aggregate, dedupe, CDC normalize
  -> define sink semantics: idempotency, deletes, late data, reprocessing
  -> add SLOs, lag alerts, checkpoints, DLQ/retry, and incident drills
  -> document tradeoffs and verify managed-service behavior

Default Baseline

  • Backbone: Kafka-compatible event log unless a clear managed-service or multi-tenant requirement pushes elsewhere
  • Stream processing: Flink for stateful event-time pipelines; Kafka Streams for lighter in-app processing
  • CDC: log-based CDC first; avoid trigger-based CDC unless constraints force it
  • Contracts: registry-backed schemas for shared or long-lived topics
  • Reprocessing: plan for replay before launch; do not treat backfills as exceptional
  • Sinks: design sink idempotency explicitly; "exactly-once" claims are incomplete without sink behavior

Backbone Decision Table

RequirementKafka (self-hosted)RedpandaWarpStream / AutoMQPulsarKinesis
Broadest connector/CDC ecosystembestgoodgood (Kafka API)limitedlimited
Operational simplicitypoor (ZK removed in 4.x, KRaft only)good (single binary)best (serverless or S3-backed)poorbest
Cost at high throughputmediummediumlowest (storage on S3)mediumhigh (shard cost)
Multi-tenancy / namespace isolationlimitedlimitedlimitedbestAWS-only
Geo-replication built-invia MirrorMaker 2via MirrorMaker 2limitednativeAWS-only
Kafka API compatibilitycanonicalfullfullpartialno
Queue semantics (share groups)4.2+ GAroadmaproadmapnativeno
Cloud portabilityhighhighmedium (S3 dependency)highnone

WarpStream context (July 2026): Confluent acquired WarpStream (Sept 2024); IBM completed its $11B acquisition of Confluent on March 17, 2026 — WarpStream is now part of IBM's streaming portfolio. Production customers: Grafana Labs, Cursor, Robinhood. AutoMQ production: JD.com (13T msgs/day), Grab, HubSpot.

Exactly-Once Decision Path

text
Need exactly-once?
  -> Is the sink idempotent or transactional?
       No  -> Add sink-level deduplication key or upsert semantics first
       Yes -> Enable broker/processor exactly-once:
                Kafka: enable.idempotence=true + transactional.id
                Flink: CheckpointingMode.EXACTLY_ONCE + two-phase commit sink
  -> Does the sink support two-phase commit?
       No  -> Business-level idempotency (dedupe key + conditional write)
       Yes -> End-to-end exactly-once boundary confirmed
  -> Document the exact guarantee boundary — broker, processor, AND sink

Kafka Version Quick-Ref (July 2026)

VersionReleasedKey change
4.0March 2025ZooKeeper removed; KRaft-only; KIP-848 next-gen consumer rebalance
4.1~mid 2025KIP-932 share groups protocol/schema stabilized
4.2Feb 2026KIP-932 (Queues/share groups) GA; performance/reliability
4.3.0May 22 202625 KIPs, 600+ commits
4.3.1Jun 25 2026Patch release; fixes ~15 issues including a critical Kafka Streams RocksDB native memory leak — latest stable

KRaft migration note: All 4.x clusters are KRaft-only. Controller quorum sizing differs from ZooKeeper ensemble sizing — do not map 1:1. Migrate non-production first; use the provided migration tool; verify controller quorum before cutting over.

KIP-932 (Queues for Kafka): GA as of 4.2. Share groups allow multiple consumers to cooperate on the same partition with per-record acknowledgment — enables queue semantics without strict partition-per-consumer assignment. Evaluate for fan-out and task-queue workloads that previously required topic-per-consumer workarounds.

Flink Version Quick-Ref (July 2026)

VersionStatusNotes
2.3.0 (Jun 25 2026)latest stableChangelog conversion SQL operators (FROM_CHANGELOG/TO_CHANGELOG); redesigned native S3 filesystem on AWS SDK v2; adaptive partition selection for backpressure; ordered late-data handling for Process Table Functions
2.2.0 (Dec 2025)stableReal-time data + AI integrations; Paimon integration
2.0.x (2.0.2, May 11 2026)stable/maintainedDisaggregated state (remote primary storage); async execution model; Materialized Tables GA
1.xEOL pathSavepoints not forward-compatible with 2.x without explicit migration

Upgrade rule: Audit savepoints before upgrading from 1.x — checkpoint format changed. Review connector compatibility. Validate SQL Gateway behavior for complex queries before migrating Table API jobs.

Iceberg Streaming Ingestion Pattern (June 2026)

Standard production stack: Kafka -> Flink (Dynamic Iceberg Sink) -> Iceberg table -> compaction job.

# Flink Dynamic Iceberg Sink — baseline config
checkpoint.interval = 5 min          # drives commit frequency
write.target-file-size-bytes = 128MB  # reduces small-file problem
write.fanout.enabled = true           # unordered writes across partitions
schema-registry.compatibility = FULL_TRANSITIVE
# Compaction: run on cold partitions; skip hot (current) partition
  • Every streaming approach produces small files — pair ingestion with a scheduled compaction job.
  • 5-minute checkpoint interval produces ~90% fewer small files vs 1-minute.
  • Iceberg v3 (ratified): deletion vectors, row lineage (_row_id), variant data, default column values, geometry/geography types, nanosecond timestamps, encryption foundations. GA on Snowflake (May 7, 2026) and Databricks Runtime 18.0+ (Unity Catalog, all clouds). Trino is not yet v3-ready as of mid-2026 — verify per-engine v3 support before committing a multi-engine stack to v3 features.

Quick Reference

TaskResourceWhen to Use
Choose Kafka vs Redpanda vs Pulsar vs Kinesisreferences/platform-selection.mdNew platform selection or platform migration
Choose Flink vs Kafka Streams vs Sparkreferences/stream-processing-patterns.mdStateful processing, joins, windows, or low-latency transforms
Design CDC and schema evolutionreferences/cdc-and-schema-governance.mdDebezium, snapshots, tombstones, contracts, registry policy
Define lag, replay, failover, and checkpoint policyreferences/operations-and-slos.mdProduction hardening and incident prevention
Draft topic naming, keys, retention, and schema rulesassets/topic-contract-template.mdNew topic or shared event contract
Plan a CDC rollout safelyassets/cdc-rollout-checklist.mdDatabase-to-stream launch or CDC migration
Compare platform options side by sideassets/streaming-platform-scorecard.mdDecision reviews and recommendation memos

Operating Principles

1. Ordering Is Scoped, Not Global

  • Promise ordering only where the platform can really preserve it, usually per partition and key.
  • If the business process needs entity-level sequencing, make the key choice explicit.

2. Schemas Are Contracts

  • Shared topics need governed evolution rules, owners, compatibility mode, and deprecation windows.
  • Plain JSON is acceptable for prototyping, not for durable shared interfaces.

3. Replay Is A First-Class Operation

  • Retention, compaction, checkpoints, and sink idempotency define whether replay is safe.
  • Do not ship a pipeline that cannot be re-run after bad code or bad data.

4. "Exactly-Once" Is End-To-End, Not A Checkbox

  • Broker or processor guarantees are insufficient if the sink can duplicate writes or mishandle deletes.
  • State the exact boundary where deduplication or transactional guarantees end.

5. CDC Needs Delete And Snapshot Strategy

  • Decide how snapshots, schema changes, tombstones, and source failover behave before launch.
  • Downstream consumers must know whether deletes arrive as tombstones, hard deletes, or soft-delete flags.

Templates

  • assets/topic-contract-template.md
  • assets/cdc-rollout-checklist.md
  • assets/streaming-platform-scorecard.md

Known Traps

  • Designing the event backbone around broker features before defining domain ownership, event contracts, and replay expectations.
  • Treating topic retention as a substitute for a durable system of record, replay plan, or downstream recovery workflow.
  • Claiming exactly-once behavior without specifying the guarantee boundary across broker, processor, sink, and side effects.
  • Mixing operational events, analytical CDC, and integration commands into the same topics without independent retention, schema, and consumer-SLA rules.
  • Shipping CDC streams without idempotency keys, snapshot semantics, tombstone handling, and late-arrival rules agreed by consumers.
  • Scaling partitions, consumer groups, and stateful processors independently and then discovering the keying model breaks ordering or hotspot behavior.

Kafka 4.x KRaft-only

Kafka 4.0+ is KRaft-only — no ZooKeeper path exists. Controller quorum sizing differs from ZooKeeper ensemble sizing; do not map 1:1. Migrate non-production first; validate quorum before cutting over production. Latest stable: 4.3.1 (Jun 25, 2026) — a patch release; upgrade past 4.3.0 promptly if running Kafka Streams, since 4.3.0 shipped a RocksDB native memory leak. KIP-932 share groups (queue semantics) are GA as of 4.2.

Flink 2.x

Flink 2.0 changed checkpoint format and removed deprecated 1.x APIs. Savepoints from 1.x require explicit migration before restoring on 2.x state backends. Audit savepoints and connector compatibility before upgrading. Latest stable: 2.3.0 (Jun 25, 2026), which adds changelog-conversion SQL operators and a redesigned native S3 filesystem. Disaggregated state (remote primary storage) and Materialized Tables are production features since the 2.0.x line.

Common Anti-Patterns

  • Using the stream platform as a generic dumping ground for every event rather than curating contracts by domain and use case.
  • Putting business-critical enrichment or policy decisions in opaque stream jobs with no replay procedure, lineage, or owner.
  • Letting producers evolve schemas opportunistically while expecting consumers to absorb breaking changes.
  • Building low-latency pipelines on top of unstable event keys, non-deterministic joins, or external side-effect calls inside hot-path processors.
  • Choosing real-time processing because it sounds strategic when batch or micro-batch would meet the product and cost requirements.
  • Treating DLQs as the main error-handling strategy instead of fixing classifier logic, validation, backpressure, and recovery paths upstream.

Navigation

Current-Source Policy

  • Prefer trust_tier: primary entries in data/sources.json for platform capabilities, service limits, compatibility, and release-sensitive behavior.
  • For recommendation questions, verify current managed-service behavior, connector support, quotas, and pricing from official docs instead of relying on frozen comparisons.
  • Separate verified facts from judgment calls when comparing Kafka, Redpanda, Pulsar, Kinesis, Flink, and managed offerings.
  • If web access is unavailable, say the recommendation is partially unverified.

Related Skills

Fact-Checking

  • Use web search or web fetch to verify current external facts, versions, managed-service behavior, quotas, pricing, and release-specific capabilities before final answers.
  • Prefer primary sources; include source links and dates for volatile recommendations.
  • If web access is unavailable, state the limitation and mark guidance as unverified.

Learnings Loop

Before applying this skill on a non-trivial task, read learnings.consolidated.md in this directory (and learnings.md if present).

After applying it, if you encountered a pattern worth remembering, a mistake worth preventing, or a domain fact that surprised you, append one dated bullet to learnings.md via agents-skills-feedback-loop/scripts/append_learning.py. Do not modify SKILL.md itself.

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Data Streaming làm được gì?

Thiết kế nền tảng truyền dữ liệu trực tuyến cho Kafka, Flink, CDC và nạp dữ liệu vào lakehouse. Dùng khi lập kế hoạch cho hạ tầng sự kiện, pipeline CDC, quản trị schema hoặc phân phối dữ liệu lakehouse theo thời gian thực.

Vì sao nên dùng Data Streaming trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Data Streaming là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Data Streaming trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/vasilyu1983/AI-Agents-public/tree/main/frameworks/shared-skills/skills/data-streaming. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Data Streaming?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Data Streaming với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Data Streaming với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Data Streaming có miễn phí không?

Có. Kỹ năng này được vasilyu1983 phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇