Stream: new zealand
Topic: CQRS
Harry Loris (Oct 07 2020 at 19:47):
Hi everyone, relatively new to FHIR, but would like to ask the owers to be if there is a place where CQRS in FHIR is somehow explained or if someone would be able to summarise it for me. Thanks
David Hay (Oct 07 2020 at 21:28):
CQRS?
Harry Loris (Oct 07 2020 at 22:19):
yes..not in the traditional meaning but more along the lines of a system keeping state..(or so I have been told)..;) sorry just trying to find out if there is an answer on the architectural design of FHIR
David Hay (Oct 07 2020 at 23:20):
What is CQRS.. - https://en.wikipedia.org/wiki/Command%E2%80%93query_separation#Command_query_responsibility_segregation ?
Harry Loris (Oct 07 2020 at 23:46):
Hi David, thanks for the reply. Do you know if this is applied in any way in FHIR? Thanks
Dave deBronkart (Oct 08 2020 at 00:03):
David Hay said:
What is CQRS.. - https://en.wikipedia.org/wiki/Command%E2%80%93query_separation#Command_query_responsibility_segregation ?
For the record - that link works fine in Chrome on Mac but fails on my iPhone in Safari - it complains about %E2. This version works: https://en.wikipedia.org/wiki/Command-query_separation#Command_query_responsibility_segregation
Harry Loris (Oct 08 2020 at 00:26):
All good..works fine on Chrome and PC..;)
David Hay (Oct 08 2020 at 04:50):
I really don't know enough to comment. The wiki article states:
It states that every method should either be a command that performs an action, or a query that returns data to the caller, but not both. In other words, Asking a question should not change the answer.[1] More formally, methods should return a value only if they are referentially transparent and hence possess no side effects.
so you could argue that that is covered by the HTTP Verbs - GET, POST, Put etc...
You might want to ask in the implementers stream to get a wider set oy eyes looking at it...
Peter Jordan (Oct 09 2020 at 05:07):
This has been discussed (briefly) before on Zulip. I first came across this architectural pattern when reading .NET Architecting Applications for the Enterprise. In the Microsoft Book, REST is cited solely as an API /data exchange option and not within the CQRS/Event Sourcing patterns themselves.
Last updated: Apr 12 2022 at 19:14 UTC