I have the following architecture of finacial app:
The transfer service needs additional two services: accounts and account history. At the moment it synchronously calls both of them. I started to think whether this is a good design for following reasons:
- it introduces relatively high coupling between transfers and other services.
- calls has to be synchronous so it may get slow
- changes to accounts / account history requires regression (i do not have any api versioning so far)
Maybe embedding dependent services in transfer service's deployment unit is better idea? I could use dependensy injection just to inject implementation of currently used interfaces and avoid calls over the network? (I know it does not solve problem in the first bullet)
What are patterns and anti patterns here?
PS: I cannot (and do not want to) call these services from the mobile app nor facade API.
Aucun commentaire:
Enregistrer un commentaire