Cloud Computing
Dockerised Coaching-Centre Fee & Attendance App with a Backup/DR Study (Python/Flask + MySQL)
One small app, two containers, a tested restore drill — operations discipline for a real tuition business
- Python
- Flask
- MySQL
- +5
A poller, a rule engine and a dashboard that catch outages before customers do
Mapped to your syllabusUniversity of Madras CBCS 2023-24 · 320S61 Mini Project (Professional Competency Skill) · Semester 6Uptime Monitoring & Alerting System (UMAS) is an operations tool that watches small web services and tells their owners something is wrong before a customer phones in. It is built entirely on the University of Madras BCA stack — Java (220C4A), RDBMS (320C5B) and Web Technology (320C5C) — running as servlets/JSP on Apache Tomcat with MySQL, and measured under load with Apache JMeter.
A poller built on Java's ScheduledExecutorService checks each registered service every 30 seconds, records the HTTP status and response time into MySQL, and feeds a rule engine: two consecutive failures open an incident, a response slower than a configured threshold raises a latency warning, and recovery auto-closes the incident. Alerts go out by email (JavaMail) and appear in an acknowledgement queue on a JSP dashboard that shows 24-hour uptime percentages, response-time charts (Chart.js) and the full incident history with who acknowledged what and when.
The bundle ships with a deliberately small target service — an order-status API for a Chennai bakery, written with the same servlet stack — so the monitor has something real to watch, and a JMeter load-test harness that measures p95 response times before and after a connection-pool fix. That measured before/after comparison, with real numbers in the report, is what lifts this mini project from "another CRUD app" to an advanced, viva-defensible systems project.
Syllabus alignment
Small services on low-cost hosting fail quietly: the process dies, the disk fills, or the database slows to a crawl at peak hours, and the first report comes from a customer. For Sweet Basket's order-status service there is no uptime history, no alert channel and no performance data — so outages last hours instead of minutes, the hosting provider cannot be shown evidence of recurring faults, and nobody knows whether recent code changes made the service faster or slower.
What is needed is a self-hosted monitoring layer that (1) probes the service continuously and records every check, (2) applies clear rules — consecutive failures and latency thresholds — to open, escalate and auto-close incidents, (3) notifies the owner by email immediately, (4) presents uptime and response-time history on a web dashboard, and (5) is backed by a repeatable JMeter load-test harness that turns "it feels slow" into measured p95 numbers before and after a fix.
When a small business's web service goes down, the owner usually finds out from an angry customer, because nobody is watching the service. This project builds a self-hosted uptime monitoring and alerting system in Java: a poller probes registered HTTP endpoints on a schedule, stores every check in MySQL, a rule engine converts failed checks into incidents and latency warnings, and a JSP dashboard reports uptime percentages and response-time trends while email alerts reach the right person. A JMeter load-test harness supplies measured performance evidence.
The scenario: Sweet Basket, a two-outlet bakery in Chennai, runs a small order-status service ("is my cake order ready?") that the counter staff and an Instagram-redirected link depend on. The service was built by a freelance developer and runs on one low-cost VM; there is no monitoring, so an out-of-memory crash in the past meant silent downtime for half a day. The bakery wants a watcher it can self-host, understand and extend — which is exactly this project.
ScheduledExecutorService) checks each service's /health endpoint every 30 seconds with a configurable timeout, recording status code, response time and error text per check.In scope
Out of scope (v1)
The project follows an iterative-incremental SDLC model compressed into 6 weeks (the 320S61 mini-project window), with one working increment per week and a fixed review at each weekend. Iteration is appropriate because the rule engine's thresholds and the dashboard's usefulness can only be tuned against a running system, so feedback loops must be short.
| Week | Increment | Activities | Deliverable |
|---|---|---|---|
| 1 | Analysis & schema | Requirement checklist with the bakery owner, ER diagram, schema DDL, service-registry wireframes | Approved design note |
| 2 | Poller + registry | ScheduledExecutorService poller, check recording, service CRUD, /health on target service | Checks accumulating in MySQL |
| 3 | Rules & alerts | Incident state machine, latency thresholds, JavaMail delivery, retry queue, unit tests for rules | Alerts reaching a real inbox |
| 4 | Dashboard | JSP pages, Chart.js graphs, uptime % queries, acknowledge/resolve workflow | Working dashboard |
| 5 | Load testing | JMeter thread groups, p95 baseline, connection-pool + index fix, re-run, comparison table | Measured before/after study |
| 6 | Hardening & report | Black-box test pass, concurrency fixes, documentation, mini-project report and demo prep | Final submission |
Member split (team of 2): Member A owns the poller, rule engine and alert delivery; Member B owns the schema, dashboard and JMeter study; the target service and integration tests were built jointly, and each member can demo the whole system.
Testing approach: JUnit tests for the rule engine's state transitions (1 failure, 2 failures, recovery, flapping), integration tests against a test database, black-box cases for every dashboard screen, and the JMeter runs as repeatable performance tests with saved result files.
UMAS deploys as two web applications on one Tomcat server with one MySQL 8 database. The monitor application contains the poller (a daemon thread pool started at context load), the rule engine, the email sender and the JSP dashboard. The target application is the bakery's order-status API exposing /health and /order-status, deliberately kept small because it is the patient, not the doctor. All reads and writes go through a JDBC layer using a connection pool and prepared statements only.
flowchart TD
SVC[Target service: bakery order API] -->|status and response time| P[Poller threads]
P -->|every 30 s| REC[Check recorder]
REC --> DB[(MySQL: checks)]
REC --> RE[Rule engine]
RE -->|2 failures or slow response| INC[Incident state machine]
INC --> DB2[(MySQL: incidents and alerts)]
INC --> MAIL[JavaMail sender]
MAIL --> INBOX([Owner inbox])
ADM([Admin]) -->|acknowledge and resolve| DASH[JSP dashboard]
DASH --> Q1[Uptime queries]
Q1 --> DB
DASH --> Q2[Incident and alert views]
Q2 --> DB2erDiagram
SERVICE ||--o{ CHECK_RESULT : "receives checks"
SERVICE ||--o{ INCIDENT : "may have"
SERVICE ||--o{ ALERT_RULE : "is governed by"
INCIDENT ||--o{ ALERT : "triggers"
CONTACT ||--o{ ALERT : "is notified by"
USER ||--o{ INCIDENT : acknowledges
LOAD_TEST_RUN }o--|| SERVICE : "measures"
SERVICE {
int id PK
string name
string healthUrl
int intervalSeconds
int timeoutMs
boolean active
}
CHECK_RESULT {
bigint id PK
int serviceId FK
datetime checkedAt
int httpStatus
int responseMs
string errorText
}
INCIDENT {
int id PK
int serviceId FK
string kind
datetime openedAt
datetime resolvedAt
string state
}
ALERT {
int id PK
int incidentId FK
int contactId FK
string channel
string status
}
ALERT_RULE {
int id PK
int serviceId FK
int failureThreshold
int latencyThresholdMs
}
CONTACT {
int id PK
string name
string email
}
USER {
int id PK
string username UK
string passwordHash
}
LOAD_TEST_RUN {
int id PK
int serviceId FK
datetime ranAt
int threads
decimal p95Ms
string notes
}flowchart LR
TGT([Target service]) -- HTTP response, latency --> SYS((Uptime Monitoring<br/>and Alerting System))
ADM([Admin]) -- rules, services, acknowledgements --> SYS
SYS -- uptime and incident dashboards --> ADM
SYS -- alert emails --> OWN([Owner inbox])
JM([JMeter harness]) -- load traffic --> TGTflowchart TD
TGT([Target service]) --> P1[1.0 Poll health]
P1 <--> D1[(D1 Check results)]
P1 --> P2[2.0 Evaluate rules]
P2 <--> D2[(D2 Alert rules)]
P2 --> P3[3.0 Manage incidents]
P3 <--> D3[(D3 Incidents)]
P3 --> P4[4.0 Send alerts]
P4 <--> D4[(D4 Alerts and Contacts)]
P4 --> OWN([Owner inbox])
ADM([Admin]) --> P5[5.0 Register services and rules]
P5 <--> D5[(D5 Services)]
P5 <--> D2
ADM --> P6[6.0 View reports and acknowledge]
P6 <--> D1
P6 <--> D3The poller runs inside the monitor's servlet context and starts with ServletContextListener; the dashboard's uptime queries aggregate CHECK_RESULT with indexed service_id, checked_at columns so a 7-day window stays fast — the very index whose effect the JMeter study quantifies.
Module 01
Admin registers services (name, health URL, interval, timeout, expected status) with validation and edit/disable actions. The target bakery service ships pre-registered, and each row stores who changed what, so the configuration of the monitoring layer itself is auditable.
Module 02
A ScheduledExecutorService with a fixed thread pool fires each active service's check at its own interval, measures response time with System.nanoTime, applies the read timeout, and writes status, latency and error text into CHECK_RESULT. Failures to connect are recorded distinctly from HTTP 5xx so the incident reason is precise.
Module 03
A state machine per service: failure count from the last checks, latency versus the configured threshold, incidents opened after 2 consecutive failures or sustained slowness, auto-resolution on the first healthy check, and a flapping guard that requires a stable window before re-opening. Every transition is timestamped.
Module 04
JavaMail sends incident and warning emails to configured contacts through SMTP with TLS. Failed sends enter a retry queue with exponential backoff up to three attempts, and every attempt is logged in ALERT with channel and status, so 'the mail never came' can be answered from evidence.
Module 05
JSP pages with session-secured login show 24-hour and 7-day uptime percentages per service, a Chart.js response-time chart with the p95 line, the open-incident queue with acknowledge and resolve actions, and a printable incident history for provider disputes.
Module 06
A saved JMeter test plan with thread groups ramping to 50 concurrent users against the target service, listeners configured for aggregate statistics, and a documented comparison: p95 and error rate before versus after adding a HikariCP connection pool and an index on the order lookup. Two short example .jtl files show the result format; students overwrite them with their own measured runs.
Slide 1
Uptime Monitoring & Alerting System (UMAS)
Slide 2
The Scenario
Slide 3
Problem & Objectives
Slide 4
Technology Stack
Slide 5
System Architecture
Slide 6
Database Design
Slide 7
Rule Engine & Incident Workflow
Slide 8
Dashboard Demo
Slide 9
Load-Test Study (JMeter)
Slide 10
Testing
Slide 11
Security & Operations Notes
Slide 12
Limitations & Future Scope
Slide 13
Conclusion
Bullets, speaker notes and the .pptx · ₹2,000
Read each answer, close it, and say it in your own words. Your viva will ask. Now you'll know.
Uptime percentage is the share of scheduled checks in a window that were healthy. For each service I count the checks in the last 24 hours or 7 days where the HTTP status matched the expected code within the timeout, divide by total scheduled checks, and multiply by 100. The SQL groups CHECK_RESULT by service and filters on the indexed checked_at column, and I show that query on the report's dashboard section.
The average hides the tail: a service can average 120 ms while 5 percent of users wait over 2 seconds, and those are the complaints an owner actually receives. The p95 is the latency below which 95 percent of requests complete, so it reflects the worst experience most users see. JMeter's aggregate report gives it directly, and I record it for every load-test run.
Timer uses a single thread, so one hung check would delay every other service's probe and the whole monitor would stall together. ScheduledExecutorService runs on a thread pool, survives task exceptions without killing the schedule, and lets me set a fixed delay between successive runs of the same service. It is also the idiomatic concurrency tool taught in modern Java, which made the code easier to unit test.
+13 more questions, with answers
Unlocks with the project · ₹2,000
Unlock for ₹2,000What to change before it goes anywhere near a submission. Skipping it is how the demo fails live.
Unlocks with the project · ₹2,000
Unlock for ₹2,000How to study it, adapt it and walk your examiner through it, step by step.
Unlocks with the project · ₹2,000
Unlock for ₹2,000OnlyProjects. (2026). Uptime Monitoring & Alerting for a Small Java Web Service (Servlets + MySQL + JMeter): BCA Cloud Computing project bundle [Educational resource]. https://onlyprojects.online/projects/bca-cloud-uptime-monitor-alerts-java-web-service
Keep browsing
Same degree, same syllabus slot, different idea. Pick the one your guide will actually approve.
Cloud Computing
One small app, two containers, a tested restore drill — operations discipline for a real tuition business
Cloud Computing
A two-branch pharmacy's billing app, containerised, monitored, backed up and restorable on a free-tier cloud VM — with the running cost tracked to the rupee
Web Development
Room allocation, complaints and mess billing without the register
AI & Machine Learning
Predict tomorrow's air quality band for every Bengaluru monitoring station, before the morning commute
AI & Machine Learning
Forecast daily OPD crowds department by department, and plan the doctor roster before the Monday rush arrives
AI & Machine Learning
Turn a Soil Health Card into an explained, district-specific crop recommendation a small farmer can act on