Gateway API Settings Management via Dual Rule Tables

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In a multi-thread environment, gateway apparatuses face performance degradation due to the need for locks to manage API settings, leading to race conditions and inefficiencies in processing client API requests.

Innovation Solution

The implementation of a gateway apparatus using two rule tables and a reference flag allows sub-threads to access the latest API settings without locks, with the main thread updating the rule tables and setting the reference flag to indicate which table contains the current settings, enabling efficient API request processing.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a lock is used to manage API settings in a multi-thread environment, then thread safety is improved, but system performance deteriorates due to processing delays

Engineering Contradiction:
Improvethread safetyVSAvoidsystem performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The single rule table is segmented into two separate rule tables (first rule table and second rule table). This segmentation allows different threads to access different tables simultaneously without conflict, eliminating the need for locks while maintaining thread safety. The reference flag indicates which table currently holds valid settings, enabling safe concurrent access without performance degradation.

Inventive Principle:
Principle #1Segmentation

2Stability of the object's composition

If a lock is used to prevent race conditions, then data consistency is improved, but processing speed deteriorates

Engineering Contradiction:
Improvedata consistencyVSAvoidprocessing speed
Core Design Contradiction:
Stability of the object's compositionVSSpeed

Solution Approach 1:

The system performs preliminary actions by maintaining two rule tables where one table is always available for reading while the other is being updated. This preliminary preparation of alternate tables allows immediate switching without locks, ensuring data consistency is maintained while processing speed is preserved through pre-configured fallback options.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

A copy of the rule table is created and maintained as an alternate (first table and second table). When one table is being updated, the other serves as a ready-made copy for immediate reading. This copying mechanism ensures data consistency without requiring locks during processing, as readers always access the stable copy while writers update the alternate.

Inventive Principle:
Principle #26Copying

3Manufacturing precision

If locks are used for setting updates, then setting accuracy is improved, but API request processing time increases

Engineering Contradiction:
Improvesetting accuracyVSAvoidprocessing time
Core Design Contradiction:
Manufacturing precisionVSLoss of time

Solution Approach 1:

The system dynamically switches between two rule tables using a reference flag. Instead of using static locks, the system dynamically alternates which table is for reading and which is for writing. This dynamic approach ensures setting accuracy through the reference flag mechanism while minimizing processing time loss, as threads can immediately access the current valid settings without waiting for lock acquisition.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS20240202049A1Gateway apparatus and method for dynamically applying API settings
Publication Date: 2024.06.20 WEBARE SOFT INC
  • US20240202049A1 patent drawing
  • US20240202049A1 patent drawing
  • US20240202049A1 patent drawing

AI summary

A gateway apparatus and a method for dynamically applying API settings are disclosed. The gateway apparatus includes a sub-processing unit processing an API (application programming interface) request of a client terminal based on API settings through a plurality of sub-threads, a setting unit comprising a first rule table and a second rule table to store a set value for processing the API request, and a reference flag, and a main processing unit updating new API settings in a rule table other than the rule table corresponding to a reference value of the reference flag through a main thread when receiving the new API settings, and setting the reference value of the reference flag to a reference value corresponding to the updated rule table when the update is completed.