In #287, we've decided to include optional parameter values.
If a client sends optional parameter values that are inconsistent with the repository's state, how to react?
Example:
Client sends changeConcept(node=myNodeId, oldConcept=Line, newConcept=Point).
In the repository, node with id myNodeId currently has concept Arc, not Line.
Note: This applies to lots of commands.
Option A: Ignore optional parameter
Repository sets myNodeId.concept = Point, irrespective of the oldConcept parameter.
Pro:
Intent of client preserved
Less error handling for client (otherwise would need to wait for update event, re-send command)
Con:
Client assumes outdated world view
Option B: Refuse command
Repository does not execute the command, informs client about being outdated
Pro:
Safer
Con:
More complexity on client
Option C: Repo decides
Repository can decide, in accordance with its merge and conflict resolution strategy, whether to ignore optional parameter (i.e. option A) or refuse command (i.e. option B).
In #287, we've decided to include optional parameter values.
If a client sends optional parameter values that are inconsistent with the repository's state, how to react?
Example: Client sends
changeConcept(node=myNodeId, oldConcept=Line, newConcept=Point)
. In the repository, node with idmyNodeId
currently has conceptArc
, notLine
.Note: This applies to lots of commands.
Option A: Ignore optional parameter
Repository sets
myNodeId.concept = Point
, irrespective of theoldConcept
parameter.Pro:
Con:
Option B: Refuse command
Repository does not execute the command, informs client about being outdated
Pro:
Con:
Option C: Repo decides
Repository can decide, in accordance with its merge and conflict resolution strategy, whether to ignore optional parameter (i.e. option A) or refuse command (i.e. option B).
Pro:
Con: