Architecture Overview

1. Component Diagram

component-diagram

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

controllers/

MVC controllers (CPE, Group, Dashboard, KPI, Threshold, Users, Settings, Reports, Map, Customization)

rest/

REST API endpoints (QoeRestController)

service/

Business logic services

orm/

JPA entities and row mappers (supports MySQL / Oracle)

orm/clickhouse/domain/

ClickHouse entities for time-series KPI data

cache/

Hazelcast distributed caching layer

alarms/

Alarm processing and threshold evaluation

task/

Quartz scheduled tasks (data sync, cleanup, template rebuild)

notification/

Email and SNMP notification senders

jms/

JMS queue consumers and message senders

config/

Spring configuration and Hazelcast client config

util/

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.properties with MySQL and Oracle variants

  • Event-Driven Processing — JMS message queue integration for asynchronous data processing

  • Async Dashboard — DashboardAsyncProcessor for non-blocking dashboard data loading

← Back | Main Page