commit 8f6ea5350f7f9da626ab79cf16df220c73076158 Author: Timur Gordon <31495328+timurgordon@users.noreply.github.com> Date: Wed Aug 6 14:56:07 2025 +0200 first commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..0378218 --- /dev/null +++ b/README.md @@ -0,0 +1,41 @@ +# Object Storage and Indexing System (OSIS) Actor + +The OSIS Actor is responsible for storing and indexing objects in the system. It implements the actor interface to process jobs in a **blocking, synchronized manner**. + +## Job Processing Behavior + +The OSISActor processes jobs sequentially with the following characteristics: + +- **Blocking Processing**: Each job is processed completely before the next job begins +- **Synchronized Execution**: Jobs are executed one at a time in the order they are received +- **No Concurrency**: Unlike async actors, OSIS ensures no parallel job execution +- **Deterministic Order**: Job completion follows the exact order of job submission + +This design ensures data consistency and prevents race conditions when performing storage and indexing operations. + +## Usage + +```rust +use actor_osis::{OSISActor, spawn_osis_actor}; + +// Create an OSIS actor with builder pattern +let actor = OSISActor::builder() + .db_path("/path/to/database") + .redis_url("redis://localhost:6379") + .build() + .expect("Failed to build OSISActor"); + +// Or spawn directly with convenience function +let handle = spawn_osis_actor( + "/path/to/database".to_string(), + "redis://localhost:6379".to_string(), + shutdown_rx, +); +``` + +## Actor Properties + +- **Actor ID**: `"osis"` (constant) +- **Actor Type**: `"OSIS"` +- **Processing Model**: Sequential, blocking +- **Script Engine**: Rhai with OSIS-specific DSL extensions \ No newline at end of file