Principle:Apache Dolphinscheduler Plugin Module Structure
| Knowledge Sources | |
|---|---|
| Domains | Plugin_Architecture, Build_Systems |
| Last Updated | 2026-02-10 00:00 GMT |
Overview
A modular plugin architecture pattern that uses Maven multi-module project structure to encapsulate database-specific datasource implementations as independently deployable units.
Description
The Plugin Module Structure principle defines how DolphinScheduler organizes datasource plugins as separate Maven modules within a parent aggregator POM. Each plugin module follows a standardized directory layout with its own pom.xml inheriting from the dolphinscheduler-datasource-plugin parent, providing consistent dependency management and build configuration across 28+ database types.
This pattern solves the problem of managing a large number of database integrations without creating tight coupling between them. Each plugin is a self-contained module that can be built, tested, and deployed independently while sharing common base classes from the dolphinscheduler-datasource-api module.
Usage
Use this principle when creating a new datasource plugin for DolphinScheduler. Every new database integration requires a dedicated Maven module that follows the established naming convention dolphinscheduler-datasource-{dbtype} and inherits from the datasource plugin parent POM.
Theoretical Basis
The Plugin Module Structure follows the Microkernel Architecture Pattern (also known as the plug-in architecture pattern):
- A core system (dolphinscheduler-datasource-api) provides base classes, interfaces, and shared utilities
- Plugin modules (e.g., dolphinscheduler-datasource-mysql) extend the core with database-specific implementations
- SPI registration (via Google AutoService) enables runtime discovery without compile-time coupling
- Maven inheritance ensures consistent dependency versions and build configurations
Pseudo-code for module organization:
dolphinscheduler-datasource-plugin/ (parent aggregator)
├── pom.xml (parent POM with shared deps)
├── dolphinscheduler-datasource-api/ (core module)
│ └── src/main/java/.../api/ (base classes, interfaces, utilities)
├── dolphinscheduler-datasource-mysql/ (plugin module)
│ ├── pom.xml (inherits parent)
│ └── src/main/java/.../mysql/ (MySQL-specific classes)
├── dolphinscheduler-datasource-postgresql/ (plugin module)
│ ├── pom.xml
│ └── src/main/java/.../postgresql/
└── ... (28+ more database modules)