Skip to content

Conversation

@konard
Copy link
Member

@konard konard commented Sep 14, 2025

Summary

This PR implements the DistributedDirectMemory class as requested in issue #21, enabling memory distribution across multiple storage locations (drives or machines).

Key Features

  • Multi-drive support: Distributes memory segments across different storage locations
  • Seamless API: Extends ResizableDirectMemoryBase with consistent interface
  • Cross-segment operations: Transparent read/write operations across segment boundaries
  • Dynamic scaling: Automatic segment creation and cleanup based on capacity changes
  • Comprehensive testing: 12 unit tests covering all functionality

Technical Implementation

  • Architecture: Segments are distributed round-robin across provided base paths
  • Segment management: Automatic creation/disposal of FileMappedResizableDirectMemory segments
  • Memory access: Provides both direct pointer access and buffer-based I/O methods
  • Capacity handling: Supports dynamic resizing with proper segment cleanup

Use Cases

Multi-drive memory distribution - Primary use case from issue #21
🔄 Multi-machine memory distribution - Foundation for future network-based distribution

Changes

  • New class: DistributedDirectMemory with full documentation
  • Comprehensive tests: DistributedDirectMemoryTests with 12 test cases
  • Project updates: Version bump to 0.5.0 and dependency additions
  • Package tags: Added DistributedDirectMemory to NuGet package tags

Testing

All tests pass successfully:

  • ✅ Constructor validation and directory creation
  • ✅ Capacity management and resizing
  • ✅ Basic and cross-segment read/write operations
  • ✅ Multi-segment distribution verification
  • ✅ Random access patterns
  • ✅ Large data handling
  • ✅ Resource cleanup and disposal
  • ✅ Argument validation
  • ✅ Pointer-based access

🤖 Generated with Claude Code


Resolves #21

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #21
@konard konard self-assigned this Sep 14, 2025
- Implements DistributedDirectMemory class extending ResizableDirectMemoryBase
- Supports distributing memory segments across multiple storage locations
- Includes comprehensive unit tests covering all functionality
- Updates project configuration with new dependencies and version bump to 0.5.0
- Enables multi-drive memory distribution as requested in issue #21

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@konard konard changed the title [WIP] Add DistributedDirectMemory Add DistributedDirectMemory for multi-drive memory distribution Sep 14, 2025
@konard konard marked this pull request as ready for review September 14, 2025 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add DistributedDirectMemory

2 participants