You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
VigilAI: Smart Surveillance Event Detection & Analysis System
Author: Prachi Maruti Patil β Vidyalankar Institute of Technology
A production-ready, multi-service AI-powered video surveillance system featuring YOLOv8 object detection, rule-based event analysis, on-demand clip generation, and an Advanced Database Management System (ADBMS) analytics dashboard.
This system incorporates several Advanced Database Management System (ADBMS) concepts to ensure efficient querying, high availability, and optimal performance at scale.
1. Indexing & Query Optimization
Compound Indexes on event_type, video_id, and timestamp allow fast filtering across large event collections without full-table scans.
The /api/adbms/index-comparison endpoint lets you compare query execution plans with and without indexes in real time, demonstrating measurable speedup.
Filter parameters (min_duration, min_confidence, zone) are designed to leverage these indexes for sub-millisecond lookups.
2. Caching Layer
NodeCache is used as an in-memory caching layer in the Node.js backend.
Frequently accessed aggregation results (event counts, summaries, stats) are cached to avoid redundant MongoDB aggregation pipelines.
The /api/adbms/cache-stats and /api/adbms/cache-test endpoints expose live miss β hit demonstrations, illustrating cache effectiveness.
3. Replication & Fault Tolerance
The system is designed with MongoDB replica set concepts in mind.
The /api/adbms/replication-test endpoint simulates primary failure and restore scenarios (fail_primary / restore), showcasing how the system maintains availability during node failure.
/api/adbms/server-selection demonstrates read/write routing β writes go to the primary, reads can be distributed to secondaries.
4. Bulk Write Operations (Upsert Pattern)
All events from the Python engine are committed via POST /api/events/bulk, which uses MongoDB's bulkWrite with upsert semantics.
Event deduplication is guaranteed by a deterministic event_id = MD5(video_id:type:track:frame) hash, preventing duplicate records even on reprocessing.
5. Query Logging & Observability
Every significant database query is logged to a QueryLog collection, recording execution time, query type, and result size.
/api/adbms/query-logs surfaces these logs with aggregate statistics, enabling database performance monitoring over time.
6. Sequential vs. Parallel Processing
The system supports both sequential and parallel video processing pipelines.
/api/adbms/processing-comparison compares throughput between the two strategies, demonstrating how concurrency impacts database write patterns and overall performance.