I'm working on a complex system that follows the principles of microservices, but with one exception - my services are more 'generalized' and big (I refer to them as
macroservices further down the post).
For example, instead of having very precise services:
I have the following generalized services instead:
- portal (users, news, articles)
- forum (users (from portal), posts, threads)
- game (users (from portal), matches, items)
I understand that it affects scalability, flexibility and coupling - but this design choice has its reasons, and it's not the problem I'm facing either.
As you can see above - all of the
users resource originating from the
Generally speaking, once you register on the portal - you can use the same account to play the
game or post on
Should I implement cross-service communication, so
portal when needed (quite often, as every
user(s)) - which means they can't function once
portal dies, but the data will always be up to date.
Should I implement data duplication/replication, so whenever UserCreated, UserUpdated event fires -
forum stores a duplicate of
user in their own database - which means they can still function if
portal dies, but there's a bit of coupling due to synchronization.