Skip to content

Idempotent proposals #2169

Answered by letmaik
letmaik asked this question in General
Feb 4, 2021 · 2 comments · 11 replies
Discussion options

You must be logged in to vote

After more discussion with @achamayou we came up with the following:

Idempotency:

  • Everything is idempotent (except Actions, which cannot be, see below)
  • No extra argument to control idempotency
  • Customization can be done by changing/extending the to-be-JS constitution

Naming rules:

  • Maps: (set|remove)_*
  • Maps that have complex values: patch_* with JSON Merge Patch payload
    • optional if not useful
  • Sets: (add|remove)_*
  • Actions (non-idempotent): trigger_*
  • State transitions: transition_*

Map-based proposals require a key.
Set-based proposals add/remove from a set.
Actions always trigger an operation. They are idempotent from a result point of view since they can be repeated and will not fail…

Replies: 2 comments 11 replies

Comment options

You must be logged in to vote
8 replies
@lynshi
Comment options

@achamayou
Comment options

@lynshi
Comment options

@letmaik
Comment options

@lynshi
Comment options

Comment options

You must be logged in to vote
3 replies
@achamayou
Comment options

@lynshi
Comment options

@achamayou
Comment options

Answer selected by achamayou
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants