actor_osis/README.md
2025-08-06 14:56:07 +02:00

1.4 KiB

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

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