View Source Handoff.DistributedResultStore (Handoff v0.1.0)

Provides synchronized storage and retrieval of function execution results across cluster nodes.

Extends the local ResultStore with capabilities to synchronize results between nodes.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Clears all results on all connected nodes for a specific DAG.

Retrieves a result for a specific DAG, potentially fetching it from its origin node.

Stores a function result locally on the node where it was produced for a specific DAG. Registers the result location in the DataLocationRegistry but does not broadcast it.

Synchronizes specific results from their origin nodes for a specific DAG.

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Clears all results on all connected nodes for a specific DAG.

parameters

Parameters

  • dag_id: The ID of the DAG to clear
Link to this function

get_with_timeout(dag_id, function_id, timeout \\ 5000)

View Source

Retrieves a result for a specific DAG, potentially fetching it from its origin node.

parameters

Parameters

  • dag_id: The ID of the DAG
  • function_id: The ID of the function
  • timeout: Maximum time to wait in milliseconds, defaults to 5000

returns

Returns

  • {:ok, result} on success
  • {:error, :timeout} if the result is not available within the timeout
Link to this function

store_distributed(dag_id, function_id, result, origin_node \\ Node.self())

View Source

Stores a function result locally on the node where it was produced for a specific DAG. Registers the result location in the DataLocationRegistry but does not broadcast it.

parameters

Parameters

  • dag_id: The ID of the DAG
  • function_id: The ID of the function
  • result: The result to store
  • origin_node: The node where the result was produced
Link to this function

synchronize(dag_id, function_ids)

View Source

Synchronizes specific results from their origin nodes for a specific DAG.

parameters

Parameters

  • dag_id: The ID of the DAG
  • function_ids: List of function IDs to synchronize

returns

Returns

  • Map of function_id => result for successfully synchronized results