This repository contains the course materials, implementation, and documentation for the Advanced Software Architecture and Analysis Techniques master's course. The project demonstrates a complete software system for pizza production with event-driven architecture, formal verification, and comprehensive analysis.
├── Docs/ # Complete project documentation
├── src/ # Source code implementation
│ ├── experiment/ # Pizza production experiment
│ ├── data-analysis/ # Data analysis and visualization
│ ├── kafka/ # Kafka configuration and setup
│ └── web/ # Web applications
├── report/ # LaTeX report templates
├── uppaal/ # Formal verification models
└── images/ # Project diagrams and assets
All project documentation is located in the Docs/ directory:
- FeatureModel.md - Feature model and variability analysis
- RequirementsAndTraceabilityMatrix.md - System requirements and traceability
- StateMachines.md - State machine specifications for system components
- ExperimentCommunicationArchitecture.md - Communication architecture design
- UppaalDescription.md - Formal verification specifications
- verification_validation.md - V&V strategy and results
Located in Docs/Experiment/:
- PizzaProductionExperiment.md - Overview of the experiment
- ExperimentScope.md - Scope and objectives
- ExperimentImplementation.md - Implementation details
- ExperimentExecution.md - Execution procedures
- PizzaMenu.md - Pizza recipes and configurations
All architectural diagrams are available in:
-
Docs/diagram-images/- PNG exports of diagrams- Analysis-level architecture
- Design-level architecture
- Feature model
- State machines for all components
- Subsystems tree
- Experiment communication flow
-
Docs/diagram-scripts/- Source files for diagrams.excalidrawfiles for editing.dotfiles for Graphviz diagrams
- Contribution.md - Contribution guidelines
- ReportStructure.md - Report organization guide
- Peer_doc_group_2.md - Peer review documentation made for group 2
A complete event-driven pizza production system built with microservices:
- Order Processing (
order-processing/) - C# service for order management - Warehouse (
warehouse/) - Python services for inventory and order dispatchinginternal_goods_provider/- Inventory managementorder_dispatcher/- Order routing
Each machine is implemented as an independent service:
- Dough Processing
dough-machine/- C# service for dough preparationdough-shaper/- C# service for shaping
- Topping Processing
Sauce/- Python sauce application serviceMeat/- Go meat slicing servicecheese/(CheeseGrater) - C# cheese preparation serviceVegetables/- Go vegetable slicing service
- Cooking & Packaging
Oven/- Python baking serviceFreezer/- Python freezing servicePackaging/- Go packaging robot service
- Kafka - Event streaming backbone
- KsqlDB (
KsqlDB/) - Stream processing and analytics - Kafka Initializer (
kafka-initializer/) - C# service for topic setup - API Gateway (
Api/) - Python REST API interface
- docker-compose.yml - Complete system orchestration
- Individual Dockerfiles for each service
Two interconnected web applications:
- Technology: NestJS (TypeScript)
- Purpose: API gateway and request routing
- Modules:
- Authentication integration
- Order management
- Order stack management
- User management
- Pattern: Microservices communication via RPC
- Technology: NestJS (TypeScript)
- Purpose: Order processing and lifecycle management
- Modules:
- Order creation and tracking
- Menu management
- Integration with Client Gateway
Comprehensive analysis of experiment results:
-
Jupyter Notebook:
- analysis.ipynb - Data analysis and visualization
-
Experiment Data (
experiment-data/):- Order latency measurements
- Pizza production time tracking
- Machine restock latency for all components
- Order dispatch metrics
-
Generated Reports:
- Statistical analysis CSVs
- Visualization charts (PNG)
- Efficiency metrics
Basic Kafka infrastructure:
- Producer and consumer examples
- Docker Compose configuration
- Python virtual environment setup
Utility scripts for testing:
- newOrders.ts - Order generation script
- script.sh - Automation helper
- Docker and Docker Compose
- Node.js (v18+) and npm
- Python (v3.8+) with Jupyter Notebook
-
Navigate to the experiment directory:
cd src/experiment -
Start all services:
docker-compose up -d
-
Initialize Kafka topics:
# Wait for Kafka to be ready, then run initializer docker-compose logs -f kafka-initializer
- Start client gateway:
cd src/web/client-gateway npm install npm run start:dev - Running an Order (Load Generation)
The load generation scripts (script.sh and newOrder.ts) are located in the src/web/scripts folder. Navigate to the directory containing the load script:
cd src/web/scriptsThe script.sh is configured to execute newOrder.ts multiple times, simulating the 10 replications required for the experiment. The script must be edited to target the correct load level (10, 50, or 100 pizzas). Then run the bash script to execute the test cell:
./script.shOpen the data analysis notebook with a Jupyter environment:
cd src/data-analysis
jupyter notebook analysis.ipynbTo inspect Kafka topics and messages, we have used Redpanda Console, which can be accessed at http://localhost:8090 after starting the Docker Compose setup. Be sure to check Redpanda container is running. This tool provides a user-friendly interface to monitor and manage Kafka topics, producers, and consumers. So, during the experiment execution, you can observe the message flow and topic statistics in real-time.
- C# - .NET 8.0 microservices
- Python - Machine services and data analysis
- Go - High-performance machine services
- TypeScript - Web applications and gateway
- NestJS - Backend microservices framework
- Pandas/NumPy - Data analysis
- Apache Kafka - Event streaming platform
- KsqlDB - Stream processing
- Docker - Containerization
- PostgreSQL - Relational database
- UPPAAL - Timed automata verification
UPPAAL models are located in uppaal/:
pizzaProduction.xml- Complete system model- Timed automata for all components
- Properties verification
- Deadlock analysis
- Timing constraint validation
Refer to [[Docs/UppaalDescription.md]] for model details and verification results.
Below is a summary of each member's contributions to the project:
| Task | Jonathan | Jeremy | Artem | Miguel | Sagor |
|---|---|---|---|---|---|
| Requirements & Use Cases | ✓ | ✓ | ✓ | ✓ | |
| Feature Model | ✓ | ✓ | ✓ | ✓ | |
| Design Model | ✓ | ✓ | ✓ | ✓ | |
| Analysis Model | ✓ | ✓ | ✓ | ✓ | |
| State Machines | ✓ | ✓ | ✓ | ✓ | |
| First Pitch | Contributor & Presenter | Contributor & Presenter | Contributor | Contributor | |
| Traceability Matrix | ✓ | ✓ | ✓ | ✓ | |
| Exercise 8 | ✓ | ✓ | |||
| UPPAAL | Main Developer | Helper | |||
| Experiment | Kafka deployment, Order Dispatcher & Internal Goods Provider | API Gateway, Customer microservice & design DB | Kafka Initializer, Order Processing, Dough Machine, Dough Shaper, Cheese Grater | Meat Machine, Sauce Machine, Vegetable Slicer, Oven, Freezer, Packaging Robot, KsqlDB, API to retrieve data & Data Analysis | |
| Second Pitch | Contributor | Contributor | Contributor & Presenter | Contributor & Presenter | Contributor |
| Report | ✓ | ✓ | ✓ | ✓ | ✓ |
Sagor join the project late and thus has not contributed to as many sections as the others. And at this point all remaining work was already assigned.