# alpinegizmo/flink-mobile-data-usage architecture

> Architecture diagram of the GitHub repository alpinegizmo/flink-mobile-data-usage, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/alpinegizmo/flink-mobile-data-usage
- Repository: https://github.com/alpinegizmo/flink-mobile-data-usage
- Video tour (about a minute): https://gitdiagram.com/alpinegizmo/flink-mobile-data-usage/video

## Overview

This repository is a Flink mobile-data-usage example: an operator runs a producer to populate Kafka’s input topic, then can run separate Flink jobs that consume it for quota enrichment, batch or streaming totals, and alerting. The README documents those inputs and job purposes, but no source excerpts are available, so internal calls, generated outputs, and downstream destinations are not inferred.

Main entry points: [`src/main/java/com/ververica/flink/example/datausage/KafkaProducerJob.java`](https://github.com/alpinegizmo/flink-mobile-data-usage/blob/main/src/main/java/com/ververica/flink/example/datausage/KafkaProducerJob.java) (Kafka Producer Job), [`src/main/java/com/ververica/flink/example/datausage/QuotaEnrichmentJob.java`](https://github.com/alpinegizmo/flink-mobile-data-usage/blob/main/src/main/java/com/ververica/flink/example/datausage/QuotaEnrichmentJob.java) (Quota Enrichment Job), [`src/main/java/com/ververica/flink/example/datausage/TotalUsageBatchJob.java`](https://github.com/alpinegizmo/flink-mobile-data-usage/blob/main/src/main/java/com/ververica/flink/example/datausage/TotalUsageBatchJob.java) (Batch Totals Job), [`src/main/java/com/ververica/flink/example/datausage/TotalUsageStreamingJob.java`](https://github.com/alpinegizmo/flink-mobile-data-usage/blob/main/src/main/java/com/ververica/flink/example/datausage/TotalUsageStreamingJob.java) (Streaming Totals Job)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Data Ingestion"]
  node_producer["Kafka Producer Job"]
  node_kafka[("Kafka Input Topic")]
end

subgraph group_enrichment["Quota Enrichment"]
  node_quota["Quota Enrichment Job"]
end

subgraph group_analytics["Usage Analytics"]
  node_batch["Batch Totals Job"]
  node_stream["Streaming Totals Job"]
end

subgraph group_alerting["Usage Alerting"]
  node_process_alert["Process Alerting Job"]
  node_sql_alert["SQL Alerting Job"]
end

node_operator(("Operator"))

node_operator -->|"runs first"| node_producer
node_producer -->|"populates input"| node_kafka
node_operator -->|"runs"| node_quota
node_operator -->|"runs"| node_batch
node_operator -->|"runs"| node_stream
node_operator -->|"runs"| node_process_alert
node_operator -->|"runs"| node_sql_alert
node_kafka -->|"read by"| node_quota
node_kafka -->|"read by"| node_batch
node_kafka -->|"read by"| node_stream
node_kafka -->|"read by"| node_process_alert
node_kafka -->|"read by"| node_sql_alert

click node_producer "https://github.com/alpinegizmo/flink-mobile-data-usage/blob/main/src/main/java/com/ververica/flink/example/datausage/KafkaProducerJob.java"
click node_quota "https://github.com/alpinegizmo/flink-mobile-data-usage/blob/main/src/main/java/com/ververica/flink/example/datausage/QuotaEnrichmentJob.java"
click node_batch "https://github.com/alpinegizmo/flink-mobile-data-usage/blob/main/src/main/java/com/ververica/flink/example/datausage/TotalUsageBatchJob.java"
click node_stream "https://github.com/alpinegizmo/flink-mobile-data-usage/blob/main/src/main/java/com/ververica/flink/example/datausage/TotalUsageStreamingJob.java"
click node_process_alert "https://github.com/alpinegizmo/flink-mobile-data-usage/blob/main/src/main/java/com/ververica/flink/example/datausage/UsageAlertingProcessFunctionJob.java"
click node_sql_alert "https://github.com/alpinegizmo/flink-mobile-data-usage/blob/main/src/main/java/com/ververica/flink/example/datausage/UsageAlertingSQLJob.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_producer,node_kafka toneBlue
class node_quota toneAmber
class node_batch,node_stream toneMint
class node_process_alert,node_sql_alert toneRose
class node_operator toneIndigo
```

## Components

### Data Ingestion

- [Kafka Producer Job](https://github.com/alpinegizmo/flink-mobile-data-usage/blob/main/src/main/java/com/ververica/flink/example/datausage/KafkaProducerJob.java): `src/main/java/com/ververica/flink/example/datausage/KafkaProducerJob.java`
- **Kafka Input Topic**

### Quota Enrichment

- [Quota Enrichment Job](https://github.com/alpinegizmo/flink-mobile-data-usage/blob/main/src/main/java/com/ververica/flink/example/datausage/QuotaEnrichmentJob.java): `src/main/java/com/ververica/flink/example/datausage/QuotaEnrichmentJob.java`

### Usage Analytics

- [Batch Totals Job](https://github.com/alpinegizmo/flink-mobile-data-usage/blob/main/src/main/java/com/ververica/flink/example/datausage/TotalUsageBatchJob.java): `src/main/java/com/ververica/flink/example/datausage/TotalUsageBatchJob.java`
- [Streaming Totals Job](https://github.com/alpinegizmo/flink-mobile-data-usage/blob/main/src/main/java/com/ververica/flink/example/datausage/TotalUsageStreamingJob.java): `src/main/java/com/ververica/flink/example/datausage/TotalUsageStreamingJob.java`

### Usage Alerting

- [Process Alerting Job](https://github.com/alpinegizmo/flink-mobile-data-usage/blob/main/src/main/java/com/ververica/flink/example/datausage/UsageAlertingProcessFunctionJob.java): `src/main/java/com/ververica/flink/example/datausage/UsageAlertingProcessFunctionJob.java`
- [SQL Alerting Job](https://github.com/alpinegizmo/flink-mobile-data-usage/blob/main/src/main/java/com/ververica/flink/example/datausage/UsageAlertingSQLJob.java): `src/main/java/com/ververica/flink/example/datausage/UsageAlertingSQLJob.java`

### Other components

- **Operator**

## Connections

- Operator → Kafka Producer Job: runs first
- Kafka Producer Job → Kafka Input Topic: populates input
- Operator → Quota Enrichment Job: runs
- Operator → Batch Totals Job: runs
- Operator → Streaming Totals Job: runs
- Operator → Process Alerting Job: runs
- Operator → SQL Alerting Job: runs
- Kafka Input Topic → Quota Enrichment Job: read by
- Kafka Input Topic → Batch Totals Job: read by
- Kafka Input Topic → Streaming Totals Job: read by
- Kafka Input Topic → Process Alerting Job: read by
- Kafka Input Topic → SQL Alerting Job: read by
