_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN
Let's talk

Apache Flink — real-time stream processing engine

08. 09. 2024 1 min read intermediate

Flink je nejpokročilejší engine pro stream processing. Exactly-once sémantika, event time processing a state management.

Stream-first přístup — batch je speciální případ streamingu.

CREATE TABLE orders (
    order_id STRING,
    amount DECIMAL(10,2),
    order_time TIMESTAMP(3),
    WATERMARK FOR order_time AS order_time - INTERVAL '5' SECOND
) WITH ('connector' = 'kafka', 'topic' = 'orders', 'format' = 'json');

SELECT
    TUMBLE_START(order_time, INTERVAL '5' MINUTE) AS window_start,
    COUNT(*) AS order_count,
    SUM(amount) AS revenue
FROM orders
GROUP BY TUMBLE(order_time, INTERVAL '5' MINUTE);

Comparison

  • Flink — true streaming, nejnižší latence
  • Spark Streaming — micro-batch, batch+stream hybrid
  • Kafka Streams — library, jednoduché transformace

Summary

Flink je top volba pro nízkou latenci a exactly-once processing. Flink SQL zpřístupňuje streaming analytikům.

apache flinkstream processingreal-timestateful
Share:

CORE SYSTEMS tým

Stavíme core systémy a AI agenty, které drží provoz. 15 let zkušeností s enterprise IT.