This message was imported from the Ruby/Rails Modularity Slack server. Find more info in the import thread.
Message originally sent by slack user U70K2MT6OHQ
How do people think about controller routes that make request to multiple domains? We are feeling pain in this area ostensibly because it’s difficult to refactor the client making the API calls to make multiple calls instead.
Should we try to have endpoints isolated to domains and force clients to make multiple requests, or do you separate a pack as a shared dependency that marries calls to multiple domains?
Some of our routes are also making calls to external services before returning a response to the client. This feels like cascading failures waiting to happen already, so I’d like to hear some perspectives on how to avoid that as well if possible
We have a package called home_screen which depends on many domains. That package lists those other domains as dependencies. In cases where we have public APIs, the home screen package uses them, although we’re mostly not there yet