Auto-Expiring Multi-Tenant Event Counters With Sliding Windows

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current CRM systems face inefficiencies in tracking event counters for workflow automations across multiple tenants and entities, leading to increased computational overhead, data storage requirements, and time-consuming aggregate queries, especially when accounting for different time zones.

Innovation Solution

Implement a multi-tenant multi-entity sliding window event counter using a key value store with dynamic keys and auto-expiry capabilities, where each tenant's events are tracked with a hash structure that includes entity IDs and execution counts, automatically cleaning up after a predefined period.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a time series table is used to track event counters, then event tracking capability is improved, but data storage requirements and computational overhead increase

Engineering Contradiction:
Improveevent tracking capabilityVSAvoiddata storage requirements
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The patent extracts only the essential counting functionality from a full time series database, using a key-value store to store only aggregated event counts rather than individual event records. This eliminates the need to store unnecessary detailed event data while maintaining the ability to track and aggregate event counters efficiently.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent uses ephemeral key-value stores with automatic expiration settings to store event counter data. These temporary storage structures automatically delete old data after a predefined period, eliminating the need for long-term data retention and manual cleanup processes while maintaining accurate sliding window counters.

Inventive Principle:
Principle #27Cheap short-living objects (Disposable)

2Reliability

If a time series table is used to track event counters, then event tracking capability is improved, but query performance deteriorates

Engineering Contradiction:
Improveevent tracking capabilityVSAvoidaggregate query performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent performs preliminary aggregation of event counts at the time of each event occurrence, maintaining running totals in the key-value store. When aggregate queries are executed, the system simply retrieves pre-computed counts rather than querying and aggregating individual event records, dramatically improving query performance.

Inventive Principle:
Principle #10Preliminary action

3Quantity of substance

If a key value store is used to track event counters, then storage efficiency is improved, but time zone handling capability deteriorates

Engineering Contradiction:
Improvestorage efficiencyVSAvoidtime zone handling capability
Core Design Contradiction:
Quantity of substanceVSAdaptability or versatility

Solution Approach 1:

The patent makes the key-value store adaptive to different time zones by dynamically constructing keys that include tenant-specific time zone information. Each tenant's event counters are stored with keys that encode their local time zone context, allowing the same key-value store infrastructure to efficiently handle multiple time zones without requiring programmatic key construction tweaks.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS12418411B2Auto expiring multi-tenant multi-entity sliding window event counter
Publication Date: 2025.09.16 FRESHWORKS INC
  • US12418411B2 patent drawing
  • US12418411B2 patent drawing
  • US12418411B2 patent drawing

AI summary

A computer-implemented method performing an auto expiring multi-tenant multi-entity sliding window event counter includes defining a dynamic key for a key value pair uniquely created for a tenant per day in any key value store. The method also includes storing a hash associated with the dynamic key. The hash includes an entity identification (ID) as a key and an event count as a value, and upon a valid event for an entity of the tenant, identifying a tenant level key for a day and incrementing the value of the entity ID. The method further includes retrieving a sum of counts over the predefined period of time for each entity identified with the entity ID for the tenant, and performing automated key deletion/cleanup after expiration of the predefined period of time set as expiry for the key.