New answers tagged

0

Load Balancing The problem sounds like one of Load Balancing, which I'd say is quite a common thing to want to do. OP Proposed Solution As with every software engineering problem, a hand-rolled solution is a valid way forward, however I can think of several reasons why that would not be my preferred approach. Load balancing is a solved problem; many ...


1

In domain driven design, the "entity" is the core business object which contains both data and related business logic. In your example, the combination of PersonModel and PersonService is the entity (I would just call it Person). What you call PersonEntity is an implementation detail of the DAO/repository. It is not part of your domain, and you may not have ...


1

Here's how I would domain model this... I usually decompose business requirements into core operations. Once I have identified those core operations, I then identify the sub-domains that would host those operations. Note, I prefer to identify operations first because it's easier for me to identify what types are required in order for those operations to ...


1

As a general rule of thumb (and especially since you seem to be concerned about the efficiency of loading an entire truck), you want to keep aggregates small and only update a single aggregate in one transaction. This does mean that business rules spanning multiple aggregates will only be eventually consistent, but this doesn't usually cause any practical ...


3

There's really not enough information about the expected contents of the business log. Generally, I see the following approaches: If the logging can be modeled as a cross-cutting concern, you could use some appropriate technology like an aspect framework or interceptors. (In Java that would e.g. be AspectJ or an interceptor in a CDI container) You could ...


0

Your business logger needs to communicate with other out-of-process services for data storage. This means, you need to decouple this logger from your business logic, so you could easy mock it in unit tests or replace with another logger implementation based on the same logger interface, that will be expected in client code. You wrote, that your logs are ...


Top 50 recent answers are included