{
  "code": null,
  "collection": "architecture",
  "href": "https://banes-lab.com/ontology#architecture-windowing",
  "id": "windowing",
  "kind": "mechanism",
  "layer": {
    "href": "https://banes-lab.com/ontology/schema#layer-execution-core",
    "json": "https://banes-lab.com/json/records/layer/execution-core",
    "label": "Execution Core",
    "markdown": "https://banes-lab.com/records/layer/execution-core.md",
    "ref": "layer:execution-core"
  },
  "name": "Windowing",
  "ref": "architecture:windowing",
  "relations": [
    {
      "links": [
        {
          "href": "https://banes-lab.com/ontology/lexicon#lexicon-event-time",
          "json": "https://banes-lab.com/json/records/lexicon/event-time",
          "label": "Event Time",
          "markdown": "https://banes-lab.com/records/lexicon/event-time.md",
          "ref": "lexicon:event-time"
        }
      ],
      "relation": "requires"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/ontology#architecture-streaming-architecture",
          "json": "https://banes-lab.com/json/records/architecture/streaming-architecture",
          "label": "Streaming Architecture",
          "markdown": "https://banes-lab.com/records/architecture/streaming-architecture.md",
          "ref": "architecture:streaming-architecture"
        },
        {
          "href": "https://banes-lab.com/ontology/lexicon#lexicon-bounded-state",
          "json": "https://banes-lab.com/json/records/lexicon/bounded-state",
          "label": "Bounded State",
          "markdown": "https://banes-lab.com/records/lexicon/bounded-state.md",
          "ref": "lexicon:bounded-state"
        }
      ],
      "relation": "reinforces"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/ontology/lexicon#lexicon-bounded-aggregation-over-unbounded-streams",
          "json": "https://banes-lab.com/json/records/lexicon/bounded-aggregation-over-unbounded-streams",
          "label": "Bounded Aggregation over Unbounded Streams",
          "markdown": "https://banes-lab.com/records/lexicon/bounded-aggregation-over-unbounded-streams.md",
          "ref": "lexicon:bounded-aggregation-over-unbounded-streams"
        }
      ],
      "relation": "enables"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/ontology/lexicon#lexicon-unbounded-accumulation",
          "json": "https://banes-lab.com/json/records/lexicon/unbounded-accumulation",
          "label": "Unbounded Accumulation",
          "markdown": "https://banes-lab.com/records/lexicon/unbounded-accumulation.md",
          "ref": "lexicon:unbounded-accumulation"
        }
      ],
      "relation": "conflicts-with"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/ontology/lexicon#lexicon-late-data-handling",
          "json": "https://banes-lab.com/json/records/lexicon/late-data-handling",
          "label": "Late-Data Handling",
          "markdown": "https://banes-lab.com/records/lexicon/late-data-handling.md",
          "ref": "lexicon:late-data-handling"
        }
      ],
      "relation": "tensions-with"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/ontology/schema#tension-late-data-handling-windowing",
          "json": "https://banes-lab.com/json/records/tension/late-data-handling-windowing",
          "label": "Windowing / Late-Data Handling",
          "markdown": "https://banes-lab.com/records/tension/late-data-handling-windowing.md",
          "ref": "tension:late-data-handling-windowing"
        }
      ],
      "relation": "tensions"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/ontology/lexicon#lexicon-unbounded-accumulation",
          "json": "https://banes-lab.com/json/records/lexicon/unbounded-accumulation",
          "label": "Unbounded Accumulation",
          "markdown": "https://banes-lab.com/records/lexicon/unbounded-accumulation.md",
          "ref": "lexicon:unbounded-accumulation"
        }
      ],
      "relation": "violated-by"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/ontology/schema#vocabulary-severity-contextual",
          "json": "https://banes-lab.com/json/records/vocabulary/severity-contextual",
          "label": "contextual",
          "markdown": "https://banes-lab.com/records/vocabulary/severity-contextual.md",
          "ref": "vocabulary:severity-contextual"
        }
      ],
      "relation": "severity"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/ontology#architecture-category-streaming-pipeline-dataflow-processing",
          "json": "https://banes-lab.com/json/records/architecture-category/streaming-pipeline-dataflow-processing",
          "label": "Streaming / Pipeline / Dataflow Processing",
          "markdown": "https://banes-lab.com/records/architecture-category/streaming-pipeline-dataflow-processing.md",
          "ref": "architecture-category:streaming-pipeline-dataflow-processing"
        }
      ],
      "relation": "category"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/ontology#architecture-forward-only-processing",
          "json": "https://banes-lab.com/json/records/architecture/forward-only-processing",
          "label": "Forward-Only Processing",
          "markdown": "https://banes-lab.com/records/architecture/forward-only-processing.md",
          "ref": "architecture:forward-only-processing"
        }
      ],
      "relation": "refactors"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/ontology#architecture-category-streaming-pipeline-dataflow-processing",
          "json": "https://banes-lab.com/json/ontology/principles/architecture-category-streaming-pipeline-dataflow-processing",
          "label": "Streaming / Pipeline / Dataflow Processing",
          "markdown": "https://banes-lab.com/ontology/principles/architecture-category-streaming-pipeline-dataflow-processing.md",
          "ref": "chapter:/ontology#architecture-category-streaming-pipeline-dataflow-processing"
        },
        {
          "href": "https://banes-lab.com/ontology/lexicon#lexicon-category-streaming-pipeline-dataflow-processing",
          "json": "https://banes-lab.com/json/ontology/lexicon/lexicon-category-streaming-pipeline-dataflow-processing",
          "label": "Streaming / Pipeline / Dataflow Processing",
          "markdown": "https://banes-lab.com/ontology/lexicon/lexicon-category-streaming-pipeline-dataflow-processing.md",
          "ref": "chapter:/ontology/lexicon#lexicon-category-streaming-pipeline-dataflow-processing"
        },
        {
          "href": "https://banes-lab.com/ontology/schema#the-vocabulary-severity",
          "json": "https://banes-lab.com/json/ontology/schema/the-vocabulary-severity",
          "label": "Severity levels",
          "markdown": "https://banes-lab.com/ontology/schema/the-vocabulary-severity.md",
          "ref": "chapter:/ontology/schema#the-vocabulary-severity"
        },
        {
          "href": "https://banes-lab.com/ontology/schema#the-resolutions",
          "json": "https://banes-lab.com/json/ontology/schema/the-resolutions",
          "label": "The resolutions",
          "markdown": "https://banes-lab.com/ontology/schema/the-resolutions.md",
          "ref": "chapter:/ontology/schema#the-resolutions"
        }
      ],
      "relation": "linked-from"
    }
  ],
  "summary": "A mechanism that groups an unbounded stream into bounded windows of event time and aggregates each window separately.",
  "siblings": {
    "next": {
      "href": "https://banes-lab.com/ontology#architecture-fan-out-fan-in",
      "json": "https://banes-lab.com/json/records/architecture/fan-out-fan-in",
      "label": "Fan-out/Fan-in",
      "markdown": "https://banes-lab.com/records/architecture/fan-out-fan-in.md",
      "ref": "architecture:fan-out-fan-in"
    },
    "previous": {
      "href": "https://banes-lab.com/ontology#architecture-stateless-processing",
      "json": "https://banes-lab.com/json/records/architecture/stateless-processing",
      "label": "Stateless Processing",
      "markdown": "https://banes-lab.com/records/architecture/stateless-processing.md",
      "ref": "architecture:stateless-processing"
    }
  },
  "up": {
    "href": null,
    "json": "https://banes-lab.com/json/api/records/architecture",
    "label": "Architecture principles",
    "markdown": "https://banes-lab.com/api/records/architecture.md",
    "ref": "api:records/architecture"
  },
  "aliases": [],
  "exemplar": {
    "after": "for await (const window of fooStream.tumbling({ seconds: 60 })) {\n  emit(window.start, window.events.reduce((sum, event) => sum + event.value, 0));\n}",
    "before": "const total = allFooEvents.reduce((sum, event) => sum + event.value, 0);",
    "lang": "ts",
    "medium": "code"
  },
  "formedBy": null,
  "scope": [
    "data processing",
    "streaming",
    "aggregation"
  ],
  "severity": "contextual"
}
