# Windowing

> A mechanism that groups an unbounded stream into bounded windows of event time and aggregates each window separately.

Record: `architecture:windowing`
Kind: mechanism
Layer: [Execution Core](https://banes-lab.com/records/layer/execution-core.md)
Severity: contextual
Scope: data processing, streaming, aggregation
Canonical: https://banes-lab.com/ontology#architecture-windowing

Listed in [Architecture principles](https://banes-lab.com/api/records/architecture.md), after [Stateless Processing](https://banes-lab.com/records/architecture/stateless-processing.md) and before [Fan-out/Fan-in](https://banes-lab.com/records/architecture/fan-out-fan-in.md).

## Repair

- Refactored by: Aggregate over Windows
- Detected by: unbounded accumulator over a stream
- Violated by: aggregating an unbounded stream into ever-growing state
- Measured by: aggregation state growth rate
- Enforced by: streaming design review

## Requires

- [Event Time](https://banes-lab.com/records/lexicon/event-time.md)

## Reinforces

- [Streaming Architecture](https://banes-lab.com/records/architecture/streaming-architecture.md)
- [Bounded State](https://banes-lab.com/records/lexicon/bounded-state.md)

## Enables

- [Bounded Aggregation over Unbounded Streams](https://banes-lab.com/records/lexicon/bounded-aggregation-over-unbounded-streams.md)

## Conflicts with

- [Unbounded Accumulation](https://banes-lab.com/records/lexicon/unbounded-accumulation.md)

## In tension with

- [Late-Data Handling](https://banes-lab.com/records/lexicon/late-data-handling.md)

## Tensions

- [Windowing / Late-Data Handling](https://banes-lab.com/records/tension/late-data-handling-windowing.md)

## Severity

- [contextual](https://banes-lab.com/records/vocabulary/severity-contextual.md)

## Category

- [Streaming / Pipeline / Dataflow Processing](https://banes-lab.com/records/architecture-category/streaming-pipeline-dataflow-processing.md)

## Linked from

- [Streaming / Pipeline / Dataflow Processing](https://banes-lab.com/ontology/principles/architecture-category-streaming-pipeline-dataflow-processing.md)
- [Streaming / Pipeline / Dataflow Processing](https://banes-lab.com/ontology/lexicon/lexicon-category-streaming-pipeline-dataflow-processing.md)
- [Severity levels](https://banes-lab.com/ontology/schema/the-vocabulary-severity.md)
- [The resolutions](https://banes-lab.com/ontology/schema/the-resolutions.md)
