A sophisticated adaptive database framework managing a hybrid architecture combining the relational structure of MySQL with the schemaless flexibility of MongoDB. Under the hood, this system manages real-time distributed ingestion, concurrent transactional validation, automatic storage strategy generation, and pessimistic Isolation locking via a complex Multi-Backend Pipeline Coordinator.
To interact with this powerful pipeline directly in the browser, the system contains a Logical Dashboard (FastAPI + Vanilla JS) which acts as an abstraction layer simulating the database logic and guaranteeing Data Atomicity and Integrity without leaking physical database tables.
For a structured documentation set, start here:
Assignment-specific deep dives are in:
The codebase is organized into logical domains for clean separation of concerns:
src/query_engine/: (Formerlya2) Handles SQL normalization, MongoDB document decomposition, dynamic schema generation, and storage strategy distribution.src/transaction/: (Formerlya3) The Multi-Backend Pipeline Coordinator, managing cross-database ACID compliance, row locking, state rollback, and concurrency.benchmarks/: Contains thek6automated load testing scripts (e.g.,load_test.js) used to measure the hybrid database's throughput.scripts/: Executable scripts for interacting with the database or simulating ingestion streams (e.g.,run_pipeline.py).tests/: Unit tests and E2E tests (including Pytest and Puppeteer suites) to validate concurrency locks and UI functionality.dashboard/: The FastAPI server and Vite+React frontend that drives the web interface.
Before launching the project, ensure your environment runs the following:
- Docker & Docker Compose: Required for hybrid database scaffolding.
- Python:
3.10or higher.
All operations scale natively from the default installation. Execute everything below directly in root directory.
Start the databases, Python backend, and React frontend — all in one command:
docker compose up -d(Verify all services are online with docker compose ps)
The application is live. Open your browser and navigate to:
To run the automated k6 load test against the running stack, use the loadtest profile:
docker compose --profile loadtest run --rm k6Note: The database must be bootstrapped first (Step 1 of the Usage Guide below) before running the load test.
When viewing the Dashboard, complete the following sequences:
- Locate Bootstrap within the GUI Setup Sidebar.
- Hit the generation criteria form and use the preset 100/50 parameters.
- Select ⚡️ Bootstrap Database. This initializes the relational
eventschema internally, ingests dummy metrics, writes out automatic strategies for SQL / Mongo tables, and begins storage distribution.
After Bootstrapping successfully maps schemas into RAM:
- Select the Entity Browser tab.
- Browse through native entities—the coordinator reconstructs unified logical views abstracting any awareness of internal MySQL relationships vs unstructured MongoDB dictionaries completely!
- Navigate to the Run All Tests sidebar section.
- Play the suite.
- Observe live Server-Sent Events showing the actual Python backend requesting, releasing, and migrating complex row locks securely demonstrating pessimistic isolated concurrency guaranteeing no race conditions overwrite tables!
To manipulate records via the CRUD Operations > Create tabs successfully without throwing backend rollback errors from relational constraints conflicting, supply fully structured JSON mappings validating against the social_iot_hybrid_v1 specification logic.
Navigate to the Create Tab, select Generate Template, and perfectly overwrite the JSON box with the data below to bypass backend rejection successfully:
[
{
"username": "demo_sensor_admin",
"event_id": "event_demo_01",
"timestamp": "2026-05-10T12:00:00Z",
"device": {
"device_id": "sensor_r1_hub",
"model": "RaspberryProbe",
"firmware": "v2.0-beta",
"sensors": [
{
"sensor_id": "sens_temp_001",
"type": "temperature",
"readings": [{"timestamp": "2026-05-10T12:00:00Z", "value": 45.2}]
}
]
},
"metrics": {
"latency_ms": 11.2,
"signal_quality": "strong",
"battery_pct": 98
},
"post": {
"post_id": "post_alert_01",
"title": "System Active",
"comments": [
{
"comment_id": "c_alert_01",
"commenter": "system_admin",
"text": "All metrics green.",
"reactions": [{"reaction_type": "upvote", "count": 2}]
}
]
}
}
]Navigate to the Read Tab, add Filters dynamically:
- Field name mapping:
username - Value mapping:
demo_sensor_admin(This directly queries hybrid architecture simultaneously extracting your inserted record!)
Navigate to the Update Tab:
- Add Filter Target:
username=demo_sensor_admin - Add Update Value Target:
- Field Name:
timestamp - New Value:
2026-08-01T15:00:00Z(View the real-time commit transaction state!)
- Field Name:
Navigate to the Delete Tab:
- Filter Constraint:
username=demo_sensor_admin - Run deletion sequence manually to observe modal safeties.