Activity Data Queue and KV Storage for Microservice Consistency
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In a microservice structure, user activity data management is scattered across different microservice systems, leading to inconsistent and dispersed data management, making it difficult to synchronize operations and maintain data integrity and privacy.
Innovation Solution
A method and apparatus that utilizes a key-value database to manage activity data by storing it in a first preset database associated with business functions, and managing data based on duration and user operations, ensuring consistent data management across microservices.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If user activity data is managed separately in each microservice system, then each microservice can independently manage its own data, but the data management becomes scattered and inconsistent across different microservice systems
Solution Approach 1:
The patent merges data management operations across multiple microservice systems by implementing a unified key-value database that stores user activity data centrally. When a user performs an operation in any microservice system, the operation is published to a message queue and consumed by the unified database, ensuring consistent data management across all microservices while maintaining their operational independence.
Solution Approach 2:
The patent introduces a message queue as an intermediary between microservice systems and the unified key-value database. The message queue receives operation publications from various microservice systems and facilitates their consumption by the unified database, enabling consistent data management without requiring direct integration between microservice systems.
2Stability of the object's composition
If a unified key-value database is used to store user activity data across all microservice systems, then data management consistency is improved, but the storage performance requirements and system complexity increase
Solution Approach 1:
The patent segments the system architecture into distinct components: microservice systems, a message queue, and a unified key-value database. This segmentation allows each component to perform its specific function independently, reducing overall system complexity while achieving data management consistency. The message queue handles operation routing, while the key-value database handles unified storage.
Solution Approach 2:
The patent implements a universal key-value database that serves all microservice systems with a single unified interface. This universal database handles storage operations for user activity data from multiple different microservice systems, reducing the need for separate storage systems and simplifying the overall architecture while maintaining data consistency.
3Ease of operation
If all user activity data is stored in a single unified database, then data access and management become centralized, but storage costs and data privacy risks increase
Solution Approach 1:
The patent applies local quality by implementing data classification and selective storage in the unified key-value database. Not all user activity data is stored with the same priority or retention period - the system differentiates between types of data and applies appropriate storage policies to each, optimizing storage cost while maintaining centralized access capability.
Solution Approach 2:
The patent implements data lifecycle management with automatic expiration and deletion of user activity data based on retention policies. The unified key-value database automatically discards old or unnecessary data while maintaining access to active data, reducing storage costs while preserving centralized data access for the operational period.
Data Source
AI summary
The disclosure discloses a method, apparatus, device, medium and product for managing activity data within an application. The method includes: obtaining a queue message in a preset activity data reporting event message queue, and storing activity data corresponding to the queue message into a first preset database of at least one data storage space having a business association with the activity data; and managing the activity data according to duration of the activity data stored in the first preset database and/or a management operation of a user for the activity data; where the first preset database is a key-value database that meets a first preset storage performance standard.


