Shared Memory Notification Scheduler for Observer State Changes
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing observer design patterns in computing systems face inefficiencies and challenges in notifying multiple observers of state changes, particularly due to the need to traverse linked lists and difficulties in multi-process implementations.
Innovation Solution
A system where a scheduler detects state changes in a shared memory space and provides notifications to observers through buffer identifiers, allowing for efficient and asynchronous notification without requiring subjects to allocate resources for notification, with features like update windows and maximum limits for deterministic resource allocation.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If a linked list is used to associate observers with a subject, then observers can be registered and notified of state changes, but the processing time to traverse the list grows as the number of observers increases
Solution Approach 1:
The patent segments the observer notification system by creating separate notification groups for different subjects, with each group managed independently. This segmentation allows the system to avoid traversing a single large linked list and instead work with smaller, organized groups, reducing the time complexity of notification operations.
Solution Approach 2:
The patent implements preliminary action by pre-allocating memory buffers and creating notification groups before observers need to be notified. The system pre-establishes the structure for holding observer references and notification data, so that when state changes occur, the system can immediately notify observers without needing to dynamically allocate or traverse complex data structures.
2Adaptability or versatility
If a linked list is used to associate observers with a subject, then observers can be registered and notified of state changes, but difficulties arise in allowing multi-process implementation wherein observers can be notified about state changes of subjects included in different processes
Solution Approach 1:
The patent introduces an intermediary mechanism in the form of a shared memory space that acts as a mediator between subjects in different processes and their observers. The notification groups and buffers are placed in shared memory, allowing processes to communicate state changes without direct process-to-process interaction. This intermediary shared memory structure simplifies multi-process implementation by providing a standardized interface for cross-process observation.
3Reliability
If the subject traverses the linked list to notify observers, then all registered observers receive notifications, but the subject suffers a penalty for publishing data due to processing overhead
Solution Approach 1:
The patent extracts the notification management functionality from the subject object itself. Instead of the subject directly managing and traversing linked lists of observers, the system uses pre-created notification groups that are separate from the subject's core data structure. This extraction allows the subject to publish data efficiently without the overhead of maintaining complex observer relationships, while still ensuring complete notification delivery through the separated notification infrastructure.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
Systems and methods for notifying one or more observers 110 of one or more state changes are provided. For instance, at least one subject 114 can be configured to write data to a buffer 124 in a shared memory space 106. One or more observers 110 can have an associated notification group 130 that includes one or more buffer identifiers 134 corresponding to a buffer 124 in the shared memory space 106. A scheduler 108 can be configured to detect one or more state changes associated with one or more buffers 124 in the shared memory space 106 and to provide an update notification to at least one observer 110 based at least in part on the one or more detected state changes.