How socialsoftware/microservices-simulator works
Principal system components
• Simulator: This module encapsulates the core Domain-Driven Design (DDD) concepts, including the domain entities (aggregates), event handling, versioning, and the coordination mechanisms for both sagas and TCC. In the file tree, this is located under the “simulator” directory.
• Quizzes Microservice System: This part of the project is a case study implementing the quizzes functionality. It is split into two transactional models:
– Sagas: Found under “applications/quizzes/src/main/java/pt/ulisboa/tecnico/socialsoftware/quizzes/sagas”. It includes aggregates, saga-specific coordination, state management and business logic tests.
– TCC (Transactional Causal Consistency): Found under “applications/quizzes/src/main/java/pt/ulisboa/tecnico/socialsoftware/quizzes/causal”. It includes the domain-specific microservices aggregates, along with TCC-specific coordination and event processing.
• External Testing & Deployment: Docker Compose files (docker-compose.yml), JMeter test cases (in the jmeter directory), and Maven build scripts support deployment, automated testing, and simulating concurrent behavior.
Break down internal architectural layers
• Transactional Model Specific Extensions:
– For Sagas: Include additional components that extend the aggregates (e.g., SagaTournament, corresponding event subscription and handling classes). Group these in a “Sagas Coordination/Functionalities” module.
– For TCC: Likewise, show the causal aggregates (e.g., CausalTournament) and the coordination components classed under TCC. Make note of the merge behavior and ordering enforced by transactional causal consistency.
• Simulator Coordination: Show the “simulator” container which coordinates unit-of-work patterns, aggregate persistence, event subscription, and the orchestration of workflows. It also includes the core elements for DDD as well as the transactional extensions.
• Integration & Testing Components: Include a block for JMeter (with test case execution flows for tournaments, update names, add participants, etc.) and a block for Spock/Maven tests.
• Deployment & Infrastructure: Add deployment elements such as Docker Compose and Maven commands, which map to launching specific profiles (sagas, TCC, tests).