Skip to content

lanfangping/CATune_demo

Repository files navigation

CATune logo

Demonstrating CATune

CATune is a structural constraint-aware database tuning system that extracts ordering constraints and incorporates them into optimization. CATune models dependencies as a topology graph and performs constraint-aware exploration using a topology-aware sampling strategy. The demo provides an interactive workflow where users can extract, inspect, and modify constraints, visualize dependency structures, and observe their impact on the tuning process. Attendees can compare constraint-aware and standard tuning under different settings through real-time feedback. This demonstration highlights how structural dependencies enable more efficient and robust DBMS tuning.

CATune Control Center

Flask-based CATune UI scaffold with two workspaces:

  • Constraint Extraction
  • Constraint-Aware Tuning

The app includes:

  • a Flask app factory and API blueprints,
  • end-to-end frontend wiring with plain HTML/CSS/JavaScript,
  • mock extraction and tuning jobs that exercise the API contracts,
  • Docker support for local development.

Run locally

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python app.py

Open http://localhost:5000.

Local CATune integration

This demo project can use the local CATune Python project from:

/Users/fangpinglan/Projects/CATune

Install it into the demo project's virtualenv with:

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements-dev.txt

This installs CATune in editable mode from the local path above.

If offline packaging tools block the editable install, the demo project's local virtualenv can also use a .pth path link pointing at:

/Users/fangpinglan/Projects/CATune/src

That path-based install is enough for importing CATune modules in this demo environment.

Run with Docker

docker compose up --build

API overview

Extraction:

  • POST /api/extraction/jobs
  • GET /api/extraction/jobs/<id>
  • GET /api/extraction/jobs/<id>/steps
  • GET /api/extraction/jobs/<id>/steps/<step_id>
  • GET /api/extraction/jobs/<id>/constraints
  • POST /api/extraction/jobs/<id>/constraints/selection
  • GET /api/extraction/jobs/<id>/search-space

Tuning:

  • POST /api/tuning/jobs
  • GET /api/tuning/jobs/<id>
  • GET /api/tuning/jobs/<id>/timeline
  • GET /api/tuning/jobs/<id>/iterations/<iteration_id>
  • GET /api/tuning/jobs/<id>/best-config

Notes

The current backend uses in-memory mock data and background threads so the UI framework can be exercised immediately. The API boundaries are set up so real extraction and tuning implementations can replace the mock service layer later.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors