Using tactical DDD to design microservices
Tactical DDD is most useful here as a boundary-management tool, not just a modeling technique. For microservices teams, the practical question is less โwhat classes do we need?โ and more โwhat data must stay consistent together, and what can be allowed to change independently?โ That distinction reduces the risk of carving services around tables, screens, or org charts instead of around transactional rules.
The aggregate boundary also has operational consequences. Once a service owns an aggregate, that service becomes responsible for enforcing invariants, handling retries, and deciding which updates are safe to accept concurrently. If the boundary is too large, coordination becomes expensive and deployment autonomy shrinks. If it is too small, cross-service chatter and distributed consistency work increase, which can create latency, fragile workflows, and harder failure recovery.
Domain events are the integration seam. In a microservices environment, they let other services react without direct database coupling, but they also introduce contract management concerns: event naming, payload stability, ordering expectations, and idempotent consumers. Teams need clear rules for what is a business event versus an implementation detail, otherwise event streams become noisy and difficult to evolve.
The Scheduler and Supervisor roles highlight a common design trade-off: orchestration can keep workflow logic explicit, while supervision helps detect stalled or failed steps without forcing synchronous chains. That separation is valuable in long-running operations such as delivery coordination, where the system must remain observable, resumable, and tolerant of partial failure. For architects, the key takeaway is that DDD patterns shape service boundaries, integration style, and operational ownership together.
Overview of the tactical patterns
This section provides a brief summary of the tactical DDD patterns, so if you are already familiar with DDD, you can probably skip this section. The patterns are described in more detail in chapters 5 โ 6 of Eric Evans’ book, and in Implementing Domain-Driven Design by Vaughn Vernon.
Entities. An entity is an object with a unique identity that persists over time. For example, in a banking application, customers and accounts would be entities.
- An entity has a unique identifier in the system, which can be used to look up or retrieve the entity. That doesn’t mean the identifier is always exposed directly to users. It could be a GUID or a primary key in a database.
- An identity may span multiple bounded contexts, and may endure beyond the lifetime of the application. For example, bank account numbers or government-issued IDs are not tied to the lifetime of a particular application.
- The attributes of an entity may change over time. For example, a person’s name or address might change, but they are still the same person.
- An entity can hold references to other entities.
Drone delivery: Applying the patterns
We start with the scenarios that the Shipping bounded context must handle.- A customer can request a drone to pick up goods from a business that is registered with the drone delivery service.
- The sender generates a tag (barcode or RFID) to put on the package.
- A drone will pick up and deliver a package from the source location to the destination location.
- When a customer schedules a delivery, the system provides an ETA based on route information, weather conditions, and historical data.
- When the drone is in flight, a user can track the current location and the latest ETA.
- Until a drone has picked up the package, the customer can cancel a delivery.
- The customer is notified when the delivery is completed.
- The sender can request delivery confirmation from the customer, in the form of a signature or finger print.
- Users can look up the history of a completed delivery.
- Delivery
- Package
- Drone
- Account
- Confirmation
- Notification
- Tag
There are two domain events:
- While a drone is in flight, the Drone entity sends DroneStatus events that describe the drone’s location and status (in-flight, landed).
- The Delivery entity sends DeliveryTracking events whenever the stage of a delivery changes. These include DeliveryCreated, DeliveryRescheduled, DeliveryHeadedToDropoff, and DeliveryCompleted.
Next steps
The next step is to define the boundaries for each microservice.Enjoyed this article? Sign up for our newsletter to receive regular insights and stay connected.
