CU Admission Image Processing v1 Slide 1 of 5
⚡ FastAPI Circuit Breaker & Separate DB

1. Enterprise Network Topology & VPC Security

Only 2 Public Droplets (`admission.cu.ac.bd`, `adminapi.cu.ac.bd`); MySQL 8 DB & DO Spaces run inside Private VPC.

DigitalOcean Cloud Infrastructure Boundary

🌐 Public Internet Edge (2 Public Droplets)
admission.cu.ac.bdFrontend
adminapi.cu.ac.bdLaravel CU-API
🔒 DigitalOcean Private Network VPC (10.x.x.x)
Python AIWorkers
MySQL 8Database
DO SpacesObject Storage
Step 1: Initializing network boundary analysis. Click "Next Step" to inspect public droplets vs. private VPC isolation.

2. CU-API Direct MySQL 8 Log Querying

CU-API queries MySQL 8 `validation_logs` table directly without needing intermediate API calls. Handles multiple uploads and fetches latest status.

Laravel Direct MySQL 8 Latest Log Query

// Laravel CU-API querying MySQL 8 directly
public function getLatestValidationLog($studentId)
{
    // Direct query on shared MySQL 8 database
    $latestLog = DB::table('validation_logs')
        ->where('student_id', $studentId)
        ->orderBy('created_at', 'desc')
        ->first();

    return $latestLog ? [
        'status' => $latestLog->status,
        'message' => $latestLog->message,
        'image_key' => $latestLog->image_key
    ] : ['status' => 'PENDING'];
}

Direct Query Execution Steps

3. Service Failure Isolation & Direct DB Resiliency

Simulating background worker or storage sync outages while public droplets (`admission.cu.ac.bd`, `adminapi.cu.ac.bd`) remain 100% online.
Simulation Step 0: All Systems Operational
CU Frontendadmission.cu.ac.bd
→
CU-API (Laravel)adminapi.cu.ac.bd
↔
MySQL 8 DatabaseDirect Log Query
Scanner WorkerDO Spaces Scan
Validator WorkerAI Check & Log Write
DigitalOcean Spaces (storage/photo/)Secure Object Storage
Database Connection Pool: HEALTHY (Direct MySQL 8) | Active Queries: 12/100 | Fallback Ready: TRUE
Step 0: All systems operating normally. CU-API reads logs instantly from MySQL 8. Click "Next Step" to simulate worker downtime.
CU-APIRUNNING
FrontendRUNNING
WorkersONLINE
MySQL 8AVAILABLE

4. Background Processing & Sliding Window

Step-by-step execution of scanner and validator workers writing logs into MySQL 8.

Scanner Step-by-Step Execution

Checkpoint & Window Animation

10:0010:0510:1010:1510:20
Window#1
Batch Size100
Threshold100 / run
StatusACTIVE
Step 1: Scheduler initializes scanner job on private droplet.

5. Multiple Uploads & Latest Failed Log Warning

Handling multiple image uploads for `chi25115971` & `din25302643`, querying MySQL 8 for the latest status, and displaying non-blocking warning banners.

Multiple Upload & Warning Flow

MySQL 8 `validation_logs` (Latest Ordered Query)

-- Querying latest log for student...
SELECT * FROM validation_logs 
WHERE student_id = 'chi25115971' 
ORDER BY created_at DESC LIMIT 1;
Ready: Click "Next Step" to trace multiple uploads and latest failure warning display.