LionWeb-io / specification

Specifications of the LionWeb initiative
http://lionweb.io/specification/
6 stars 0 forks source link

Repo must tell client if command applied successfully #298

Open enikao opened 1 month ago

enikao commented 1 month ago

Once a client sent a command to the repository, which kind of information does it get back?

Categories of delta errors:

  1. Protocol error (e.g. invalid message)
  2. Technically broken model (unknown node id, containment circle)
  3. Change taken into account, result might be different (e.g. because of conflict resolution, client assumes different state)
  4. Meta-model incompliant (we don't check that: #300)

Alternatives

Option A: No information (fire-and-forget)

Pro:

Con:

Option B: Repo MAY report back on success

Repo can chose which kind of problems it reports back as failure.

Pro:

Con:

Option C: Repo MUST report on protocol errors and technically broken model

Repo does not report on potential failures (e.g. command not applied due to conflict, both target and resolveInfo of a reference are null)

Pro:

Con:

Option D: Repo MUST report back whether successful

Repo MUST report failure/success for every command

Pro:

Con:

Option E: Repo tells exactly what it did

Repo exactly describes in its response the effect of the command

Pro:

Con:

enikao commented 4 weeks ago

Decision: Option C

Client sees whether the intent of the command was successful by the event that carries its commandId