Backend Development 12 min read

Design and Implementation of a High‑Performance Configurable Advertising Platform for Commercial Real Estate

This article presents the design, architecture, and implementation details of a visual, real‑time, and highly available configuration platform for commercial‑real‑estate advertising, covering requirements analysis, data modeling, CAP‑theorem considerations, consistency mechanisms, client design, long‑connection strategy, performance testing, and future outlook.

58 Tech
58 Tech
58 Tech
Design and Implementation of a High‑Performance Configurable Advertising Platform for Commercial Real Estate

Background : To meet the promotional needs of co‑working and office‑building brands and increase commercial‑real‑estate revenue, a paid advertising product was created, requiring a visual, dynamic, and real‑time configuration platform.

Key Requirements :

Visualization for operators to precisely configure interfaces.

Diversity to support navigation pages, filter items, and ad slots across cities and business lines.

Multi‑business‑line support (co‑working, office, factories, parks) with isolation.

Real‑time updates for ad slots, activity switches, and blacklist.

Strong consistency across PC, APP, and mini‑programs.

Version rollback capability.

Why Not Use Properties Files : Traditional properties files lack visual interfaces, support only simple data structures, require code recompilation for changes, have delayed effect due to release cycles, and cannot handle city‑specific configurations.

Component Characteristics : Simple, easy‑to‑use, high‑performance, and highly scalable by leveraging cloud platforms.

Architecture Design : Consists of three parts – a visual configuration platform, a configuration center, and client programs. The configuration center uses an HTTP asynchronous request model with long‑polling to push updates instantly.

Data Model : Introduces a clientId‑path‑object structure where clientId identifies the client, path represents module hierarchy, and object stores flexible configuration objects.

CAP‑Theorem Application :

Availability : High throughput via asynchronous HTTP and DeferredResult for second‑level updates.

Reliability : Cloud‑based deployment enables easy scaling and fault‑tolerance.

Consistency : Incremental sync using an internal message queue with strong consistency to full data; full sync with batch writes and pagination for recovery after node failures.

Disaster Recovery & Backup : Persistence to a database, periodic sync to file storage, local cache, and mirror files; system becomes unavailable only if database, config server cluster, local cache, and mirror are all down.

Long Connection Strategy : Utilizes Zookeeper’s atomic broadcast (ZAB) protocol for ordered, fault‑tolerant watches, enabling cross‑language HTTP long connections.

Client Design :

Multiple listening strategies (node‑level and subtree‑level) with differentiated event types (add/delete vs. modify).

Memory design with LRU thread‑safe cache, null‑value handling, lazy loading, and data pre‑heating to avoid thundering‑herd on startup.

Reconnection daemon thread monitors connection health and resynchronizes after failures.

Simple API for fetching configuration items and registering listeners.

Performance Test : AB testing over HTTP shows an average time per request of 1.336 ms, indicating excellent performance.

Demo : Screenshots illustrate multi‑city, multi‑business, multi‑endpoint configuration, real‑time updates, and the visual UI generated from the backend platform.

Conclusion & Outlook : The platform satisfies all product requirements, provides a visual, dynamic, high‑performance solution, reduces operational costs, supports rapid iteration for commercial‑real‑estate lines, and offers a reference architecture for future dynamic configuration projects.

distributed systemsbackend architectureHigh AvailabilityConfiguration Managementreal-time updates
58 Tech
Written by

58 Tech

Official tech channel of 58, a platform for tech innovation, sharing, and communication.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.