Web API Deadlock Prevention via Standardized Service Ordering

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In Cloud Native application development, the prevalence of Web APIs using light RESTful web services leads to deadlocks when multiple asynchronous calls are made, particularly due to differing program orders accessing shared resources, which reduces success rates and increases resource wastage and costs.

Innovation Solution

A computer-implemented method that receives a list of service definitions from a client, sorts them into a standardized order using predetermined rules, and sends the sorted list for execution, thereby reducing the likelihood of deadlocks by ensuring unified exclusion processing across all programs.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If multiple programs call web services in different orders without coordination, then each program can execute independently, but deadlocks occur when programs wait for each other's locks

Engineering Contradiction:
ImproveIndependent program executionVSAvoidDeadlock prevention
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

The patent introduces a coordinator service as an intermediary that receives service definition lists from multiple programs, sorts them using a standardized rule (e.g., alphabetical order), and returns the sorted lists to each program. This mediator ensures all programs execute services in the same order without requiring programs to directly coordinate or lock mechanisms, thereby preventing deadlocks while maintaining independent execution.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If pessimistic locking is used to ensure ACID properties, then transaction atomicity is improved, but service calls may wait for each other's locks causing deadlocks

Engineering Contradiction:
ImproveTransaction atomicityVSAvoidService call waiting time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent applies preliminary action by determining the standardized execution order of web services before any actual service calls are made. The coordinator sorts all service definitions in advance using a predetermined rule and provides the sorted sequence to each program. This preliminary ordering eliminates the need for programs to wait for locks during execution, as they all follow the same pre-determined sequence, thus maintaining transaction atomicity without incurring waiting time.

Inventive Principle:
Principle #10Preliminary action

3Adaptability or versatility

If service definitions are processed in arbitrary orders, then program flexibility is maintained, but success rates decrease due to deadlocks and conflicts

Engineering Contradiction:
ImproveProgram flexibilityVSAvoidService call success rate
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The patent changes the parameter of service definition order from arbitrary to standardized. By applying a predetermined sorting rule (such as alphabetical order by service name or endpoint), the system transforms the execution sequence into a consistent, predictable pattern. This parameter change eliminates deadlocks and conflicts while maintaining program flexibility, as programs can still call services according to their business logic, just in a standardized order that prevents conflicts.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS20230259411A1Multiple web API call deadlock prevention
Publication Date: 2023.08.17 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US20230259411A1 patent drawing
  • US20230259411A1 patent drawing
  • US20230259411A1 patent drawing

AI summary

An approach for preventing deadlocks when calling a plurality of web services in a single transaction. The approach receives a list of service definitions from a client to call as a single unit of work (UOW). The approach sorts, based on applying a predetermined ordering rule, the list into a standardized order list. The approach sends the standardized order list to the client for execution.