aissia/docs/03-implementation/configuration/module-configuration.md
StillHammer ba42b6d9c7 Update CDC with hybrid architecture (WarFactory + multi-target)
- Add hybrid deployment modes: local_dev (MVP) and production_pwa (optional)
- Integrate WarFactory engine reuse with hot-reload 0.4ms
- Define multi-target compilation strategy (DLL/SO/WASM)
- Detail both deployment modes with cost analysis
- Add progressive roadmap: Phase 1 (local), Phase 2 (POC WASM), Phase 3 (cloud)
- Budget clarified: $10-20/mois (local) vs $13-25/mois (cloud)
- Document open questions for technical validation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-27 11:49:09 +08:00

1.6 KiB

Configuration des Modules

Configuration Système Modulaire

Configuration Dependencies System

Smart configuration avec recalculation automatique :

std::map<ConfigKey, std::vector<ComponentID>> dependencies = {
    {"materials.steel_plating.weight", {tank_mk1, tank_mk2, heavy_tank}},
    {"materials.steel_plating.cost", {economy_steel, factory_line_2}},
    {"weapons.cannon_75mm.damage", {tank_mk1, artillery_piece}}
};

void onConfigChange(ConfigKey key, json newValue) {
    auto affected = dependencies[key];
    for(auto component : affected) {
        DesignerModule::scheduleRecalc(component);
    }
}

Module Config Example

Configuration adaptable par module :

bool useNewSystem = config.getBool("use_new_tank_system");

json process(json input) {
    if(useNewSystem) {
        return newTankModule->process(input);
    } else {
        return legacyTankSystem->process(input);
    }
}

Avantages Configuration Modulaire

Développement :

  • Config changes : Restart required → Instant
  • A/B testing : Impossible → Trivial
  • Debugging : Needle in haystack → Surgical precision

Maintenance :

  • Module independence : Tightly coupled → Zero dependencies
  • Testing : Integration hell → Unit paradise
  • Deployment : Monolith → Microservices-like
  • Scaling : Rewrite → Configuration change

Points Couverts

Cette configuration correspond aux patterns de configuration modulaire mentionnés dans les Points 251-290.

Source : docs/toCheck/architecture-modulaire.md Type : Configuration système et dépendances