Problem
Products that must support many optional or customer-specific features accumulate conditionals and release risk in a single codebase. Third parties and teams cannot add capabilities without touching the core.
Also known as: plugin-architecture, plug-in-architecture
Keep a minimal stable core and extend functionality through independently developed plug-ins.
Products that must support many optional or customer-specific features accumulate conditionals and release risk in a single codebase. Third parties and teams cannot add capabilities without touching the core.
Microkernel architecture, also called plug-in architecture, gives the core only what every feature needs and pushes everything else into plug-ins. Eclipse, VS Code, and many CI tools follow this model.
The core defines extension points, such as an interface for exporters or validators. Plug-ins register implementations and declare metadata, including the API version they target.
+-------------------+
| Core (kernel) |
| registry, config, |
| lifecycle, events |
+----+----+----+----+
| | |
[PluginA][PluginB][PluginC]
interface Plugin { id: string; apiVersion: string; init(ctx: Context): void }
registry.load(manifest) // check apiVersion, then init
At startup the registry scans a directory or manifest, checks compatibility, and initializes plug-ins in a declared order. Calls to plug-ins are wrapped in timeouts and error handlers so a faulty one is disabled rather than crashing the host.
Low — in-process; higher if sandboxed per process
Medium — plug-in lifecycle and compatibility
Medium to high — API design and isolation
Plug-in crash or memory leak taking down the host
Breaking changes in the extension API stranding plug-ins
Hidden dependencies between plug-ins causing load-order bugs