Enterprise Distributed Application Service: Developer guide

Updated at:

Enterprise Distributed Application Service (EDAS) supports Apache Dubbo for building microservice applications. This guide covers the Dubbo Service Provider Interface (SPI) extension system, framework internals, and design principles.

How the SPI extension system works

Dubbo uses a lightweight SPI mechanism to keep its core modular. Every major component -- protocols, load balancers, routers, registries -- is defined as a pluggable extension point. This means you can:

  • Swap built-in implementations by changing a single configuration property, without modifying framework code.

  • Add custom implementations by implementing a Java interface and registering it through the SPI file.

  • Extend behavior transparently -- Dubbo treats third-party extensions and built-in implementations equally.

For the underlying architecture, start with the framework design and SPI loading topics below.

SPI extension implementations

Dubbo defines over 20 extension points, organized here by function. Each extension point is a Java interface that supports custom implementations.

RPC and traffic management

Extension pointWhat it controls
ProtocolNetwork protocol for remote calls
FilterRequest and response filter chain for cross-cutting concerns such as logging or auth
ClusterFault-tolerance strategy when a call fails (e.g., failover, failfast, forking)
RouterRouting rules that determine which providers receive traffic
LoadBalanceRequest distribution strategy across multiple providers
MergerResult merging logic for forked invocations

Service discovery and configuration

Extension pointWhat it controls
RegistryService registry integration
MonitorMetrics collection and monitoring data reporting

Transport and serialization

Extension pointWhat it controls
TransporterNetwork transport layer
ExchangerRequest-response exchange pattern over the transport layer
NetworkerNetwork topology management for multi-registry scenarios
SerializationData serialization format

Lifecycle and proxying

Extension pointWhat it controls
InvokerListenerCallback triggered on service invocation events
ExporterListenerCallback triggered on service export events
ExtensionFactoryFactory for creating and managing extension instances
ProxyFactoryFactory for creating service proxies
CompilerDynamic Java source code compilation
DispatcherThread dispatching strategy for incoming messages
ThreadPoolThread pool strategy for service execution

Diagnostics and utilities

Extension pointWhat it controls
TelnetHandlerHandler for telnet-based runtime management commands
StatusCheckerHealth check logic for service status reporting
PageHandlerStatus page rendering for the built-in HTTP server
ContainerService container lifecycle management
CacheResult caching strategy for repeated invocations
ValidationParameter validation before invocation
LoggerAdapterAdapter for plugging in different logging frameworks

Framework internals

These topics explain how Dubbo is built and how the SPI mechanism works under the hood.

TopicWhat it covers
Source code buildBuild the Dubbo source from the repository
Framework designOverall architecture, layered design, and module dependencies
SPI loadingHow Dubbo discovers, loads, and instantiates SPI extensions
Implementation detailsInternal implementation of core components
Configuration centerCentralized configuration management for distributed services
Public agreementPublic protocol conventions and contracts shared across Dubbo components

Design principles

The Dubbo framework follows a set of design principles documented in these topics. Use them as a reference when contributing to the framework or building custom extensions.

TopicWhat it covers
Attention to detailWhy edge cases and subtle design decisions matter in framework code
Foundational design patternsCore design patterns and conventions used throughout the codebase
Extensibility and incremental extensionHow to design extensions that are backward-compatible and composable
Configuration designGuidelines for designing configuration parameters and defaults
RobustnessError handling, resilience patterns, and defensive coding in the framework
Fool-proof designPreventing misuse through clear APIs, sensible defaults, and input validation
Extension point refactoringWhen and how to refactor extension point interfaces

Code quality standards

TopicWhat it covers
VersioningVersion numbering conventions and compatibility guarantees
ChecklistPre-release verification checklist for framework changes
Code smellsCommon anti-patterns to avoid in Dubbo framework code
Coding conventionsCode style, naming, and formatting standards
Compatibility testingTesting strategy for backward and forward compatibility