Standalone conceptStyleChapter II · Styles & patterns · Building block 4 of 11

Microkernel / plug-in architecture

The microkernel style separates minimal core capabilities from replaceable extensions through a stable contract.

  1. CoreStable minimum capabilities and contracts.
  2. Plug-inOptional capability behind a contract.
  3. IsolationCheck failure and permission effects.

Context

Why this is important

Design a stable application core with explicit extension points and assess plug-in costs.

An extension model for systems whose capabilities must be added or replaced through plug-ins.

Shop example · Mapping

Core and plug-ins for shipping rules

The shop variant is explicitly hypothetical: a plug-in point for shipping rules extends the existing seven-module application.

This is how you read the picture

  1. Core Platform core
  2. Plug-in Extension
  3. Isolation Runtime boundary
Core and plug-ins for shipping rules
CriterionResponsibilityDecision
Core contractProvide a stable version.Check compatibility.
RuntimeLoad extensions.Limit failure impact.
The matrix shows extensibility and its operational requirement.

Benefits & limitations

Helps if:

  • Several optional extensions follow the same stable contract.
  • Capabilities need to be activated or replaced independently.

Boundaries

  • Versioning and compatibility costs may exceed the benefit.
  • Faulty extensions may share process and permissions with the core.

In practice

  1. Derive the smallest stable core capabilities from concrete extension cases. Define each plug-in contract, allowed dependencies and lifecycle instead of assuming abstract extensibility.
  2. Define how plug-ins are discovered, enabled, versioned and rejected when contracts are incompatible. Account for the shared runtime, permissions and possible resource limits.
  3. Assess failures, permissions and outage impact for each extension. Use stronger process isolation if a plug-in can endanger the core, and compare operational cost with a simpler modular design.
Read the detailed explanation

Contracts, versioning rules, registration and failure modes are part of the design. Plug-ins may run in the same process, so the style does not promise automatic failure or security isolation.

Microkernel describes an extension model that can run within a monolith. It does not require separate microservices.

A microkernel can run within a Modular Monolith; separate Microservices address a different operational question.

Check your understanding

Test yourself in three stages

  1. ReadingCheck in the picture

    What stays in the example’s core?

    View the solution with justification

    Minimum platform capabilities and the plug-in contract.

  2. ApplyingTransferred to a new situation

    How do you handle a plug-in with an incompatible contract version?

    View the solution with justification

    Check the version and reject or migrate the extension in a controlled way.

  3. EvaluateWeighing an alternative

    What must be established before adopting plug-ins?

    View the solution with justification

    Several real extension cases and manageable compatibility, failure and security costs.