I am building an application. The interface is made with Phoenix. In the background, it sometimes does HTTP requests to a remote API. This remote API wants to call webhooks on my application when the status of one of the resources changes.
However, this is not a concern for my Phoenix interface. I’d rather keep the two (interface and webhooks) separated. What is the best way to do that?
Hi. At ElixirConf EU '16 there were some presentations outlining how to use umbrella applications to separate such concerns in a nice way (I believe it was Lance Halvorsen’s presentation). For communication (callbacks) I would look at Sasa Juric’s presentation, but the TL;DR; is using group names/properties to register ‘callbacks’, like http://stackoverflow.com/questions/28015469/grouping-processes-with-gproc
this webhook lib seems to be promising