rfc(adr): Pluggable Provider Mesh SPI — Dynamic Storage, Video CDN & Live Streaming Adapters (Bunny, S3, Cloudflare, Livepeer)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 12/100
Research direction
This is an ADR/RFC, not a scoped task: read ADR-027, ADR-029 and orazaka-contracts#9 first, then draft docs/adr/ADR-080-pluggable-provider-mesh-storage-stream-live.md. Only after the ADR is agreed do the StoragePort/VideoStreamPort/LiveStreamPort interfaces in orazaka-contracts, the adapters and the TCK conformance suite become workable. Done means the ADR is merged and the SPI boundaries are agreed.
Written by the indexing model from the issue text.
Description
Contexte & Problématique
La souveraineté technologique de Krizaka et l'agilité de ses déploiements imposent une règle cardinale : aucun code métier ne doit être couplé à un fournisseur tiers spécifique (zéro vendor lock-in).
Qu'il s'agisse de :
- Stockage d'objets (Bunny Storage, AWS S3, Cloudflare R2, MinIO self-hosted),
- Distribution & Transcodage Vidéo (Bunny Stream, Cloudflare Stream, Mux, transcodeur FFmpeg interne),
- Diffusion Vidéo en Direct / Live Ingestion (Bunny Live, Livepeer décentralisé, Amazon IVS, SRS/WHIP WebRTC),
la plateforme doit pouvoir basculer dynamiquement d'un fournisseur à un autre selon les critères de coût, de souveraineté géographique (ex: Québec pour Loi 25, Europe pour RGPD) ou de disponibilité réseau, sans modifier une seule ligne de code d'application.
Architecture Proposée pour l'ADR
1. Découplage Hexagonal Strict (Ports & Adapters dans orazaka-contracts)
Nous définissons trois interfaces de premier niveau (Tier-1 SPI) garantissant une séparation absolue entre l'intention métier et le transport technique :
StoragePort:public interface StoragePort { CompletableFuture<StorageDescriptor> put(String bucket, String key, InputStream stream, StorageMetadata meta); InputStream get(String bucket, String key); void delete(String bucket, String key); URI generatePresignedUrl(String bucket, String key, Duration ttl, HttpMethod method); CompletableFuture<SnapshotResult> snapshot(String namespace, SnapshotOptions options); }VideoStreamPort:public interface VideoStreamPort { CompletableFuture<VideoUploadSession> initiateTusUpload(String collectionId, VideoMetadata metadata); CompletableFuture<VideoStatus> getVideoStatus(String videoId); URI getPlaybackUrl(String videoId, PlaybackOptions options); void deleteVideo(String videoId); }LiveStreamPort:public interface LiveStreamPort { CompletableFuture<LiveChannelDescriptor> createChannel(String tenantId, ChannelConfig config); CompletableFuture<IngestCredentials> getIngestEndpoints(String channelId); // RTMP / WHIP URI getLivePlaybackUrl(String channelId, Protocol protocol); // HLS / WHEP WebRTC void terminateChannel(String channelId); }
2. Configuration Dynamique Pilotée par la Base de Données (DB-Driven Dynamic Router)
Conformément aux principes établis dans l'ADR-027 et l'ADR-029 :
- Les adaptateurs actifs ne sont pas figés dans des variables d'environnement statiques au démarrage.
- Une table
system_provider_configsrépertorie les providers configurés par tenant, environnement et type de charge :provider_kind:STORAGE|VIDEO_STREAM|LIVE_STREAMprovider_name:bunny|s3|cloudflare|livepeer|self_hostedcredentials_vault_ref: Clé de référence vers le trousseau sécurisé (aucun secret en clair)routing_rules: Poids, région préférée, bascule automatique sur panne (circuit breaker fallback).
3. Résilience & Bascule sur Panne (Circuit Breaker)
- Si l'API d'un fournisseur externe subit des erreurs 5xx ou des timeouts répétés, le
CircuitBreakerPolicy(défini dansorazaka-contracts#9) fait basculer instantanément le routage vers l'adaptateur de secours (ex: Bunny Storage → Cloudflare R2 ou MinIO).
Tâches & Prochaines Étapes
- Rédiger
docs/adr/ADR-080-pluggable-provider-mesh-storage-stream-live.md. - Compléter les interfaces et records Java dans
orazaka-contracts. - Fournir les implémentations initiales :
BunnyStorageAdapter&S3StorageAdapterBunnyStreamAdapter&MockStreamAdapterLivepeerLiveAdapter&BunnyLiveAdapter
- Écrire la suite de tests de conformité TCK (Technology Compatibility Kit) pour valider tout nouvel adaptateur.
- Dominant language
- No language data
- Stars
- 0
- Forks
- 0
- Avg merge
- 2h 50m
- Merged PRs (30d)
- 107
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from krizaka/.github
-
paused
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
krizaka/.github#130 · 4 comments ·
Maintainers usually reply within 1 day
-
paused
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
krizaka/.github#124 · 3 comments ·
Maintainers usually reply within 1 day
-
priority:P1 product:krizaka type:docs
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Social preview images for orazaka, orochia, krizaka-ui, krizaka-com and .githubPossibly taken @oussamaABID claimed this 8 days ago. Openarea:growth oussama-action owner:oussama priority:later product:krizaka product:site type:design
Difficulty 1/5 Under an hour Newbie friendliness 68/100
krizaka/.github#15 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 18/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Arekkazu/sgpmp-backend#744 ·
Maintainers usually reply within 1 day
-
[Bug] Activity | The activity list ignores taskIds and returns the activities of every taskPossibly taken @NdekoCode claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
ever-co/ever-gauzy#11469 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
getgrav/grav-plugin-api#66 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
home-assistant/core#188613 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100