Binary Format Deep Cloning Object Graph References
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current data serialization formats, such as JSON, are limited in their ability to perform deep cloning of objects, failing to maintain references to other objects and only creating shallow copies, which hinders efficient data maintenance and transmission in complex object graphs.
Innovation Solution
A binary format is used for deep cloning objects, where each object in an object graph is represented to include references and copies of other objects, enabling the creation of a binary clone that can reconstruct the original object graph by generating and processing binary representations of host and dynamic language objects.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If JSON format is used for serialization, then data can be transmitted over network connections, but it cannot perform deep cloning of objects and only creates shallow copies
Solution Approach 1:
The patent implements deep copying by creating complete replicas of objects and their referenced objects in the object graph. The binary serialization format captures not only the object data but also the reference structure, enabling the reconstructed objects to maintain the same reference relationships as the original objects, thus achieving true deep cloning capability.
Solution Approach 2:
The patent changes the serialization parameter from text-based (JSON) to binary format. This parameter change enables the serialization system to preserve object references and identities, which are lost in JSON format. The binary format can encode reference relationships and object identities in a way that allows deep cloning, whereas JSON only supports shallow copying of object structures.
2Reliability
If JSON format is used for serialization, then data structure can be converted to storable format, but it does not track references to other objects
Solution Approach 1:
The binary serialization format creates a complete copy of the object graph including reference relationships. When objects are serialized, their references to other objects are preserved in the binary data structure, allowing the deserialized objects to maintain the same reference topology as the original objects, thus reliably tracking object references during storage and transmission.
3Productivity
If shallow copy is performed, then object copies can be created, but references to other objects are not maintained
Solution Approach 1:
The patent implements deep copying by recursively copying objects and their references in the object graph. The binary serialization format captures the complete object structure including all reference relationships, enabling the creation of independent copies that maintain the same reference topology as the original objects, thus achieving both productivity and reference integrity.
4Loss of information
If binary format is used for deep cloning, then object references and identities are maintained, but serialization complexity increases
Solution Approach 1:
The patent introduces an intermediary serialization engine that handles the complex task of converting objects to binary format and back. This intermediary component manages the complexity of deep cloning by providing a standardized interface for serialization and deserialization, encapsulating the complex reference-tracking logic within the engine rather than requiring complex user-side implementation.
Data Source
AI summary
Techniques are described herein that are capable of deep cloning (a.k.a. deep copying) objects using a binary format. A deep clone of a designated object includes references to other objects (and potentially copies of the other objects) included in the designated object. A binary representation of each object in an object graph is generated to provide a binary clone of the object graph. Objects created by a dynamic language engine are called dynamic language objects. Objects created by a host (e.g., that hosts the dynamic language engine) are called host objects. Each host object is associated with an intermediate representation thereof via a property bag that describes properties of that host object. Each intermediate representation is understandable by the dynamic language engine. A binary representation of each dynamic language object and each host object may be generated in accordance with the binary format to provide the binary clone.


