Architecture Overview
2. Multi-Database Architecture
The application uses four separate databases, each serving a specific purpose:
| Database | Engine | Purpose |
|---|---|---|
Main DB |
MySQL / Oracle |
Core application data: CPE information, product class groups, monitoring parameters, user management |
UI DB |
MySQL / Oracle |
QoE UI-specific data: KPI definitions, views, groups, group templates, threshold configurations |
Quartz DB |
MySQL / Oracle |
Quartz scheduler job persistence and clustering support |
ClickHouse |
ClickHouse |
Time-series KPI data storage, diagnostic results, alarm history, user activity logs |
Spring profiles (mysql, oracle) control which database dialect and query variants are used. Database queries are externalized in sql.properties with MySQL and Oracle variants.
3. Distributed Caching
The application uses Hazelcast 5.5.0 as a distributed cache client, connecting to an external Hazelcast cluster.
Cached data includes:
-
CPE Info — Device metadata (serial, manufacturer, model, MAC)
-
KPI Data — KPI definitions and threshold configurations
-
Parameters — Monitored parameter names and IDs
-
Domain Info — ISP domain data
The cache layer reduces database load and enables horizontal scaling across multiple application instances.
4. Package Structure
The main package is com.friendly.tr069.ftacs.qoe.monitoring.web.
| Package | Purpose |
|---|---|
|
MVC controllers (CPE, Group, Dashboard, KPI, Threshold, Users, Settings, Reports, Map, Customization) |
|
REST API endpoints ( |
|
Business logic services |
|
JPA entities and row mappers (supports MySQL / Oracle) |
|
ClickHouse entities for time-series KPI data |
|
Hazelcast distributed caching layer |
|
Alarm processing and threshold evaluation |
|
Quartz scheduled tasks (data sync, cleanup, template rebuild) |
|
Email and SNMP notification senders |
|
JMS queue consumers and message senders |
|
Spring configuration and Hazelcast client config |
|
Helper utilities (SQL, cache, scheduler, generators) |
5. Key Patterns
-
Custom ORM — Uses row mappers (
RowMapper*classes) instead of Spring Data repositories for fine-grained query control -
Externalized SQL — Queries stored in
sql.propertieswith MySQL and Oracle variants -
Event-Driven Processing — JMS message queue integration for asynchronous data processing
-
Async Dashboard —
DashboardAsyncProcessorfor non-blocking dashboard data loading