jimsynz

jimsynz

Ash Core Team

Reactor 1.0 Released - Saga Orchestration for Elixir

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?

Popular in News & Updates Top

zachdaniel
Just released: Ash AI, a new extension for Ash Framework. LLM integration for Elixir apps. Use Ash’s declarative approach for structured ...
New
jimsynz
As some of you know, I have been working on a tight integration between Ash and Reactor which has triggered a few small bug fixes in Spar...
New
fhunleth
We recently released Nerves 1.4.0 and an update to the Nerves new project generator, nerves_bootstrap. The biggest change is support for ...
New
bartblast
Hologram v0.10 is out! The headline is the event system, which got a lot bigger this release. You can now handle keyboard, scroll, resize...
New
sorentwo
Many months ago when I originally announced Oban I mentioned that a LiveView powered UI would be available for it soon. Well, the “soon” ...
New
zachdaniel
Hey folks! We’ve just released the beta 0.1.0 version of ash_sqlite. Take a look at the guide here: https://hexdocs.pm/ash_sqlite/get-sta...
New
zachdaniel
Hey folks! I’ve begun putting together some concrete, framework-wide tooling and guidance on the usage of LLMs in development. The goal h...
New
DominikWolek
Hi everyone! After about 3 months of really hard work, we have released the very first version of Jellyfish Media Server! The best star...
New
mobileoverlord
Action Advised: NervesHub Sunset In 2018, NervesHub was launched to deliver first-class support for hardware deployments directly from th...
New
bartblast
Hey there! There’s a new kid on the block! :smiley: What is it? Full stack isomorphic Elixir web framework that can be used on top of P...
New

Other popular topics Top

danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 29603 241
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement