Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

rfc(adr): Pluggable Provider Mesh SPI — Dynamic Storage, Video CDN & Live Streaming Adapters (Bunny, S3, Cloudflare, Livepeer)

Closed
#67 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
12/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
java, postgresql
Domain
backend, cloud

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

area:architecture area:backend priority:next product:krizaka type:feature
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 :

  1. 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);
    }
    
  2. 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);
    }
    
  3. 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_configs répertorie les providers configurés par tenant, environnement et type de charge :
    • provider_kind : STORAGE | VIDEO_STREAM | LIVE_STREAM
    • provider_name : bunny | s3 | cloudflare | livepeer | self_hosted
    • credentials_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 dans orazaka-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 & S3StorageAdapter
    • BunnyStreamAdapter & MockStreamAdapter
    • LivepeerLiveAdapter & 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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from krizaka/.github

All issues in krizaka/.github

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.