Common Library
Storage
Generated and recorded content — synthesized speech, session recordings, composed thumbnails — is kept in object storage rather than in a database, behind an abstraction so the backend is a deployment decision.
Abstraction
The blocking contracts are declared in lib (ResourceStorage, and the readable, writable and
deletable interfaces it composes); common adds the reactive ones:
interface ReactiveReadableResourceStorage {
fun get(path: String): Mono<Resource>
fun inputStream(path: String): Flux<ByteArray>
fun list(path: String): Flux<Resource>
}
interface ReactiveWritableResourceStorage {
fun write(path: String, content: Flux<ByteArray>): Mono<Void>
fun copy(sourcePath: String, targetPath: String): Mono<Void>
}
interface ReactiveDeletableResourceStorage {
fun delete(path: String): Mono<Void>
}
ReactiveResourceStorage composes them, and is the bean the engine injects wherever content is
read or written.
Backends
| Implementation | Notes |
|---|---|
S3-compatible storage on the AWS SDK. The endpoint is configurable, so the same implementation serves both AWS S3 and MinIO. Blocking, with multipart upload handled through a custom output stream. |
|
Azure Blob Storage, natively reactive, with hierarchical listing. |
|
Local filesystem, keeping resource metadata in a sidecar properties file next to each resource. The default for local development. |
ResourceStorageFactory selects the implementation from StorageType (S3, Azure, File).
Note that the reactive factory has no S3 implementation — an S3 deployment uses the blocking
client.
Configuration
StorageProperties maps the promethist.storage prefix:
| Property | Meaning |
|---|---|
|
|
|
The container, bucket or directory the application works in. |
|
Service endpoint — set it for MinIO or another S3-compatible service. |
|
Region, for S3. |
|
Credentials, when they are not supplied through the environment. |
For example, local development writes to the filesystem:
promethist.storage.type=file
promethist.storage.ref=../data/promethist-engine
while a deployment points at a cloud container and takes its credentials from the mounted secret — see Core Deployment.
What Is Stored Where
| Path prefix | Content |
|---|---|
|
Session recordings, written by the recording filter and served by the recording endpoints. |
|
Bridge test run recordings — see Bridge Results. |
|
Composed avatar, environment and live-avatar thumbnails, cached with an expiration so they are recomposed only when stale. |
Synthesized speech is cached under its own key derived from the utterance and voice, which is what
useCaching enables on a conversation.