work-capital / workflow

Functional CQRS Eventsourcing Engine
MIT License
24 stars 2 forks source link

implement aggregate REST flow #4

Open henry-hz opened 7 years ago

henry-hz commented 7 years ago

When state is needed after a command, check if created event was successfully applied, and eventstore returned a beautiful OK that the event was persisted, so in terms of latency, you have now the most young state created, and instead of round-tripping to eventstore to return to REST, send back the state from the mutated aggregate as an answer, using pipelines.

Below some resources:

http://stackoverflow.com/questions/32476397/how-to-support-command-in-rest-while-doing-rest-cqrs-and-eventsourcing-together

https://lostechies.com/jimmybogard/2016/06/01/cqrs-and-rest-the-perfect-match/

http://stackoverflow.com/questions/32476397/how-to-support-command-in-rest-while-doing-rest-cqrs-and-eventsourcing-together

https://www.infoq.com/articles/rest-api-on-cqrs

https://groups.google.com/forum/#!topic/dddcqrs/YdTAIcGMXFI%5B1-25%5D

http://vvgomes.com/cqrs-and-rest/

henry-hz commented 7 years ago

https://www.adayinthelifeof.nl/2011/06/02/asynchronous-operations-in-rest/ http://farazdagi.com/blog/2014/rest-long-running-jobs/