Plexus.Schedule (Plexus v0.1.0)

Copy Markdown View Source

Run-level execution regime.

:async interprets effects immediately. {:bsp, opts} buffers actor effects until barrier/1, allowing the same actor implementation to be replayed under bulk-synchronous execution. {:bounded_async, k} permits each actor at most k command envelopes ahead of the least advanced active actor. Idle active actors deliberately hold back faster peers; completion removes a participant. A command envelope is one update regardless of its number of effects. Priority mode orders the currently pending envelopes by the supplied key; it cannot order against arrivals that have not happened yet.

Summary

Types

regime()

@type regime() ::
  :async
  | {:bsp, keyword()}
  | {:bounded_async, pos_integer()}
  | {:priority, function()}

Functions

barrier(run_id)

@spec barrier(term()) :: {:ok, non_neg_integer(), non_neg_integer()}

dispatch(run_id, envelope)

@spec dispatch(term(), map()) :: :ok

normalize(other)

@spec normalize(term()) :: regime()

set_regime(run_id, regime)

@spec set_regime(term(), regime()) :: :ok