Java Timeout Helper Thread for Blocking Call Control

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The JAVA programming language, prior to JDK 1.4, lacks the ability to interrupt blocking calls, leading to threads waiting indefinitely for HTTP or EJB services, resulting in uncontrolled TCP timeouts that fail to meet service level agreements, causing potential losses and system crashes due to excessive open connections.

Innovation Solution

A timeout helper utility is developed to manage timeouts within the Java environment, allowing client applications to set custom timeout intervals for method calls, creating helper threads to monitor and manage timeouts for HTTP and EJB operations, ensuring timely resource release and compliance with service level agreements.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If TCP timeout is used to manage blocking calls, then connection management is automated, but timeout cannot be controlled by application and service level agreements cannot be met

Engineering Contradiction:
Improvetimeout controlVSAvoidservice level agreement compliance
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

The patent introduces a timeout helper utility as an intermediary layer between the application code and the TCP connection management. This helper wraps blocking calls and provides application-controlled timeout functionality, mediating between the uncontrolled TCP timeout mechanism and the application's service level agreement requirements.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The timeout helper is configured with predetermined timeout values before executing blocking calls. This preliminary configuration of timeout parameters allows the application to enforce service level agreements in advance, rather than relying on default TCP timeout settings that cannot be controlled.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If TCP timeout is set to high value to ensure connection stability, then connection reliability is improved, but processing time increases and productivity decreases

Engineering Contradiction:
Improveconnection stabilityVSAvoidprocessing speed
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The timeout helper implements dynamic timeout management by allowing different timeout values for different calls and operations. Instead of using a single high TCP timeout value for all connections, the system can adaptively set appropriate timeout values based on specific service level agreement requirements, optimizing both reliability and productivity.

Inventive Principle:
Principle #15Dynamics

3Device complexity

If no timeout control is implemented, then system complexity is reduced, but resource leakage and system crashes occur due to excessive open connections

Engineering Contradiction:
Improvetimeout management complexityVSAvoidsystem stability
Core Design Contradiction:
Device complexityVSReliability

Solution Approach 1:

The timeout helper provides self-service timeout management by automatically monitoring blocking calls and enforcing timeout conditions without requiring complex external resource management infrastructure. The helper wraps calls and autonomously manages timeout logic, reducing the need for additional complexity while ensuring system stability.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS7774779B2Generating a timeout in a computer software application
Publication Date: 2010.08.10 MARLOW TECHNOLOGIES LLC
  • US7774779B2 patent drawing
  • US7774779B2 patent drawing
  • US7774779B2 patent drawing

AI summary

A timeout helper main thread is created for an outbound call associated with a container. The main thread creates a timeout helper worker thread. A local timer is started to detect a first timeout condition based on a first timeout interval. The worker thread initiates a client Object Request Broker (ORB) to detect a second timeout condition based on a second timeout interval. If the outbound call completes within the first timeout interval, a result object is returned from the main thread. Otherwise, the main thread throws a timeout exception. If the outbound call has not completed within the second timeout interval, the client ORB throws an exception to the worker thread and one or more resources associated with the outbound call are reclaimed. As an alternative to the client ORB, an HTTP client can detect the second timeout condition.