Responsive UI with Background Synchronous Logic

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing user interface and application logic tools fail to maintain a responsive user interface while running synchronous application logic in the background, posing difficulties for developers accustomed to synchronous patterns and architectures.

Innovation Solution

Implementing a system where the user interface operates on a user interface thread while synchronous application logic runs on a background thread, allowing the user interface to remain responsive by forwarding user input requests to the background thread without blocking the user interface thread, and synchronously waiting for manipulation when necessary.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If synchronous application logic is run on the user interface thread, then the application logic can operate correctly with tasks performed in order, but the user interface becomes blocked and unresponsive

Engineering Contradiction:
Improveapplication logic correctnessVSAvoiduser interface responsiveness
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

The system divides the application into two separate threads: a user interface thread that handles user interactions and remains responsive, and a background thread that executes synchronous application logic. This segmentation allows each thread to perform its designated function without blocking the other, resolving the contradiction between maintaining UI responsiveness and ensuring correct sequential execution of application logic.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces a thread dispatcher as an intermediary component that manages work item distribution between the user interface thread and background thread. The dispatcher receives work items, determines whether they should be executed on the UI thread or background thread, and routes them accordingly. This mediator enables seamless coordination between the two threads, allowing synchronous logic to run in the background while the UI remains responsive.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Ease of operation

If asynchronous patterns are implemented to keep the user interface responsive, then the user interface can remain unblocked, but the architecture becomes difficult to understand and implement

Engineering Contradiction:
Improveuser interface responsivenessVSAvoidarchitecture complexity
Core Design Contradiction:
Ease of operationVSDevice complexity

Solution Approach 1:

Instead of making the application logic asynchronous to achieve UI responsiveness (the conventional approach), the patent inverts the approach by keeping the application logic synchronous and running it on a separate background thread. The UI thread remains purely responsive, while the background thread handles all synchronous logic operations. This inversion simplifies the architecture by allowing developers to use familiar synchronous patterns while still achieving responsive UI behavior.

Inventive Principle:
Principle #13The other way round (Inversion)

Solution Approach 2:

The thread dispatcher serves as an intermediary that abstracts the complexity of multi-threaded asynchronous operations. It provides a simple interface for submitting work items to the appropriate thread, handling thread management, synchronization, and coordination internally. This mediator shields developers from the complexity of asynchronous programming while maintaining UI responsiveness and correct logic execution.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Ease of operation

If synchronous application logic runs on a background thread, then the user interface remains responsive, but thread coordination and synchronization become necessary

Engineering Contradiction:
Improveuser interface responsivenessVSAvoidthread management complexity
Core Design Contradiction:
Ease of operationVSDevice complexity

Solution Approach 1:

The thread dispatcher acts as an intermediary that manages all thread coordination and synchronization operations. It handles work item queuing, thread selection, context switching, and result propagation between the UI thread and background thread. By centralizing these complex thread management tasks in the dispatcher, the system maintains UI responsiveness while abstracting away the complexity of multi-threaded synchronization from the application logic.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system implements feedback mechanisms where the background thread communicates completion status and results back to the UI thread through the thread dispatcher. This feedback loop ensures proper synchronization without requiring complex inter-thread communication protocols in the application logic. The dispatcher manages the feedback flow, ensuring that UI updates occur only after background operations complete successfully.

Inventive Principle:
Principle #23Feedback

Data Source

PatentEP2504758B1Responsive user interface with background application logic
Publication Date: 2020.01.15 MICROSOFT TECHNOLOGY LICENSING LLC
  • EP2504758B1 patent drawingFigure 1
  • EP2504758B1 patent drawingFigure 2
  • EP2504758B1 patent drawingFigure 3

AI summary

A user interface can be maintained in a responsive state on a user interface thread while synchronous application logic is running on a background thread. The application logic can access an object on the background thread, and the user interface can access the same object on the user interface thread. Additionally, a request for work to be done on an object can be received. If the request is to be dispatched to a background thread, then the work can be dispatched to the background thread without blocking the user interface thread. However, if the request is to be dispatched to the user interface thread, then the work can be dispatched to the user interface thread, and the background thread can be blocked.