| ▲ | alexwennerberg 3 hours ago | |
This was an excellent explanation of a complex business problem, which would be made far more complex by splitting these out into separate services. Every single 'if' branch you describe could either be a line of code, or a service boundary, which has all the complexity you describe, in addition to the added complexity of: a. managing an external API+schema for each service b. managing changes to each service, for example, smooth rollout of a change that impacts behavior across two services c. error handling on the client side d. error handling on the server side e. added latency+compute because a step is crossing a network, being serialized/de-serialized on both ends f. presuming the services use different databases, performance is now completely shot if you have a new business problem that crosses service boundaries. In practice, this will mean doing a "join" by making some API call to one service and then another API call to another service In your description of the problem, there is nothing that I would want to split out into a separate service. And to get back to the original problem, it makes it far easier to get all the logging context for a single problem in a single place (attach a request ID to the all logs and see immediately everything that happened as part of that request) | ||