I have an architectural question -
We have one microservice for say, four different domain objects (each is an aggregate root). Now, there could be some common code (for example the domain objects themselves, or some common data access code) among them - so my question is where to keep such common code?
For now, we’ve created a common project in sbt, which the other microservices are referring to.
- Is this an anti-pattern?
- Where should the common code be kept?
- If I write some common code (which includes Cassandra related code) is it problematic to use lagomScaladslPersistenceCassandra as a dependency in the common sbt project?