Replies: 1 comment
-
Support for synchronously executing commands is available from v0.9.0. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As per CQRS principles, commands should not return data to the caller. They are only supposed to indicate if the command was accepted to be processed or rejected.
This works well for eventually consistent systems and provides good performance. But there can occasionally be cases when a developer wants to process one specific command synchronously and does not mind waiting for transaction completion. Developers should be able to specify if Protean should process a command immediately in real-time.
There are cases where commands return reference identifiers, but the request has to wait until the transaction has been processed. To avoid this, it is best to use universally unique identifiers (UUIDs) and generate them as close to request initiation as possible (on the frontend layer).
Beta Was this translation helpful? Give feedback.
All reactions