ADR 0012: Modular Packaging (Core + Providers + Integrations)

Status

Accepted — 2025-12-15

Context

ManagedCode.Storage supports many storage backends (Azure/AWS/GCP/SFTP/Cloud drives/CloudKit) and multiple integration surfaces (ASP.NET server, clients, VFS).

Most consumers only need:

Problem

A monolithic “one package includes everything” approach would:

Decision

We keep the repository modular and ship multiple NuGet packages:

This structure lets consumers reference only what they need, while still enabling consistent evolution and cross-provider test coverage.

flowchart TD
  App[Application] --> Core[ManagedCode.Storage.Core]
  App --> Provider[One provider package]
  Provider --> Core
  App --> Opt[Optional packages]
  Opt --> VFS[ManagedCode.Storage.VirtualFileSystem]
  Opt --> Server[ManagedCode.Storage.Server]
  Opt --> Client[ManagedCode.Storage.Client / SignalR]
  Server --> Core
  Client --> Server

Alternatives Considered

  1. Single monolithic package
    • Pros: simplest installation story.
    • Cons: heavy dependencies; poor modularity; more conflicts.
  2. Dynamic plugin loading
    • Pros: can load providers at runtime.
    • Cons: complexity, reflection/loading concerns, harder trimming/AOT story.
  3. Multiple packages (chosen)
    • Pros: modular; consumers pull only needed SDKs; clearer ownership boundaries.
    • Cons: more packages/docs to maintain; requires good README guidance.

Consequences

Positive

Negative

References (Internal)