# Streaming Architecture

> A convention of processing data record by record as it arrives, with backpressure, instead of collecting it first.

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

Listed in [Architecture principles](https://banes-lab.com/api/records/architecture.md), after [Queuing Theory](https://banes-lab.com/records/architecture/queuing-theory.md) and before [Single-Pass Processing](https://banes-lab.com/records/architecture/single-pass-processing.md).

## Repair

- Refactored by: Use Stream Processor, Add Backpressure
- Detected by: unbounded collection over stream source
- Violated by: materializing unbounded streams
- Measured by: lag, [throughput](https://banes-lab.com/records/architecture/throughput.md), memory usage
- Enforced by: load/memory tests

## Requires

- [Event Stream](https://banes-lab.com/records/architecture/event-stream.md)
- [Backpressure](https://banes-lab.com/records/architecture/backpressure.md)

## Reinforces

- [Single-Pass Processing](https://banes-lab.com/records/architecture/single-pass-processing.md)

## Enables

- [Continuous Processing](https://banes-lab.com/records/lexicon/continuous-processing.md)

## In tension with

- [Ordering/State](https://banes-lab.com/records/lexicon/ordering-state.md)
- [Batch-Only Processing](https://banes-lab.com/records/lexicon/batch-only-processing.md)

## Tensions

- [Streaming Architecture / Ordering/State](https://banes-lab.com/records/tension/ordering-state-streaming-architecture.md)
- [Streaming Architecture / Batch-Only Processing](https://banes-lab.com/records/tension/batch-only-processing-streaming-architecture.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)

## Reinforced by

- [Windowing](https://banes-lab.com/records/architecture/windowing.md)

## Linked from

- [Event / Messaging / Asynchronous Architecture](https://banes-lab.com/ontology/principles/architecture-category-event-messaging-asynchronous-architecture.md)
- [Error Handling / Resilience](https://banes-lab.com/ontology/principles/architecture-category-error-handling-resilience.md)
- [Streaming / Pipeline / Dataflow Processing](https://banes-lab.com/ontology/principles/architecture-category-streaming-pipeline-dataflow-processing.md)
- [Core Vocabulary](https://banes-lab.com/ontology/lexicon/lexicon-category-core-vocabulary.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)
