This document provides a detailed technical overview of OpenDAL's core architecture, focusing on the internal design patterns and abstractions that enable unified data access across diverse storage services. It covers the main components including the Operator interface, layer system, service abstraction, and data flow patterns.
For information about specific storage service implementations, see Storage Services. For details about language bindings and their integration, see Language Bindings.
OpenDAL's core architecture follows a layered design that provides a unified interface over diverse storage backends through a set of well-defined abstractions.
Sources: core/src/types/operator/operator.rs31-151 core/src/types/operator/builder.rs25-71 core/src/types/capability.rs20-66
The Operator
serves as the primary entry point for all OpenDAL operations, providing both synchronous and asynchronous APIs with a builder pattern for configuration.
The Operator
struct wraps an Accessor
and provides three API patterns:
read()
, write()
, stat()
read_with()
that return futures with chainable optionsreader()
and writer()
for streaming operationsSources: core/src/types/operator/operator.rs147-151 core/src/types/operator/operator_futures.rs34-51
The future-based API uses OperatorFuture<I, O, F>
where:
I
represents input options (e.g., ReadOptions
, WriteOptions
)O
represents output type (e.g., Buffer
, Metadata
)F
represents the underlying future typeSources: core/src/types/operator/operator_futures.rs42-51 core/src/types/options.rs27-495
The Access
trait provides the core abstraction that all storage services must implement, enabling uniform access across different backends.
Sources: core/src/raw/access.rs core/src/services/mod.rs18-207
All storage services follow a consistent Builder → Backend → Core pattern:
Sources: core/src/types/operator/builder.rs68-71 core/src/services/mod.rs18-21
OpenDAL's layer system provides cross-cutting concerns like retry logic, logging, and metrics through a decorator pattern applied to the Access
trait.
Each layer wraps the underlying Access
implementation and can:
Sources: core/README.md101-125 core/src/layers/
Sources: core/src/layers/ core/src/types/operator/builder.rs371-396
OpenDAL operations follow a consistent request-response pattern using operation arguments (OpXxx
) and responses (RpXxx
).
Sources: core/src/raw/ops.rs18-29 core/src/raw/rps.rs23-212
The operation flow follows these steps:
Operator
method with path and optional parametersOperator
creates appropriate OpXxx
argument structAccess.operation()
method is called with path and argumentsRpXxx
response with associated I/O objectsBuffer
, Metadata
, etc.)Sources: core/src/types/operator/operator.rs467-555 core/src/raw/ops.rs309-327
The Capability
struct allows runtime feature detection, enabling applications to adapt their behavior based on what the underlying storage service supports.
Sources: core/src/types/capability.rs65-220 core/src/types/operator/operator.rs184-186
Refresh this wiki
Last indexed: 5 June 2025 (37efe2)
This wiki was recently refreshed. Please wait 3 days to refresh again.