Concurrent Exception Handling via Aggregate Aggregation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Concurrent software programs face challenges in handling exceptions due to their parallel execution nature, as existing exception handling mechanisms are designed for sequential execution, leading to difficulties in communicating and managing exceptions across multiple tasks.
Innovation Solution
A concurrent exception handling system that aggregates exceptions from multiple tasks into a single aggregate exception object, allowing for deferred handling and providing mechanisms for exception handling during result consumption, including the use of shared flags and exception handler descriptors to manage and process exceptions effectively.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If sequential exception handling mechanisms are used in concurrent programs, then exception handling is simple and straightforward, but exception communication and management across multiple tasks becomes difficult and unreliable
Solution Approach 1:
The patent segments exception handling into distinct phases: exception occurrence in worker tasks, aggregation in coordination tasks, and processing in the main program. This segmentation allows each component to handle exceptions appropriately for its context, improving reliability while managing complexity through clear separation of concerns.
Solution Approach 2:
The patent introduces an intermediary aggregation structure that acts as a mediator between concurrent worker tasks and the main program. This intermediary collects exceptions from multiple tasks and presents them in a unified manner, resolving the contradiction by providing reliable exception communication without requiring complex direct handling in each task.
2Reliability
If all exceptions are aggregated and processed after concurrent tasks complete, then comprehensive exception handling is achieved, but exception handling delays program execution
Solution Approach 1:
The patent performs preliminary aggregation of exceptions during task execution without delaying the main program flow. By collecting exceptions in background structures while tasks run, the system prepares for comprehensive handling without causing execution delays, resolving the contradiction between completeness and timing.
Solution Approach 2:
The patent implements periodic exception processing where exceptions are aggregated continuously during task execution and then processed in periodic batches after task completion. This approach ensures comprehensive handling while minimizing impact on execution timing by separating aggregation (continuous) from processing (periodic).
Data Source
AI summary
Various technologies and techniques are disclosed for providing concurrent exception handling. When one or more exceptions are received from concurrent workers, one or more exception handler functions are supplied. For each respective exception in the exception results, determine if the respective exception is one of a kind of exceptions handled by the one or more exception handler functions. If the respective exception is one of a kind handled by the exception handler functions, then run a particular handler of the exception handler functions and mark the respective exception as handled. Any unhandled exceptions are then processed appropriately. In one implementation, a collection of input data is processed to produce a collection of output results, with the exceptions being interleaved with other output results. In another implementation, a particular exception is selected that represents the multiple exceptions. The selected one particular exception is then thrown.


