Illustrates the asynchronous process of image transcription in Joplin, from client upload to processing by a dedicated Transcribe service using a job queue
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
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.
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.
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.