SDL_LoadObject vs blue-green deployment for zero‑downtime SDL migration, cross‑platform symbol visibility
0 reputation · 02 Jan 2022, 09:03 UTC
Migrating a small SDL application without downtime involves selecting an approach that can switch functionality while the service remains online. The SDL 2.0 SDL_LoadObject/SDL_UnloadObject API permits runtime module loading, but its behavior depends on platform‑specific symbol visibility conventions.
On Windows, dynamic libraries typically require __declspec(dllexport) or a .def file for symbol export, while Linux defaults to default visibility or permits __attribute__((visibility('default'))) annotations. Inconsistent application of these conventions can cause SDL_LoadObject to fail or produce undefined behavior, making symbol handling a decisive constraint when comparing dynamic module loading against a blue‑green deployment that runs two identical instances behind a reverse proxy.
What trade‑offs surface when symbol visibility cannot be standardized across target platforms? How does the modular architecture overhead for hot‑reloading compare to the operational cost of maintaining dual application instances? Under what conditions does SDL’s dynamic loading risk static initialization state corruption relative to a blue‑green traffic switch?