Nebo15 / sage

A dependency-free tool to run distributed transactions in Elixir, inspired by Sagas pattern.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clarifications for examples in README

AndrewDryga opened this issue · comments

I'll keep this list updated for future readme overhaul:

  • How to act when the side effect is updated (https://elixirforum.com/t/re-sage-sagas-implementation-in-pure-elixir/28498?u=andrewdryga)
  • How and where attrs should be validated so that return struct would look like input? (Ecto.Changeset for all attrs alltogether either before Sage or as one of it's steps, should we add a helper for that?)
  • Avoid using names in functions, keeping them pure (eg. instead of run(:foo, &bar/2) use run(:foo, &bar(&1.fiz, &2)) so that transaction functions are pure and do not depend on each other.

A note here to add is that readme also shows incorrect compensation contracts; this tripped a few of us up.. (i.e compensation/3 v compensation/4)

We love this library, btw, thank you for all this work..