Skip to content

Tracer Probability Calculation System

The Tracer Probability Calculation System is a data-driven approach to determine which bounded contexts modules and functions belong to in a microservices architecture. It analyzes actual usage patterns across different user groups to mathematically calculate the probability of module/function ownership.


Core Concepts

The probability model depends on a small set of concepts that connect users, taxonomies, and recorded usage. Understanding these terms first makes the later formulas and examples much easier to follow. Use this section as the glossary for the rest of the calculation explanation.

Concept Description
Traced Taxonomy A Traced Taxonomy represents a group of users who work in a similar domain, department, or business area. These taxonomies serve as candidate bounded contexts for your future microservices architecture.

Examples:
- Sales Team
- Finance Department
- Customer Support
- Inventory Management Team
User Usage Tracking The system maintains detailed records of module and function executions:

- UserModuleUsage: Tracks which users executed which modules, with execution counts
- UserFunctionUsage: Tracks which users executed which functions, with execution counts

Each user is associated with a specific Traced Taxonomy, allowing the system to aggregate usage patterns by business domain.
Probability A decimal value between 0.0 and 1.0 representing the strength of association between a module/function and a traced taxonomy:

- 0.0: No usage by this taxonomy
- 0.5: Moderate usage (50% of total)
- 1.0: Exclusive usage by this taxonomy

When displayed, probabilities are converted to percentages (e.g., 0.80 → 80.00%).

Calculation Algorithm

This section explains how Tracer converts recorded usage into probabilities that can support bounded context decisions. The formulas are simple, but the interpretation matters because they summarize behavior across multiple users and taxonomies. Review these calculations before using the results as architectural evidence.

Module Probability Calculation

Formula:

probability = (usages_by_taxonomy) / (total_usages_across_all_taxonomies)

Example Calculation:

Module: CustomerOrder

Traced Taxonomy Usage Count Calculation Probability Percentage
Sales Team 80 80/100 0.80 80.00%
Finance Team 15 15/100 0.15 15.00%
Support Team 5 5/100 0.05 5.00%
TOTAL 100

Conclusion: CustomerOrder module has the highest probability (80%) for the Sales bounded context.

Function Probability Calculation

The same logic applies but at the function level. Additionally, it weights the calculation by both:

  • Number of users in the taxonomy
  • Total count of function executions per user

Formula: probability = (usageCount * numberOfUsersInTaxonomy) / totalUsage

This ensures that taxonomies with more active users get appropriate weight in the calculation.


Implementation Details

The implementation details describe how raw probability values are presented to users in the product and related outputs. This helps you interpret what you see in the UI and exported reports without having to work directly with decimal values. Use this section when you want to align the mathematical model with the displayed results.

Display Formatting

Probabilities are converted to percentages for user display:

Example: 0.8534 → 85.34%


Use Cases

The use cases show how the probability system supports practical decomposition decisions instead of remaining a purely theoretical model. They illustrate how to interpret balanced versus dominant probabilities in real modernization scenarios. Use these examples to translate Tracer output into next actions for architecture work.

1. Bounded Context Suggestions

Scenario: You want to decompose a monolithic database into microservices and need to decide which modules belong to which bounded context.

Solution: Query the most probable usage results: Each module will show its highest probability taxonomy, suggesting the best bounded context assignment.

2. Identifying Cross-Cutting Concerns

Scenario: Some modules are used across multiple domains and should be shared services.

Solution: Look for modules with similar probabilities across multiple taxonomies:

Example Result: - Logging Module: Sales 35%, Finance 33%, Support 32% → Shared Service - Customer Module: Sales 85%, Finance 10%, Support 5% → Sales Bounded Context

3. Monitoring Domain Evolution

Scenario: Track how module usage patterns change over time.

Solution: Recalculate probabilities periodically and compare trends:


Conclusion

The Tracer Probability Calculation System provides a data-driven, mathematical approach to bounded context identification. By analyzing actual usage patterns across user groups, it removes guesswork from microservices decomposition and provides quantifiable evidence for architectural decisions.

Key Takeaway: Let your users' behavior guide your architecture decisions, not just theoretical domain models.