Exemplar 1: Data-Optimal
Data-Optimal
constraint anchor
The decomposition isolates the Moderation and Governance bounded context as a contained microservice while the other four contexts remain fragmented. Overall cohesion is moderate (CHM = 0.6699) and coupling low (CHD = 0.3554), with no foreign‑key crossings between services (n_fk_crossings = 0).
Metrics
| Interface count | 2.286 |
| Msg cohesion | 0.670 |
| Domain cohesion | 0.355 |
| Inter-svc calls | 597.000 |
| Structural MQ | 0.264 |
| Conceptual MQ | 0.450 |
| BC penalty | 0.851 |
| NMI (BC align.) | 0.263 |
| Data ownership | 0.248 |
Verified facts
- BCs contained: Moderation and Governance
- BCs fragmented: Configuration and Administration, Forum, Notification and Subscription, User Management
- FK crossings between services: 0
- Shared tables: JFORUM_ATTACH, JFORUM_AVATAR, JFORUM_CATEGORIES, JFORUM_CONFIG, JFORUM_FORUMS, JFORUM_GROUPS, JFORUM_POST_REPORT, JFORUM_RANKS, JFORUM_SESSIONS, JFORUM_SMILIES, JFORUM_THEMES, JFORUM_TOPICS, JFORUM_TOPICS_WATCH, JFORUM_USERS, JFORUM_VOTE_VOTERS, JFORUM_WORDS
- High-uncertainty classes: 131
Benefits
- The contained Moderation and Governance context achieves a high majority share of 0.8571, indicating strong internal cohesion.
- Zero foreign‑key crossings eliminates distributed transaction risk across services.
- Four fragmented bounded contexts distribute their classes across many services (e.g., Forum spans 25 services), which may increase inter‑service latency.
- Twelve classes have maximal entropy (entropy_norm = 1.0) and low confidence (0.2), indicating uncertainty about their correct placement.
Services
SmilieManagement: Manage creation, retrieval, and administration of emoticon assets used in forum posts.
ForumGovernance [Forum, Moderation and Governance, Notification and Subscription]: Enforce access rules, handle moderation actions, track forum events, and manage notifications and subscriptions across topics.
ConfigurationAdministration [Configuration and Administration]: Provide CRUD operations for system configuration, manage admin settings, and support Lucene indexing and custom path resolution.
ForumEventListener: Listen to domain events and dispatch appropriate actions for categories, forums, posts, and topics.
ContentModerationEvent: Process content-related events such as bad word detection, empty posts, spam handling, and topic watch notifications.
UserRanking: Calculate and expose user ranking metrics, with admin capabilities for managing ranking data.
+22 more services
PrivateMessaging: Handle sending, receiving, and rule‑based access control for private messages between users.
RssFeed: Generate and serve RSS feeds for forum content.
SpamProcessing: Execute background jobs for sending activation keys, lost‑password emails, and various spam‑related message dispatches.
SecurityInterceptor: Intercept controller methods to enforce authentication and authorization rules.
UserManagement [User Management]: Manage user authentication, registration, sessions, roles, and profile administration.
PollManagement: Create, update, and vote on polls attached to forum topics.
BadWordManagement: Administer the list of prohibited words used for content filtering.
AvatarManagement: Store, retrieve, and serve user avatar images with admin controls.
ThemeManagement: Manage visual themes for the forum UI.
QueryCache: Cache database query results to improve performance.
BBCodeProcessing: Parse and format BBCode markup within forum posts.
ForumSearch: Execute paginated search queries over forum content based on parameters.
OperationChain: Coordinate chained request operations such as post report counting.
DataRepository: Provide generic DAO implementations for attachments, bans, themes, recent topics, and session persistence.
TagTemplateEngine: Renders forum tags, templates, internationalization resources, and handles import operations for UI presentation.
MessageFormattingEngine: Formats forum messages, signatures, and HTML content, applying safe HTML and smilie transformations.
AttachmentManagementService: Manages file attachments, including upload, storage, image processing, and retrieval for posts.
TopicWatchManagement: Tracks user watch subscriptions on topics, providing watch persistence and notification triggers.
GroupPermissionManagement: Handles group and role definitions, permission assignments, and administrative operations for forum access control.
PostReportService: Collects and processes user reports on posts, storing report data and exposing reporting APIs.
EmptyEntityEventProcessor: Detects and processes events when categories, forums, or topics become empty, coordinating cleanup actions.
CategoryManagementService: Manages forum categories, including creation, ordering, and administrative CRUD operations.
Services & data