Joplin Server Image Transcription Flow

System Design · flowchart diagram · NOASSERTION

Illustrates the asynchronous process of image transcription in Joplin, from client upload to processing by a dedicated Transcribe service using a job queue

Source: https://github.com/laurent22/joplin/blob/9e46f80713c5b7c13d40a21b137539b644748ac0/readme/apps/transcribe/system_architecture.md
Curated by laurent22
Joplin Transcription LLM AI Workflow Microservice Queueing System

Mermaid source

flowchart LR
	subgraph Client
		ClientNode((Joplin))
	end

	subgraph JoplinServer
		JS[[REST API]]
	end

	subgraph Transcribe
		API[[Transcribe API :4567]]
		Q[(Internal Queue)]
		Worker[[Job Processor]]
		DB[(PostgreSQL - Jobs)]
		Store[(Images Folder)]
		Engine[[LlamaCPP + LLM]]
	end

	ClientNode -- "POST /transcribe" --> JS
	JS -- "POST /transcribe?secret=***" --> API
	API -- "Persist job (created)" --> DB
	API -- "Save image" --> Store
	API -- "Enqueue job" --> Q

	Worker -- "Dequeue" --> Q
	Worker -- "Load image" --> Store
	Worker -- "Transcribe" --> Engine
	Worker -- "Update status/result" --> DB
	Worker -- "Delete image" --> Store

	ClientNode -- "POST /transcribe/:job_id" --> JS
	JS -- "POST /transcribe/:job_id?secret=***" --> API
	API -- "Read status/result" --> DB
	API -- "Status/result" --> JS
	JS -- "Status/result (text)" --> ClientNode

What this diagram shows

This diagram details the interaction between a Joplin Client, Joplin Server, and a Transcribe service for image transcription. It covers the flow of uploading an image, creating a transcription job, saving the image, enqueuing the job, processing it with a worker and LLM, and polling for job status and results.

When to use it

Use this pattern for designing systems that require asynchronous processing of user-submitted content, such as image analysis, video encoding, or document conversion, where immediate results are not required and background processing is beneficial.

How to adapt it for your project

This flow can be adapted by replacing the LLM with other AI models, using different message brokers (e.g., Kafka, RabbitMQ) for the internal queue, integrating cloud storage services (e.g., S3) for images, or implementing different authentication mechanisms for the Transcribe API.

Key concepts