LuxImport Technical Documentation
Overview
LuxImport is a modular system designed for importing, indexing, and managing digital collections efficiently. It integrates with the Luxoria ecosystem and provides functionalities for handling structured asset collections.
Features
Event-driven architecture with
IEventBusintegrationAsynchronous operations for improved performance
Modular and scalable design
Progress tracking through event notifications
Parallel processing for asset loading
Architecture
Core Components
LuxImport Module
LuxImport ModuleImplements
IModuleHandles initialization, execution, and shutdown
Listens to
OpenCollectionEventand triggers import process
ImportService
ImportServiceManages the actual import process
Tracks progress and sends updates via event notifications
Loads assets into memory
ManifestRepository
ManifestRepositoryHandles metadata storage and retrieval
Ensures collection initialization and integrity
LuxConfigRepository
LuxConfigRepositoryStores per-asset configuration
Manages LuxCfg models in
.lux/assets
ImageDataHelper
ImageDataHelperLoads image assets efficiently
Uses SkiaSharp for image decoding
How to Use
Prerequisites
Ensure that the Luxoria ecosystem is installed and configured properly.
Your project should reference the necessary LuxImport libraries.
Implement and register
IEventBusfor event-driven interactions.
Installation
Clone or download the LuxImport module.
Add the project reference in your Luxoria-based application.
Implement
IModuleinterface in your module system.
Running the Module
Initialize the module using
Initialize().Subscribe to the
OpenCollectionEvent.When an import request is triggered, LuxImport processes the collection.
Once completed,
CollectionUpdatedEventis published.
Example Usage
var luxImport = new LuxImport();
luxImport.Initialize(eventBus, context, logger);
luxImport.Execute();Initialization
public void Initialize(IEventBus eventBus, IModuleContext context, ILoggerService logger)Subscribes to
OpenCollectionEventInitializes logger and context
Import Process
1. Collection Validation
Checks if the collection path is valid and initialized
2. Indexing & Asset Processing
Reads metadata from
manifest.jsonHashes and stores asset references
Uses parallel processing for efficiency
3. Asset Loading
Loads assets into memory
Uses
ImageDataHelperfor efficient decoding
4. Completion & Event Publishing
Publishes
CollectionUpdatedEventupon successful import
Event Handling
OpenCollectionEvent Listener
OpenCollectionEvent Listener_eventBus.Subscribe<OpenCollectionEvent>(HandleOnOpenCollectionAsync);Triggers collection import
Sends progress updates
CollectionUpdatedEvent Publisher
CollectionUpdatedEvent Publisher_eventBus?.Publish(new CollectionUpdatedEvent(collectionName, collectionPath, assets));Notifies the system of import completion
Error Handling & Logging
Uses
ILoggerServicefor structured logsException handling ensures robust error reporting
Performance Optimizations
Uses parallel processing in
LoadAssetsMinimizes blocking I/O operations
Implements batch logging to prevent log spam
Future Enhancements
Cache system for faster re-imports
Support for more file formats
UI integration for progress monitoring
Conclusion
LuxImport is designed for efficient, modular asset importation and indexing within the Luxoria ecosystem. Its event-driven design and asynchronous processing make it highly scalable and reliable.
Last updated