smahi
How to handle response to the client in Event Driven Architecture ( EDA )
I am wondering how to response to the Client who made the request to the app that uses EDA.
Let’s consider the following diagram:
Client request -> rest api -> command handler -> event handler -> persistence
In this scenario how to handle responses, where and how? any code snippet or Git repo will be helpful.
Thank you in advance.
Most Liked
LostKobrakai
In an event driven system you often find ideas realized like event busses or queues (which async execution). Those commonly make returning stuff from the end of the line back to the client complicated. You’d somehow need to wait for any async stuff to be done to be able to even have a response somewhere in the system and then find a way to return that response to wherever code is waiting for it. The other option would be to (optionally) not use async code execution.
Commonly you’ll also see people argue that CQRS means you shouldn’t return any information from an event, but if you’re implemententing the whole system you can decide how hard of a guideline you feel that is.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









