Real-time Active Client Counting Without Database Locks

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current website analytics systems face challenges in determining the number of actively connected client computers in real-time, leading to potential server overload and delayed resource allocation, as existing methods require significant computational resources and database locking, which can slow down performance.

Innovation Solution

A server computer system estimates the number of active clients using heartbeat messages with delta values, summing these values over a time window without client identifiers, and adjusts the heartbeat frequency based on server resources and expected error, allowing for real-time estimation and resource allocation without database locks.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If a database table is maintained to track active client identifiers with timestamps, then the number of active clients can be determined, but the system requires significant memory resources and computational power to maintain and query the database

Engineering Contradiction:
Improveaccuracy of active client countVSAvoidmemory resources
Core Design Contradiction:
Measurement precisionVSQuantity of substance

Solution Approach 1:

The patent extracts only the essential information needed for counting (time window boundaries and delta values) from the complete client tracking data, eliminating the need to store and process full client identifiers and timestamps in a database. This extraction approach reduces memory requirements while maintaining counting accuracy.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

Instead of tracking individual client connections forward in time and counting them at a query moment, the patent inverts the approach by having clients send backward-looking delta values indicating how long they have been active. The server then calculates current active count by comparing these delta values against the current time window, eliminating the need for persistent storage of client state.

Inventive Principle:
Principle #13The other way round (Inversion)

2Measurement precision

If database locking mechanisms are used to ensure data consistency during active client counting, then measurement accuracy is maintained, but system performance and response time deteriorate

Engineering Contradiction:
Improveaccuracy of active client countVSAvoidsystem response time
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

Each client computer autonomously calculates and sends its own delta value (time since last heartbeat or connection) to the server. This self-service approach eliminates the need for server-side database transactions and locking mechanisms, as the server only needs to receive and compare these delta values against the current time window to determine active client count.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent introduces delta values as an intermediary representation of client activity state. Instead of directly querying and locking database records of active clients, the system uses these intermediary delta values sent by clients as a mediator to calculate the current active count, thereby avoiding database locking overhead.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Device complexity

If offline processing is used to generate statistics from telemetry data, then computational load on the real-time system is reduced, but the availability of real-time statistics for resource allocation is delayed

Engineering Contradiction:
Improvecomputational complexityVSAvoidtime delay in statistic availability
Core Design Contradiction:
Device complexityVSLoss of time

Solution Approach 1:

Client computers preliminarily calculate their own delta values (indicating their active duration) before sending them to the server. This preliminary computation shifts the computational burden from the server to the clients, allowing the server to simply aggregate these pre-computed values in real-time without requiring complex offline processing.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system enables each client to independently compute and report its activity metrics (delta values) to the server. This self-service mechanism provides the server with ready-to-use real-time data for calculating active client counts, eliminating the need for the server to perform computationally intensive offline analysis of raw telemetry data.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS9893973B2Real-time, low memory estimation of unique client computers communicating with a server computer
Publication Date: 2018.02.13 BRIGHTCOVE INC
  • US9893973B2 patent drawing
  • US9893973B2 patent drawing
  • US9893973B2 patent drawing

AI summary

Computer systems and methods for estimating the number of client computers actively coupled to a server computer system in real-time are discussed herein. Specifically, systems and methods are discussed for a server computer system receiving heartbeat messages from a plurality of client computers and generating an estimate of the number of client computers actively coupled to the server computer system in real-time without locks, such as a database table lock. A heartbeat message from a client computer need not include a client or user identifier. In an embodiment, the memory footprint/overhead is O(l), and may be a single whole number greater than zero, such as a 64-bit unsigned integer. Systems and methods are also discussed herein to calculate and reduce the expected error of the estimated number of active clients.