8
votes
Accepted
When would you consider sharing a database to be fine? What are your rules?
Your "components" should probably be part of the same "service", even if they are run as different executables. If this is the case it should be fine if both access the same ...
7
votes
Accepted
How to structure repositories for a small number of entities?
In DDD, the general approach is to have one repository per aggregate.
An aggregate is a collection of closely related concepts that together form a consistency boundary.
For example an Order aggregate ...
3
votes
Accepted
How does a Bounded Context from DDD help scaling microservices?
Bounded Contexts as a strategic pattern have several benefits:
They are linguistic boundaries. A concept may have a different meaning to different parts of the business. By acknowledging this and ...
2
votes
When would you consider sharing a database to be fine? What are your rules?
Working through your options:
The background worker subscribes to "credit" domain events emitted by the REST API and stores the consumer' credit in its own database.
My primary concern for ...
1
vote
When would you consider sharing a database to be fine? What are your rules?
The main problems with sharing a database is that if the database ever requires refactoring, it is much more difficult to perform refactoring on a database than it is to perform refactoring on an API.
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
domain-driven-design × 1588c# × 245
architecture × 230
design-patterns × 182
domain-model × 173
design × 159
cqrs × 152
aggregate × 141
object-oriented × 122
event-sourcing × 107
object-oriented-design × 100
microservices × 79
java × 60
repository × 43
entity × 43
repository-pattern × 40
clean-architecture × 37
enterprise-architecture × 34
rest × 31
architectural-patterns × 31
entity-framework × 29
orm × 28
validation × 28
value-object × 28
.net × 27