# deeksha1502/knowledge-platform-jobs architecture

> Architecture diagram of the GitHub repository deeksha1502/knowledge-platform-jobs, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/deeksha1502/knowledge-platform-jobs
- Repository: https://github.com/deeksha1502/knowledge-platform-jobs

## Overview

Knowledge Platform Jobs is a suite of Apache Flink event-processing jobs. The documented workflow consumes Kafka events, performs content lifecycle or indexing work, and writes results to platform stores or external services. The graph preserves the major documented jobs and the substantial content-embedding pipeline visible in the source index. Publishing dispatch is shown where the router excerpt identifies its output branches; other job internals and wiring are limited to README-level evidence because their task sources were not sampled.

Main entry points: [`publish-pipeline/knowlg-publish/src/main/scala/org/sunbird/job/knowlg/function/PublishEventRouter.scala`](https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/publish-pipeline/knowlg-publish/src/main/scala/org/sunbird/job/knowlg/function/PublishEventRouter.scala) (Publish router), [`content-embedding-job/embedding-services/src/main/scala/org/sunbird/job/contentembedding/factory/EmbeddingServiceFactory.scala`](https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/content-embedding-job/embedding-services/src/main/scala/org/sunbird/job/contentembedding/factory/EmbeddingServiceFactory.scala) (Embedding provider factory), [`content-embedding-job/content-embedding-core/src/main/scala/org/sunbird/job/contentembedding/function/BatchEmbeddingFunction.scala`](https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/content-embedding-job/content-embedding-core/src/main/scala/org/sunbird/job/contentembedding/function/BatchEmbeddingFunction.scala) (Embedding batching), [`publish-pipeline/knowlg-publish/src/main/scala/org/sunbird/job/knowlg/function/ContentPublishFunction.scala`](https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/publish-pipeline/knowlg-publish/src/main/scala/org/sunbird/job/knowlg/function/ContentPublishFunction.scala) (Content publishing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_publishing["Publishing"]
  node_publishrouter["Publish router"]
  node_contentpublish["Content publishing"]
  node_collectionpublish["Collection publishing"]
  node_questionpublish["Question publishing"]
  node_questionsetpublish["Question-set publishing"]
  node_publishcore["Publishing logic"]
  node_livepublisher["Live-node republisher"]
end

subgraph group_content["Content Processing"]
  node_assetenrichment["Asset enrichment"]
  node_embeddingtask["Embedding stream task"]
  node_extract["Content extraction"]
  node_chunking["Text chunking"]
  node_chunkstrategies["Chunk strategies"]
  node_batching["Embedding batching"]
  node_embeddingfactory["Embedding provider factory"]
  node_e5["E5 provider"]
  node_openai["OpenAI provider"]
  node_quantization["Vector quantization"]
  node_quantstrategies["Quantization strategies"]
  node_searchsink["OpenSearch sink"]
end

subgraph group_transactions["Transaction Processing"]
  node_transaction["Transaction processor"]
  node_transactionrouter["Search index router"]
end

subgraph group_platform["Shared Platform Services"]
  node_jobs_core["Shared job utilities"]
  node_cassandra_migration["Cassandra migration"]
end

subgraph group_media["Media and Codes"]
  node_dialcode["Dial-code context updater"]
  node_qrcode["QR image generator"]
  node_videostream["Video stream URLs"]
  node_mediaproviders["Cloud media providers"]
end

node_kafka["Kafka events"]
node_flink["Flink jobs"]
node_platformstores[("Platform stores")]

node_kafka -->|"supplies events"| node_flink
node_flink -->|"writes results"| node_platformstores
node_publishrouter -->|"routes content"| node_contentpublish
node_publishrouter -->|"routes collections"| node_collectionpublish
node_publishrouter -->|"routes questions"| node_questionpublish
node_publishrouter -->|"routes question sets"| node_questionsetpublish
node_batching -->|"creates provider"| node_embeddingfactory
node_embeddingfactory -->|"selects provider"| node_e5
node_embeddingfactory -->|"selects provider"| node_openai

click node_publishrouter "https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/publish-pipeline/knowlg-publish/src/main/scala/org/sunbird/job/knowlg/function/PublishEventRouter.scala"
click node_contentpublish "https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/publish-pipeline/knowlg-publish/src/main/scala/org/sunbird/job/knowlg/function/ContentPublishFunction.scala"
click node_collectionpublish "https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/publish-pipeline/knowlg-publish/src/main/scala/org/sunbird/job/knowlg/function/CollectionPublishFunction.scala"
click node_questionpublish "https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/publish-pipeline/knowlg-publish/src/main/scala/org/sunbird/job/knowlg/function/QuestionPublishFunction.scala"
click node_questionsetpublish "https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/publish-pipeline/knowlg-publish/src/main/scala/org/sunbird/job/knowlg/function/QuestionSetPublishFunction.scala"
click node_publishcore "https://github.com/deeksha1502/knowledge-platform-jobs/tree/master/publish-pipeline/publish-core/src/main/scala/org/sunbird/job/publish"
click node_livepublisher "https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/publish-pipeline/live-node-publisher/src/main/scala/org/sunbird/job/livenodepublisher/function/LivePublishEventRouter.scala"
click node_assetenrichment "https://github.com/deeksha1502/knowledge-platform-jobs/tree/master/asset-enrichment/src/main/scala/org/sunbird/job/assetenricment/functions"
click node_embeddingtask "https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/content-embedding-job/content-embedding-core/src/main/scala/org/sunbird/job/contentembedding/task/ContentEmbeddingStreamTask.scala"
click node_extract "https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/content-embedding-job/content-embedding-core/src/main/scala/org/sunbird/job/contentembedding/function/ExtractFunction.scala"
click node_chunking "https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/content-embedding-job/content-embedding-core/src/main/scala/org/sunbird/job/contentembedding/function/ChunkingFunction.scala"
click node_chunkstrategies "https://github.com/deeksha1502/knowledge-platform-jobs/tree/master/content-embedding-job/chunking-strategies/src/main/scala/org/sunbird/job/contentembedding/strategy"
click node_batching "https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/content-embedding-job/content-embedding-core/src/main/scala/org/sunbird/job/contentembedding/function/BatchEmbeddingFunction.scala"
click node_embeddingfactory "https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/content-embedding-job/embedding-services/src/main/scala/org/sunbird/job/contentembedding/factory/EmbeddingServiceFactory.scala"
click node_e5 "https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/content-embedding-job/embedding-services/src/main/scala/org/sunbird/job/contentembedding/service/E5EmbeddingService.scala"
click node_openai "https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/content-embedding-job/embedding-services/src/main/scala/org/sunbird/job/contentembedding/service/OpenAIEmbeddingService.scala"
click node_quantization "https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/content-embedding-job/content-embedding-core/src/main/scala/org/sunbird/job/contentembedding/function/QuantizationFunction.scala"
click node_quantstrategies "https://github.com/deeksha1502/knowledge-platform-jobs/tree/master/content-embedding-job/quantization-strategies/src/main/scala/org/sunbird/job/contentembedding/strategy"
click node_searchsink "https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/content-embedding-job/content-embedding-core/src/main/scala/org/sunbird/job/contentembedding/function/BatchedOpenSearchSinkFunction.scala"
click node_transaction "https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/transaction-event-processor/src/main/scala/org/sunbird/job/transaction/service/TransactionEventProcessorService.scala"
click node_transactionrouter "https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/transaction-event-processor/src/main/scala/org/sunbird/job/transaction/functions/SearchIndexerRouter.scala"
click node_jobs_core "https://github.com/deeksha1502/knowledge-platform-jobs/tree/master/jobs-core/src/main/scala/org/sunbird/job"
click node_dialcode "https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/dialcode-context-updater/src/main/scala/org/sunbird/job/dialcodecontextupdater/task/DialcodeContextUpdaterStreamTask.scala"
click node_qrcode "https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/qrcode-image-generator/src/main/scala/org/sunbird/job/qrimagegenerator/functions/QRCodeImageGeneratorFunction.scala"
click node_videostream "https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/video-stream-generator/src/main/scala/org/sunbird/job/videostream/service/VideoStreamService.scala"
click node_mediaproviders "https://github.com/deeksha1502/knowledge-platform-jobs/tree/master/video-stream-generator/src/main/scala/org/sunbird/job/videostream/service/impl"
click node_cassandra_migration "https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/cassandra-data-migration/src/main/scala/org/sunbird/job/task/CassandraDataMigrationStreamTask.scala"

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_publishrouter,node_contentpublish,node_collectionpublish,node_questionpublish,node_questionsetpublish,node_publishcore,node_livepublisher toneBlue
class node_assetenrichment,node_embeddingtask,node_extract,node_chunking,node_chunkstrategies,node_batching,node_embeddingfactory,node_e5,node_openai,node_quantization,node_quantstrategies,node_searchsink,node_platformstores toneAmber
class node_transaction,node_transactionrouter toneMint
class node_jobs_core,node_cassandra_migration toneRose
class node_dialcode,node_qrcode,node_videostream,node_mediaproviders,node_kafka,node_flink toneIndigo
```

## Components

### Publishing

- [Publish router](https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/publish-pipeline/knowlg-publish/src/main/scala/org/sunbird/job/knowlg/function/PublishEventRouter.scala): `publish-pipeline/knowlg-publish/src/main/scala/org/sunbird/job/knowlg/function/PublishEventRouter.scala`
- [Content publishing](https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/publish-pipeline/knowlg-publish/src/main/scala/org/sunbird/job/knowlg/function/ContentPublishFunction.scala): `publish-pipeline/knowlg-publish/src/main/scala/org/sunbird/job/knowlg/function/ContentPublishFunction.scala`
- [Collection publishing](https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/publish-pipeline/knowlg-publish/src/main/scala/org/sunbird/job/knowlg/function/CollectionPublishFunction.scala): `publish-pipeline/knowlg-publish/src/main/scala/org/sunbird/job/knowlg/function/CollectionPublishFunction.scala`
- [Question publishing](https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/publish-pipeline/knowlg-publish/src/main/scala/org/sunbird/job/knowlg/function/QuestionPublishFunction.scala): `publish-pipeline/knowlg-publish/src/main/scala/org/sunbird/job/knowlg/function/QuestionPublishFunction.scala`
- [Question-set publishing](https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/publish-pipeline/knowlg-publish/src/main/scala/org/sunbird/job/knowlg/function/QuestionSetPublishFunction.scala): `publish-pipeline/knowlg-publish/src/main/scala/org/sunbird/job/knowlg/function/QuestionSetPublishFunction.scala`
- [Publishing logic](https://github.com/deeksha1502/knowledge-platform-jobs/tree/master/publish-pipeline/publish-core/src/main/scala/org/sunbird/job/publish): `publish-pipeline/publish-core/src/main/scala/org/sunbird/job/publish`
- [Live-node republisher](https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/publish-pipeline/live-node-publisher/src/main/scala/org/sunbird/job/livenodepublisher/function/LivePublishEventRouter.scala): `publish-pipeline/live-node-publisher/src/main/scala/org/sunbird/job/livenodepublisher/function/LivePublishEventRouter.scala`

### Content Processing

- [Asset enrichment](https://github.com/deeksha1502/knowledge-platform-jobs/tree/master/asset-enrichment/src/main/scala/org/sunbird/job/assetenricment/functions): `asset-enrichment/src/main/scala/org/sunbird/job/assetenricment/functions`
- [Embedding stream task](https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/content-embedding-job/content-embedding-core/src/main/scala/org/sunbird/job/contentembedding/task/ContentEmbeddingStreamTask.scala): `content-embedding-job/content-embedding-core/src/main/scala/org/sunbird/job/contentembedding/task/ContentEmbeddingStreamTask.scala`
- [Content extraction](https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/content-embedding-job/content-embedding-core/src/main/scala/org/sunbird/job/contentembedding/function/ExtractFunction.scala): `content-embedding-job/content-embedding-core/src/main/scala/org/sunbird/job/contentembedding/function/ExtractFunction.scala`
- [Text chunking](https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/content-embedding-job/content-embedding-core/src/main/scala/org/sunbird/job/contentembedding/function/ChunkingFunction.scala): `content-embedding-job/content-embedding-core/src/main/scala/org/sunbird/job/contentembedding/function/ChunkingFunction.scala`
- [Chunk strategies](https://github.com/deeksha1502/knowledge-platform-jobs/tree/master/content-embedding-job/chunking-strategies/src/main/scala/org/sunbird/job/contentembedding/strategy): `content-embedding-job/chunking-strategies/src/main/scala/org/sunbird/job/contentembedding/strategy`
- [Embedding batching](https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/content-embedding-job/content-embedding-core/src/main/scala/org/sunbird/job/contentembedding/function/BatchEmbeddingFunction.scala): `content-embedding-job/content-embedding-core/src/main/scala/org/sunbird/job/contentembedding/function/BatchEmbeddingFunction.scala`
- [Embedding provider factory](https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/content-embedding-job/embedding-services/src/main/scala/org/sunbird/job/contentembedding/factory/EmbeddingServiceFactory.scala): `content-embedding-job/embedding-services/src/main/scala/org/sunbird/job/contentembedding/factory/EmbeddingServiceFactory.scala`
- [E5 provider](https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/content-embedding-job/embedding-services/src/main/scala/org/sunbird/job/contentembedding/service/E5EmbeddingService.scala): `content-embedding-job/embedding-services/src/main/scala/org/sunbird/job/contentembedding/service/E5EmbeddingService.scala`
- [OpenAI provider](https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/content-embedding-job/embedding-services/src/main/scala/org/sunbird/job/contentembedding/service/OpenAIEmbeddingService.scala): `content-embedding-job/embedding-services/src/main/scala/org/sunbird/job/contentembedding/service/OpenAIEmbeddingService.scala`
- [Vector quantization](https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/content-embedding-job/content-embedding-core/src/main/scala/org/sunbird/job/contentembedding/function/QuantizationFunction.scala): `content-embedding-job/content-embedding-core/src/main/scala/org/sunbird/job/contentembedding/function/QuantizationFunction.scala`
- [Quantization strategies](https://github.com/deeksha1502/knowledge-platform-jobs/tree/master/content-embedding-job/quantization-strategies/src/main/scala/org/sunbird/job/contentembedding/strategy): `content-embedding-job/quantization-strategies/src/main/scala/org/sunbird/job/contentembedding/strategy`
- [OpenSearch sink](https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/content-embedding-job/content-embedding-core/src/main/scala/org/sunbird/job/contentembedding/function/BatchedOpenSearchSinkFunction.scala): `content-embedding-job/content-embedding-core/src/main/scala/org/sunbird/job/contentembedding/function/BatchedOpenSearchSinkFunction.scala`

### Transaction Processing

- [Transaction processor](https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/transaction-event-processor/src/main/scala/org/sunbird/job/transaction/service/TransactionEventProcessorService.scala): `transaction-event-processor/src/main/scala/org/sunbird/job/transaction/service/TransactionEventProcessorService.scala`
- [Search index router](https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/transaction-event-processor/src/main/scala/org/sunbird/job/transaction/functions/SearchIndexerRouter.scala): `transaction-event-processor/src/main/scala/org/sunbird/job/transaction/functions/SearchIndexerRouter.scala`

### Shared Platform Services

- [Shared job utilities](https://github.com/deeksha1502/knowledge-platform-jobs/tree/master/jobs-core/src/main/scala/org/sunbird/job): `jobs-core/src/main/scala/org/sunbird/job`
- [Cassandra migration](https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/cassandra-data-migration/src/main/scala/org/sunbird/job/task/CassandraDataMigrationStreamTask.scala): `cassandra-data-migration/src/main/scala/org/sunbird/job/task/CassandraDataMigrationStreamTask.scala`

### Media and Codes

- [Dial-code context updater](https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/dialcode-context-updater/src/main/scala/org/sunbird/job/dialcodecontextupdater/task/DialcodeContextUpdaterStreamTask.scala): `dialcode-context-updater/src/main/scala/org/sunbird/job/dialcodecontextupdater/task/DialcodeContextUpdaterStreamTask.scala`
- [QR image generator](https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/qrcode-image-generator/src/main/scala/org/sunbird/job/qrimagegenerator/functions/QRCodeImageGeneratorFunction.scala): `qrcode-image-generator/src/main/scala/org/sunbird/job/qrimagegenerator/functions/QRCodeImageGeneratorFunction.scala`
- [Video stream URLs](https://github.com/deeksha1502/knowledge-platform-jobs/blob/master/video-stream-generator/src/main/scala/org/sunbird/job/videostream/service/VideoStreamService.scala): `video-stream-generator/src/main/scala/org/sunbird/job/videostream/service/VideoStreamService.scala`
- [Cloud media providers](https://github.com/deeksha1502/knowledge-platform-jobs/tree/master/video-stream-generator/src/main/scala/org/sunbird/job/videostream/service/impl): `video-stream-generator/src/main/scala/org/sunbird/job/videostream/service/impl`

### Other components

- **Kafka events**
- **Flink jobs**
- **Platform stores**

## Connections

- Kafka events → Flink jobs: supplies events
- Flink jobs → Platform stores: writes results
- Publish router → Content publishing: routes content (evidence: `publish-pipeline/knowlg-publish/src/main/scala/org/sunbird/job/knowlg/function/PublishEventRouter.scala`)
- Publish router → Collection publishing: routes collections (evidence: `publish-pipeline/knowlg-publish/src/main/scala/org/sunbird/job/knowlg/function/PublishEventRouter.scala`)
- Publish router → Question publishing: routes questions (evidence: `publish-pipeline/knowlg-publish/src/main/scala/org/sunbird/job/knowlg/function/PublishEventRouter.scala`)
- Publish router → Question-set publishing: routes question sets (evidence: `publish-pipeline/knowlg-publish/src/main/scala/org/sunbird/job/knowlg/function/PublishEventRouter.scala`)
- Embedding batching → Embedding provider factory: creates provider (evidence: `content-embedding-job/content-embedding-core/src/main/scala/org/sunbird/job/contentembedding/function/BatchEmbeddingFunction.scala`)
- Embedding provider factory → E5 provider: selects provider (evidence: `content-embedding-job/embedding-services/src/main/scala/org/sunbird/job/contentembedding/factory/EmbeddingServiceFactory.scala`)
- Embedding provider factory → OpenAI provider: selects provider (evidence: `content-embedding-job/embedding-services/src/main/scala/org/sunbird/job/contentembedding/factory/EmbeddingServiceFactory.scala`)
