In-Memory Database Inventory Snapshot for On-Disk Lock Reduction
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The frequent querying of an on-disk database for inventory counts during electronic device reservations burdens the database, leading to lock issues and deadlocks, which slows down reservation processes and impacts other systems using the same database.
Innovation Solution
An in-memory database is used to store a count of available electronic devices, reducing the need for frequent queries to the on-disk database and allowing for quicker response times by taking a snapshot of inventory and conducting priority status commitments without locking the on-disk database.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If frequent queries are made to the on-disk database for inventory counts during reservations, then accurate inventory information is obtained, but the database becomes burdened leading to lock issues and deadlocks
Solution Approach 1:
The patent applies preliminary action by pre-calculating and storing priority status commitments in the reservation table before actual reservations are made. This allows the system to determine inventory availability and establish priority rankings in advance, so that when actual reservations occur, the on-disk database does not need to be frequently queried or locked, thus preventing deadlocks while maintaining accurate inventory tracking
Solution Approach 2:
The patent introduces an intermediary mechanism by using a reservation table that stores priority status commitments as a buffer between inventory queries and actual database operations. This intermediary layer allows the system to handle reservation requests without directly burdening the on-disk database, reducing lock issues while preserving inventory count accuracy
2Stability of the object's composition
If the on-disk database is used for all reservation operations, then data consistency is maintained, but query times increase and deadlocks occur
Solution Approach 1:
The patent applies segmentation by dividing the reservation system into two parts: a reservation table that handles priority status commitments and inventory pre-calculation, and the on-disk database that maintains master data consistency. This segmentation allows frequent operations to occur in the reservation table without blocking the database, reducing processing time while maintaining data consistency through periodic synchronization
3Measurement precision
If inventory counts are determined from the reservation table frequently, then accurate availability is provided, but the burden on the on-disk database increases
Solution Approach 1:
The system performs preliminary calculation of inventory counts by pre-storing priority status commitments in the reservation table. This allows the available inventory count to be determined by simple lookups in the reservation table rather than frequent queries to the on-disk database, maintaining measurement precision while preserving database throughput
Data Source
AI summary
An electronic device reservation system that reduces the burden on an on-disk database is disclosed that comprises an on-disk database including a reservation table and an in-memory database storing a count of available electronic devices for each type of electronic device. The system also comprises a server comprising one or more application programming interfaces configured to receive a reservation request for a type of electronic device, access the in-memory database to determine whether there is enough inventory, modify the reservation table in the on-disk database for the reservation request in response to determining that there is enough inventory, decrement the count of available electronic devices for the type of electronic device in the in-memory database in response to the modification, and send a notification to a subscriber indicating that they have reserved a place in line electronically for a pre-order of the requested type of electronic device.


