Exemplar 1: Data-Optimal
Data-Optimal
constraint anchor
The system is decomposed into four bounded contexts—booking, routing, handling, and tracking—each marked as fragmented. Classes are distributed across 17 services, with the majority of classes in each context residing in service 8, but the majority share ranges from 0.1923 to 0.5833.
Metrics
| Interface count | 2.000 |
| Msg cohesion | 0.518 |
| Domain cohesion | 0.642 |
| Inter-svc calls | 158.000 |
| Structural MQ | 0.268 |
| Conceptual MQ | 0.492 |
| BC penalty | 0.894 |
| NMI (BC align.) | 0.084 |
| Data ownership | 0.083 |
Verified facts
- BCs contained: —
- BCs fragmented: booking, handling, routing, tracking
- FK crossings between services: 0
- Shared tables: CARGO, LOCATION, VOYAGE
- High-uncertainty classes: 60
Benefits
- The cohesion metric CHM is 0.518, indicating moderate internal cohesion within services.
- The coupling metric CHD is 0.642, reflecting acceptable inter-service coupling.
- No foreign key crossings (n_fk_crossings 0) reduce the risk of distributed transaction complexity.
- All bounded contexts are fragmented, with low majority shares (e.g., handling 0.1923), which can increase coordination overhead.
- Shared tables CARGO, LOCATION, VOYAGE are accessed by multiple services, potentially leading to data consistency challenges.
- Several classes have high uncertainty entropy (up to 0.9771) and low confidence in their bounded context assignment, indicating possible misplacement.
Services
CarrierMovementService: Manages carrier movement schedules and related value objects.
SpecificationEngineService: Provides composable business rule specifications for domain validation.
CargoAdministrationApi: Exposes administrative APIs for cargo registration and route candidate handling.
BookingFacadeService: Acts as a facade to coordinate booking operations and assemble routing DTOs.
VoyageManagementService: Handles voyage creation, leg management, and persistence of voyage data.
RoutingDomainService: Computes itineraries by applying route specifications to cargo routing.
+11 more services
GraphDataAccessService: Offers data access to graph structures used by pathfinding components.
GraphTraversalService: Executes graph traversal to determine transit paths and integrates external routing services.
CargoOperationsService [booking, handling, routing, tracking]: Orchestrates cargo booking, routing, handling events, and tracking across the application.
HandlingEventIngestionService: Consumes handling event registration attempts from JMS and file sources for processing.
TrackingDtoService: Defines DTOs and conversion logic for cargo tracking and handling events.
RoutingCommandService: Processes commands to assign routes and legs to cargos.
TrackingPresentationService: Converts domain tracking data into view models and adapts delivery events for presentation.
LocationDtoService: Assembles location DTOs from domain location entities.
LocationRepositoryService: Manages persistence and retrieval of location data identified by UN/LOCODE.
DomainExceptionService: Encapsulates domain-specific exception types for cargo and handling errors.
HandlingReportService: Parses handling reports and generates handling event data for the system.
Services & data