Object Cloning via Frozen Data Store and Proxy References
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing object copying methods in object-oriented programming are inefficient due to redundant data storage and significant processing overhead, as they require copying and storing underlying data objects, leading to resource waste and slow processing times.
Innovation Solution
A mechanism is introduced that freezes the data state of an object, creates proxy objects referencing the frozen state, and modifies the original object to reference these proxies, allowing for efficient cloning without redundant data copying, maintaining a query definition through the inclusion of proxy objects and lazy initialization of unused objects.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If shallow copy or deep copy methods are used to copy an object, then a complete copy of the object is created, but redundant data storage and significant processing time are required
Solution Approach 1:
The patent implements a cloning mechanism that creates a copy of the object's state without physically copying the underlying data. The clone object references the same data store as the original object, achieving the appearance of a complete copy while avoiding redundant data storage and processing time.
Solution Approach 2:
The patent introduces a data store as an intermediary between the object and its underlying data. The object stores references to data in the data store rather than containing the data directly. When cloning, the reference is copied instead of the data itself, resolving the contradiction between complete copying and processing efficiency.
2Reliability
If deep copy is used to create independent copies of referenced objects, then complete independence is achieved, but memory consumption and processing overhead increase significantly
Solution Approach 1:
The patent copies only the reference information rather than the actual data when creating an object clone. This approach achieves the functional independence needed for cloning while minimizing memory consumption by avoiding redundant data storage.
Solution Approach 2:
The patent extracts the data from the object and stores it separately in a shared data store. The object contains only references to the data, not the data itself. This extraction allows multiple objects to share the same data without duplicating it in memory.
3Reliability
If field-by-field copying is performed, then all object attributes are replicated, but the process becomes complex and resource-intensive for objects with many underlying data objects
Solution Approach 1:
The patent copies the object's state by referencing the data store rather than performing field-by-field copying. This single reference copy operation replicates all object attributes efficiently without the complexity of individual field copying.
Solution Approach 2:
The patent merges the object's data storage with a shared data store, allowing multiple objects to reference the same data. This consolidation eliminates the need for complex field-by-field copying operations while ensuring complete attribute replication through the shared reference.
Data Source
AI summary
Provided are systems and methods for generating a copy of an object in an object-oriented programming architecture. In one example, the method may include one or more of receiving a command to copy a model object comprising a hierarchical object-oriented architecture that references one or more underlying data objects, freezing a state of the one or more underlying data objects to generate a frozen data store of underlying object data, generating a first proxy object that references the frozen data store and a second proxy object that references the frozen data store, modifying the model object to reference the first proxy object instead of referencing the one or more underlying data objects, and generating a copy of the model object that references the second proxy object and storing the copy of the model object.


