Late Events, Updates, and Retractions

Correct a previously emitted window aggregate with a replacement or signed change and keep the correction associated with the same result identity.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. Give early and revised output a shared key
  2. Choose a contract for changes and finality

Give early and revised output a shared key

Suppose a window first emits count \(12\) and then receives one more qualifying event. A keyed replacement can emit \(13\) for the same group and window, letting the sink retain its newest value. An append-only stream of totals \(12,13\) needs different consumer logic. Summing both totals would count previously observed events twice.

Choose a contract for changes and finality

A changelog can represent a retraction of \(12\) and insertion of \(13\), or a delta of one where the aggregate supports that interpretation. Session merges can need more than one output correction. Retention specifies whether a very late event can still affect state. Streaming windows explain result identity. Incremental join deltas use signed multiplicities for related updates.[1][2]

References

  1. Tyler Akidau et al., The Dataflow Model ↩
  2. Apache Beam, Programming Guide ↩