Translating between versions of data object schemas for data producers and data consumers
Translations between versions of data object schemas may be performed between data object producers and data object consumers. A request to update a data object may be an update according to an additional version of a schema applicable to the data object from an existing version of a schema. The data object may be provided by one component of a distributed system. A trigger event may be detected to send the data object to a different component of the distributed system. The data object may be translated from the additional version to the existing version and sent to the different component.
1 . A system, comprising:
at least one processor; and
a memory, storing program instructions that when executed by the at least one processor, cause the at least one processor to implement a data management system of a control plane for an application development, build, delivery and deployment service, the data management system configured to:
receive a request to register a second version of a schema applicable to a data object in a schema registry for the data management system, wherein a first version of the schema for the data object is included in the registry;
receive a request to update the data object managed by the data management system according to the second version of the schema registered for the data object from the first version of the schema registered for the data object, wherein the request to update the data object is received from a first component of the application development, build, delivery and deployment service;
use first one or more requirements specified in the first version of the schema and second one or more requirements specified in the second version of the schema to determine that the update to the object in the request satisfies both the first version of the schema and the second version of the schema based, at least in part, on the data management system being able to translate between the second version of the schema and a first version of the schema, before performing the update to the data object;
receive a second request to update the data object managed by the data management system according to the second version of the schema registered for the data object from the first version of the schema registered for the data object, wherein the second request to update the data object is received from the first component of the application development, build, delivery and deployment service;
use the first version of the schema to determine that the update to the object in the second request fails to satisfy the first version of the schema;
use the second version of the schema to determine that the update to the object in the second request fails to satisfy the second version of the schema;
reject the second request to update the data object according to a determination that the update to the object in the second request fails to satisfy more than one version of the schema, including the first version of the schema and the second version of the schema;
after receipt of the request to update the data object according to the second version of the schema,
detect a trigger event to send at least a portion of the data object managed by the data management system to a second component of the application development, build, delivery and deployment service according to the first version of the schema;
responsive to detecting the trigger event:
access the registry to obtain instructions to translate the data object from the second version of the schema to the first version of the schema; and
send at least the portion of the translated data object to the second component.
2 . The system of claim 1 , wherein the determination that the second request to update the data object fails to satisfy more than one version of the schema is based on a backward compatibility requirement.
3 . The system of claim 1 , wherein the data management system is further configured to:
detect a second trigger event to send at least some portion of the data object to a third component of the application development, build, delivery and deployment service according to the second version of the schema;
responsive to the detection of the second trigger event:
send the at least some of the data object to the third component.
4 . The system of claim 1 , wherein the first component and the second component are different tools supported by the application development, build, delivery and deployment service.
5 . A method, comprising:
receiving, by a data management system for an application development, build, delivery and deployment service, a request to update a data object managed by the data management system according to a second version of a schema applicable to the data object from a first version of the schema applicable to the data object, wherein the request to update the data object is received from a first component of the application development, build, delivery and deployment service;
using first one or more requirements specified in the first version of the schema and second one or more requirements specified in the second version of the schema to determine that the update to the object in the request satisfies both the first version of the schema and the second version of the schema with translation before performing the update to the data object;
receiving a second request to update the data object managed by the data management system according to the second version of the schema registered for the data object from the first version of the schema registered for the data object, wherein the second request to update the data object is received from the first component of the application development, build, delivery and deployment service;
using the first version of the schema to determine that the update to the object in the second request fails to satisfy the first version of the schema;
using the second version of the schema to determine that the update to the object in the second request fails to satisfy the second version of the schema;
rejecting the second request to update the data object according to a determination that the update to the object in the second request fails to satisfy more than one version of the schema, including the first version of the schema and the second version of the schema;
after receiving the request to update the data object according to the second version of the schema, detecting, by the data management system, a trigger event to send at least a portion of the data object managed by the data management system to a second component of the application development, build, delivery and deployment service according to the first version of the schema;
responsive to detecting the trigger event:
translating the data object from the second version of the schema to the first version of the schema; and
sending at least the portion of the translated data object to the second component.
6 . The method of claim 5 , wherein the determination that the second request to update the data object fails to satisfy more than one version of the schema is based on a backward compatibility requirement.
7 . The method of claim 5 , wherein the data object is stored in a data store of the data management system.
8 . The method of claim 5 , wherein the trigger event is a request to read the data object.
9 . The method of claim 5 , wherein the trigger event is performance of the update to the data object.
10 . The method of claim 5 , further comprising:
receiving, at the data management system, a request to register the second version of the schema applicable to the data object; and
adding the second version of the schema to a registry for schemas.
11 . The method of claim 10 , wherein the second version of the schema includes one or more instructions to translate the data object to the first version of the schema from the second version of the schema.
12 . The method of claim 5 , further comprising:
receiving, at the data management system, a request to create a second data object; and
creating, by the data management system, the second data object according to the second version of the schema instead of the first version of the schema.
13 . The method of claim 5 , further comprising:
detecting, by the data management system, a second trigger event to send at least some portion of the data object to a third component of the application development, build, delivery and deployment service according to the second version of the schema;
responsive to detecting the second trigger event:
sending the at least some of the data object to the third component.
14 . One or more non-transitory, computer-readable storage media, storing program instructions that when executed on or across one or more computing devices cause the one or more computing devices to implement:
receiving, by a data management system for an application development, build, delivery and deployment service, a request to update a data object managed by the data management system according to a second version of a schema registered for the data object from a first version of the schema registered for the data object, wherein the request to update the data object is received from a first component of the application development, build, delivery and deployment service;
using first one or more requirements specified in the first version of the schema and second one or more requirements specified in the second version of the schema to determine that the update to the object in the request satisfies both the first version of the schema and the second version of the schema before performing the update to the data object;
receiving a second request to update the data object managed by the data management system according to the second version of the schema registered for the data object from the first version of the schema registered for the data object, wherein the second request to update the data object is received from the first component of the application development, build, delivery and deployment service;
using the first version of the schema to determine that the update to the object in the second request fails to satisfy the first version of the schema;
using the second version of the schema to determine that the update to the object in the second request fails to satisfy the second version of the schema;
rejecting the second request to update the data object according to a determination that the update to the object in the second request fails to satisfy more than one version of the schema, including the first version of the schema and the second version of the schema;
after receiving the request to update the data object according to the second version of the schema, detecting, by the data management system, a trigger event to send at least a portion of the data object managed by the data management system to a second component of the application development, build, delivery and deployment service according to the first version of the schema;
responsive to detecting the trigger event:
accessing a registry that includes instructions to translate the data object from the second version of the schema to the first version of the schema; and
sending at least the portion of the translated data object to the second component.
15 . The one or more non-transitory, computer-readable storage media of claim 14 , wherein the determination that the second request to update the data object fails to satisfy more than one version of the schema is based on a backward compatibility requirement.
16 . The one or more non-transitory, computer-readable storage media of claim 14 , wherein the trigger event is a request to read the data object.
17 . The one or more non-transitory, computer-readable storage media of claim 14 , wherein the trigger event is performance of the update to the data object.
18 . The one or more non-transitory, computer-readable storage media of claim 14 , wherein the data object is a document object, and wherein the request to update the data object updates the document object.
19 . The one or more non-transitory, computer-readable storage media of claim 14 , storing further instructions that when executed on or across the one or more computing devices, cause the one or more computing devices to implement:
receiving, at the data management system, a request to register the second version of the schema applicable to the data object; and
adding the second version of the schema to a registry for schemas.
20 . The one or more non-transitory, computer-readable storage media of claim 14 , wherein the first component and the second component are different tools supported by the application development, build, delivery and deployment service.