jimsynz

jimsynz

Ash Core Team

It’s been a long time coming, but Reactor has finally reached 1.0.

For those unfamiliar, Reactor is a dynamic, concurrent, dependency-resolving saga orchestrator. In practical terms: it lets you define complex workflows as a series of steps with automatic dependency
resolution, concurrent execution, and built-in compensation/rollback when things go wrong.

defmodule CreateOrder do
  use Reactor

  input :customer_id
  input :items

  step :validate_inventory do
    argument :items, input(:items)
    run fn %{items: items} -> InventoryService.check(items) end
  end

  step :charge_payment do
    argument :customer_id, input(:customer_id)
    argument :items, result(:validate_inventory)
    run fn args -> PaymentService.charge(args.customer_id, args.items) end
    undo fn args, _result -> PaymentService.refund(args.customer_id) end
  end

  step :create_shipment do
    argument :payment, result(:charge_payment)
    argument :items, result(:validate_inventory)
    run fn args -> ShippingService.create(args) end
  end

  return :create_shipment
end

Why 1.0 now?

Honestly, Reactor has been production-ready for quite some time. The 1.0 version was prompted by a couple of small breaking changes that needed a major version bump anyway, so it felt like the right moment
to make the stability commitment official.

Highlights since the early days

  • Concurrent execution - Steps run in parallel where dependencies allow, with configurable concurrency limits
  • Composition - Embed sub-reactors within reactors
  • Control flow - switch, map, group, and around steps for complex workflows
  • Middleware - Hook into the execution lifecycle (including telemetry out of the box)
  • Guards and conditions - Conditional step execution with where and guard
  • Mermaid diagrams - Visualise your workflows
  • Backoff support - Configurable retry strategies
  • Full undo support - Including after successful completion

Links

Questions and feedback welcome here or in the reactor channel on the Ash discord Ash Framework

Where Next? Top

Trending in News & Updates Top

kip
I’m a bit excited to announce that Localize and friends are now at release 1.0. Even though it’s a 1.0 release, it stands on 8 years of w...
New
bartblast
After building Hologram and sharing updates across various places, I’ve realized there’s a lot happening that doesn’t always make it to t...
New
bartblast
Hologram v0.11 is out! Two headline features this release. First, Elixir regexes now run in the browser. They were server-only until now,...
New
nseaSeb
Just published search_ash 0.5.0 (with search_core 0.4.0) on Hex. What’s new: synonyms You can now declare a synonym dictionary per lang...
New
mudasobwa
After years of struggling I made StreamData dependency optional. Finitomata.ExUnit got testing primitives for Persistence. Full back co...
New
mudasobwa
MdexMultilineCells is an MDEx plugin enabling multi-line cells in Markdown tables with full inline/block Markdown rendering and automati...
New
sullyMusty
ActiveMemory 0.8.0 — in-memory tables that speak Ecto ActiveMemory 0.8.0 is now on Hex. ActiveMemory is an in-memory store built on ETS ...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews