Strongly-Typed Event Dispatch Across Inheritance Hierarchies
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current event handling in large-scale storage systems relies on inefficient polling, which delays event arrival and lacks solutions that maintain strong-typed events across client and server frameworks.
Innovation Solution
A method and system for implementing strongly-typed events using reflection to traverse the inheritance hierarchy and invoke observer methods, bridging client and server frameworks by translating event syntax.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If polling is used for event handling in distributed storage systems, then system compatibility and simplicity are maintained, but event arrival is delayed and efficiency is reduced
Solution Approach 1:
The patent introduces an event dispatcher as an intermediary component that receives events from the storage system and automatically distributes them to registered observer methods. This mediator eliminates the need for polling by establishing a direct event push mechanism, where the dispatcher forwards events to all interested parties simultaneously, resolving the contradiction between efficient event handling and timely event arrival.
2Reliability
If strong-typed events are implemented across client and server frameworks, then type safety and compile-time error detection are improved, but framework integration complexity increases
Solution Approach 1:
The patent creates a universal event handling framework that works across both client and server frameworks through a common event dispatcher interface. The system uses standardized event objects with strong typing that can be registered and dispatched uniformly across different framework layers. This universal approach maintains type safety while reducing integration complexity by providing a single unified mechanism rather than separate handling for each framework.
Solution Approach 2:
The event dispatcher acts as a mediator layer between the strongly-typed event sources and the observer methods across different frameworks. It handles the complexity of framework-specific integrations internally while presenting a unified interface to developers, allowing strong-typed events to be implemented reliably without exposing framework integration complexity to users.
3Adaptability or versatility
If observer methods are invoked through reflection across inheritance hierarchies, then event routing flexibility and completeness are improved, but execution overhead increases
Solution Approach 1:
The patent implements event registration mechanisms where observer methods are pre-registered and bound to specific event types and inheritance hierarchies before runtime event processing. The system traverses the inheritance hierarchy once during registration to identify all applicable observer methods, storing this information for efficient runtime dispatch. This preliminary action reduces runtime overhead while maintaining the flexibility to route events to all appropriate destinations based on the inheritance hierarchy.
Data Source
AI summary
A method for use in a computing device, the method comprising: obtaining an event object; identifying a class that is associated with the event object; identifying an inheritance hierarchy that is associated with the class, the inheritance hierarchy including one or more superclasses that are inherited, directly or indirectly, by the class associated with the event object; for the class associated with the event object and each of the superclasses, identifying a respective set of observer methods, each of the observer methods being an observer method that accepts the event object as an argument; invoking each of the observer methods in any of the sets by using of the event object as an input parameter, each of the observer methods being invoked by using reflection.


