Deep cloning of objects using binary format
First Claim
1. A method, performed using a processing device, of deep cloning one or more objects in an object graph using a binary format, the method comprising:
- determining whether each of the one or more objects in the object graph is a host object that is created by a host or a dynamic language object that is created by a dynamic language engine hosted by the host;
retrieving each dynamic language object that is included in the one or more objects from the dynamic language engine;
retrieving each host object that is included in the one or more objects from the host via an intermediate representation of that host object contained in a property bag; and
generating a binary representation of each dynamic language object and each host object in accordance with the binary format to provide a binary clone of the object graph.
3 Assignments
0 Petitions
Accused Products
Abstract
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.
-
Citations
20 Claims
-
1. A method, performed using a processing device, of deep cloning one or more objects in an object graph using a binary format, the method comprising:
-
determining whether each of the one or more objects in the object graph is a host object that is created by a host or a dynamic language object that is created by a dynamic language engine hosted by the host; retrieving each dynamic language object that is included in the one or more objects from the dynamic language engine; retrieving each host object that is included in the one or more objects from the host via an intermediate representation of that host object contained in a property bag; and generating a binary representation of each dynamic language object and each host object in accordance with the binary format to provide a binary clone of the object graph. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A method, performed using a processing device, of reconstructing an object graph based on a binary clone of the object graph, the binary clone including one or more binary representations of one or more respective host objects, the method comprising:
for each of the one or more binary representations of the one or more respective host objects, creating a placeholder for the respective host object, extracting the binary representation of the host object from the binary clone into a respective property bag object such that the respective property bag object includes properties of the host object, extracting the properties from the property bag object, and initializing the placeholder with the properties that are extracted from the property bag object to provide a respective initialized host object in the reconstructed object graph. - View Dependent Claims (12, 13)
-
14. A system to deep clone one or more objects in an object graph using a binary format, the system comprising:
-
one or more processors; a host implemented using at least one of the one or more processors and configured to instantiate serialization of the object graph via an application programming interface; and a serialization engine included in a dynamic language engine, the dynamic language engine being hosted by the host, the serialization engine comprising; an API module configured to expose the application programming interface to the host; an object module configured to determine whether each of the one or more objects in the object graph is a host object that is created by the host or a dynamic language object that is created by the dynamic language engine; a retrieval module configured to retrieve each dynamic language object that is included in the one or more objects from the dynamic language engine, the retrieval module further configured to create one or more property bags to retrieve one or more respective host objects included in the one or more objects from the host, each property bag containing an intermediate representation of the corresponding host object; and a binary module configured to generate a binary representation of each dynamic language object and each host object in accordance with the binary format to provide a binary clone of the object graph. - View Dependent Claims (15, 16, 17, 18, 19, 20)
-
Specification