Overview
Migrate the Oracle Cloud Object Storage AFS adapter from Eclipse Store to NebulaStore .NET Core. This adapter enables NebulaStore to use Oracle Cloud Infrastructure (OCI) Object Storage as a backend storage system.
Source Repository
Eclipse Store Module: https://github.com/eclipse-store/store/tree/main/afs/oraclecloud/objectstorage
Module Structure
The Oracle Cloud Object Storage module consists of:
Core Components (Java)
-
OracleCloudObjectStorageConnector.java - Main connector implementing BlobStoreConnector
- Handles blob operations (read, write, delete)
- Manages multipart uploads for large files (up to 50 GiB per blob)
- Supports caching and non-caching modes
- Uses Oracle's UploadManager for efficient transfers
-
OracleCloudObjectStorageFileSystemCreator.java - Configuration-based factory
- Parses configuration files (supports classpath, URL, file paths)
- Creates authenticated OCI clients
- Configures client settings (timeouts, async threads, etc.)
- Supports region and endpoint configuration
-
OracleCloudObjectStoragePathValidator.java - Path validation for OCI Object Storage
Dependencies
Java (Eclipse Store):
com.oracle.oci.sdk:oci-java-sdk-objectstorage (provided scope - user must supply)
org.eclipse.store:afs-blobstore
org.eclipse.serializer:configuration
Expected .NET Dependencies:
OCI.DotNetSDK.Objectstorage - Official Oracle Cloud Infrastructure .NET SDK
NebulaStore.Afs.Blobstore - Existing blobstore abstraction
Implementation Requirements
1. Create Project Structure
afs/oraclecloud/
├── objectstorage/
│ ├── NebulaStore.Afs.OracleCloud.ObjectStorage.csproj
│ ├── README.md
│ ├── src/
│ │ ├── OracleCloudObjectStorageConnector.cs
│ │ ├── OracleCloudObjectStorageConfiguration.cs
│ │ ├── OracleCloudObjectStoragePathValidator.cs
│ │ └── OracleCloudObjectStorageAfsIntegration.cs
│ └── test/
│ ├── NebulaStore.Afs.OracleCloud.ObjectStorage.Tests.csproj
│ ├── OracleCloudObjectStorageConnectorTests.cs
│ └── OracleCloudObjectStorageConfigurationTests.cs
2. Core Classes to Implement
OracleCloudObjectStorageConnector
- Extend
BlobStoreConnectorBase
- Implement blob operations using OCI .NET SDK:
GetFileSize() - Get total size across all blobs
DirectoryExists() - Check if bucket/prefix exists
FileExists() - Check if object exists
ReadData() - Read blob data with range support
WriteData() - Write data with multipart upload support
DeleteFile() - Delete all blobs for a file
MoveFile() - Move/rename objects
CopyFile() - Copy objects
VisitChildren() - List objects with prefix
- Support both caching and non-caching modes
- Handle large files (split into multiple blobs, max 50 GiB per blob)
- Use OCI's multipart upload for efficient transfers
OracleCloudObjectStorageConfiguration
- Configuration builder pattern (similar to
AwsS3Configuration)
- Properties:
ConfigFilePath - Path to OCI config file
Profile - Profile name in config file
Region - OCI region
Namespace - OCI Object Storage namespace
Endpoint - Custom endpoint URL
UseCache - Enable/disable caching
ConnectionTimeout - Connection timeout in milliseconds
ReadTimeout - Read timeout in milliseconds
MaxAsyncThreads - Maximum async threads
- Support authentication via:
- Config file (default
~/.oci/config)
- Instance principal (for OCI compute instances)
- Resource principal (for OCI functions)
- API key authentication
OracleCloudObjectStoragePathValidator
- Validate bucket names (OCI naming rules)
- Validate object names/paths
- Implement
IPathValidator interface
OracleCloudObjectStorageAfsIntegration
- Extension methods for
EmbeddedStorageConfiguration
- Factory methods for creating file systems
- Integration with NebulaStore's AFS system
3. Key Features
-
Multipart Upload Support
- Split large files into multiple blobs (max 50 GiB each)
- Use OCI's multipart upload API for efficiency
- Support parallel uploads
-
Namespace Management
- Auto-detect namespace from OCI client
- Support explicit namespace configuration
-
Authentication Methods
- Config file authentication (default)
- Instance principal (for OCI VMs)
- Resource principal (for OCI Functions)
- API key authentication
-
Caching
- Optional blob metadata caching
- Reduce API calls for repeated operations
-
Configuration
- Support OCI config file format
- Support classpath, URL, and file path loading
- Configurable timeouts and connection settings
4. Usage Examples
Basic Usage
using OCI.ObjectStorage;
using NebulaStore.Afs.OracleCloud.ObjectStorage;
using NebulaStore.Storage.Embedded;
// Create OCI Object Storage client
var config = OracleCloudObjectStorageConfiguration.New()
.SetConfigFilePath("~/.oci/config")
.SetProfile("DEFAULT")
.SetRegion("us-ashburn-1")
.SetUseCache(true);
var client = config.CreateClient();
var connector = OracleCloudObjectStorageConnector.New(client);
var fileSystem = BlobStoreFileSystem.New(connector);
// Use with EmbeddedStorage
var storageConfig = EmbeddedStorageConfiguration.New()
.SetStorageDirectory("oci-storage")
.SetUseAfs(true)
.SetAfsStorageType("oraclecloud.objectstorage")
.SetAfsConnectionString("~/.oci/config")
.Build();
using var storage = EmbeddedStorage.Start(storageConfig);
With Instance Principal
var config = OracleCloudObjectStorageConfiguration.New()
.SetAuthenticationType(OciAuthType.InstancePrincipal)
.SetRegion("us-ashburn-1");
var connector = OracleCloudObjectStorageConnector.New(config.CreateClient());
5. Testing Requirements
- Unit tests for connector operations
- Unit tests for configuration parsing
- Unit tests for path validation
- Integration tests (optional, requires OCI account)
- Mock-based tests using test doubles for OCI client
6. Documentation
- README.md with:
- Overview and features
- Installation instructions
- Configuration guide
- Usage examples
- Authentication methods
- Troubleshooting
- XML documentation comments on all public APIs
- Example code in
examples/ directory
Implementation Notes
License Considerations
The Oracle OCI .NET SDK is licensed under the Universal Permissive License (UPL) v1.0 or Apache License 2.0, which should be compatible with EPL 2.0. However, similar to the Java implementation, the SDK should be marked as a user-provided dependency (not bundled).
Differences from Eclipse Store
- .NET SDK vs Java SDK - Use
OCI.DotNetSDK.Objectstorage instead of oci-java-sdk-objectstorage
- Async/Await - Leverage .NET async patterns for I/O operations
- Configuration - Use .NET configuration patterns (builder pattern, options pattern)
- Streams - Use .NET Stream API instead of Java InputStream
Reference Implementations
Refer to existing NebulaStore AFS adapters for patterns:
afs/aws/s3/ - AWS S3 connector (similar cloud object storage)
afs/azure/storage/ - Azure Blob Storage connector
afs/googlecloud/firestore/ - Google Cloud Firestore connector
Acceptance Criteria
Related Issues
None
References
Overview
Migrate the Oracle Cloud Object Storage AFS adapter from Eclipse Store to NebulaStore .NET Core. This adapter enables NebulaStore to use Oracle Cloud Infrastructure (OCI) Object Storage as a backend storage system.
Source Repository
Eclipse Store Module: https://github.com/eclipse-store/store/tree/main/afs/oraclecloud/objectstorage
Module Structure
The Oracle Cloud Object Storage module consists of:
Core Components (Java)
OracleCloudObjectStorageConnector.java - Main connector implementing
BlobStoreConnectorOracleCloudObjectStorageFileSystemCreator.java - Configuration-based factory
OracleCloudObjectStoragePathValidator.java - Path validation for OCI Object Storage
Dependencies
Java (Eclipse Store):
com.oracle.oci.sdk:oci-java-sdk-objectstorage(provided scope - user must supply)org.eclipse.store:afs-blobstoreorg.eclipse.serializer:configurationExpected .NET Dependencies:
OCI.DotNetSDK.Objectstorage- Official Oracle Cloud Infrastructure .NET SDKNebulaStore.Afs.Blobstore- Existing blobstore abstractionImplementation Requirements
1. Create Project Structure
2. Core Classes to Implement
OracleCloudObjectStorageConnector
BlobStoreConnectorBaseGetFileSize()- Get total size across all blobsDirectoryExists()- Check if bucket/prefix existsFileExists()- Check if object existsReadData()- Read blob data with range supportWriteData()- Write data with multipart upload supportDeleteFile()- Delete all blobs for a fileMoveFile()- Move/rename objectsCopyFile()- Copy objectsVisitChildren()- List objects with prefixOracleCloudObjectStorageConfiguration
AwsS3Configuration)ConfigFilePath- Path to OCI config fileProfile- Profile name in config fileRegion- OCI regionNamespace- OCI Object Storage namespaceEndpoint- Custom endpoint URLUseCache- Enable/disable cachingConnectionTimeout- Connection timeout in millisecondsReadTimeout- Read timeout in millisecondsMaxAsyncThreads- Maximum async threads~/.oci/config)OracleCloudObjectStoragePathValidator
IPathValidatorinterfaceOracleCloudObjectStorageAfsIntegration
EmbeddedStorageConfiguration3. Key Features
Multipart Upload Support
Namespace Management
Authentication Methods
Caching
Configuration
4. Usage Examples
Basic Usage
With Instance Principal
5. Testing Requirements
6. Documentation
examples/directoryImplementation Notes
License Considerations
The Oracle OCI .NET SDK is licensed under the Universal Permissive License (UPL) v1.0 or Apache License 2.0, which should be compatible with EPL 2.0. However, similar to the Java implementation, the SDK should be marked as a user-provided dependency (not bundled).
Differences from Eclipse Store
OCI.DotNetSDK.Objectstorageinstead ofoci-java-sdk-objectstorageReference Implementations
Refer to existing NebulaStore AFS adapters for patterns:
afs/aws/s3/- AWS S3 connector (similar cloud object storage)afs/azure/storage/- Azure Blob Storage connectorafs/googlecloud/firestore/- Google Cloud Firestore connectorAcceptance Criteria
OracleCloudObjectStorageConnectorimplements allIBlobStoreConnectormethodsOracleCloudObjectStorageConfigurationsupports all authentication methodsEmbeddedStorageConfigurationvia AFS systemRelated Issues
None
References