Configurable Data Stream Transformation for Multiple Consumer Models
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing data stream transformation methods require frequent code changes in the source application whenever the destination model changes, leading to complexity, performance issues, and increased risk of errors, especially when multiple output data streams are needed.
Innovation Solution
A data stream transformer that uses a configuration YAML file to map a source model to multiple destination models, leveraging JSON schema to create destination model classes and perform transformations without modifying the source application code.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If data transformation is implemented within the source application code, then the source application can provide output data streams according to the destination model, but any change in the destination model requires code changes in the source application, increasing complexity and risk of errors
Solution Approach 1:
The patent introduces a configuration file as an intermediary between the source application and the destination model. The configuration file contains transformation rules that map source data structures to destination data structures. When the destination model changes, only the configuration file needs to be updated, not the source application code. This intermediary layer decouples the source application from destination model changes, resolving the contradiction between adaptability and code complexity.
Solution Approach 2:
The patent segments the data transformation functionality into a separate configuration file from the source application code. The configuration file contains distinct transformation rules for different data elements, allowing independent modification of transformation logic without affecting the source application. This segmentation enables flexible adaptation to destination model changes while keeping the source application simple and stable.
2Reliability
If the source application is updated to accommodate format changes in the data stream, then the output data stream conforms to the required destination model, but continual code updates are needed, increasing the risk of errors and faults
Solution Approach 1:
The configuration file serves as an intermediary that absorbs all the complexity of data format transformations. The source application simply reads from the source data stream and writes to the destination data stream according to rules defined in the configuration file. This ensures reliable conformance to the destination model while making the source application easy to maintain, as no code changes are needed when formats change.
Solution Approach 2:
The configuration file enables the transformation system to self-adapt to format changes. When the destination model format changes, the configuration file is updated with new transformation rules, and the system automatically applies these rules without requiring manual code modification or compilation. This self-service capability maintains reliability while improving ease of operation.
3Adaptability or versatility
If multiple output data streams with different destination models are supported, then the source application can serve multiple consumer applications, but implementing multiple transformations in code becomes complex and requires continual addition of new code
Solution Approach 1:
The configuration file provides a universal mechanism for defining transformations to multiple different destination models. Each consumer application's requirements are specified as separate transformation rules in the configuration file. The source application uses the same configuration file to generate multiple different output data streams, achieving multi-functionality without increasing code complexity. This universal approach allows the system to adapt to multiple destination models while keeping the implementation simple.
Data Source
AI summary
A data stream transformer maps a source data stream model of a source application to a set of one or more destination models of consumer applications. Each destination model is described using a JSON schema. A configuration YAML file having one or more templates is created, with each template being based on the JSON schema and defining methods that the data stream transformer uses to map the source data stream model into the respective destination model. The JSON schema defining the destination model is compiled to create a set of destination model classes. The source application creates source objects forming the source data stream. The data stream transformer uses reflection to retrieve the values of the source objects and uses the template and destination model classes to build destination model objects based on the values of the source model objects. The destination model objects are output to the consumer application.


