start_all_services.batchmod +x start_all_services.sh
./start_all_services.shdocker-compose up --build- AI Predictor: http://localhost:5000/health
- C++ Backend: http://localhost:8080/metrics
- React Frontend: http://localhost:3000
# Test connectivity
python test_connectivity.py
# Validate system
python validate_system.py
# Simulate workload
python simulate_workload.py# Health check
curl http://localhost:5000/health
# Get predictions
curl -X POST http://localhost:5000/predict \
-H "Content-Type: application/json" \
-d '{"recent_accesses": [1,2,3,4,5], "top_k": 5}'
# API docs
open http://localhost:5000/docs# Get metrics
curl http://localhost:8080/metrics
# Start simulation
curl -X POST http://localhost:8080/simulate/start
# Stop simulation
curl -X POST http://localhost:8080/simulate/stop
# Stream events
curl -N http://localhost:8080/events/stream- Dashboard: http://localhost:3000
- Real-time metrics and logs
- AI prediction visualization
- Control panel for simulations
# Windows
# Press Ctrl+C in each terminal
# Linux/macOS
./stop_all_services.sh
# Docker
docker-compose down# Windows
netstat -an | findstr :5000
netstat -an | findstr :8080
netstat -an | findstr :3000
# Linux/macOS
lsof -i :5000
lsof -i :8080
lsof -i :3000# Docker
docker-compose logs -f
# Individual services
docker-compose logs -f predictor
docker-compose logs -f backend
docker-compose logs -f frontendRun the comprehensive demo:
python demo_script.pyThis will:
- Test all three services
- Demonstrate AI predictions
- Show system integration
- Validate performance
- AI Predictor API: http://localhost:5000/docs
- React Dashboard: http://localhost:3000
- Demo Script:
python demo_script.py - System Architecture: Microservices with AI integration
- AI-enhanced virtual memory management
- Machine learning for page prediction
- Real-time monitoring and visualization
- Production-ready implementation
- Microservices architecture
# 1. AI Predictor
cd predictor
python -m uvicorn service:app --host 0.0.0.0 --port 5000
# 2. C++ Backend
cd backend
mkdir build && cd build
cmake .. && make
./vmm_simulator
# 3. React Frontend
cd frontend
npm install
npm run dev# Test AI predictions
curl -X POST http://localhost:5000/predict \
-H "Content-Type: application/json" \
-d '{"recent_accesses": [1,2,3,4,5], "top_k": 5}'
# Test backend metrics
curl http://localhost:8080/metrics
# Test SSE streaming
curl -N http://localhost:8080/events/stream- Page fault rate
- AI prediction accuracy
- Processing latency
- Memory usage
- System throughput
- Frontend Dashboard: http://localhost:3000
- Backend API: http://localhost:8080/metrics
- AI Predictor: http://localhost:5000/health
-
Port already in use
- Kill processes using ports 3000, 5000, 8080
- Use
netstatorlsofto find processes
-
Services not starting
- Check Docker is running
- Verify all dependencies installed
- Check logs for errors
-
Frontend not loading
- Ensure backend is running on port 8080
- Check browser console for errors
- Verify CORS settings
-
AI predictions failing
- Check predictor service is running
- Verify model is loaded
- Check network connectivity
If you encounter issues:
- Check the troubleshooting section above
- Run
python test_connectivity.py - Check service logs
- Verify all ports are available