Graph Database Object Unmarshalling via Pre-generated Models
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Recreating graph structures on client devices from graph database data is time-consuming, error-prone, and requires significant boilerplate code maintenance due to varying platforms and changing authoritative models, leading to client failures and synchronization issues.
Innovation Solution
A Graphs Manager is implemented to unmarshal objects from the graph database, using reflection to generate client-side object models that mimic server-side models, with metadata guiding the reconstruction of objects from raw key-value pairs, and a Service Provider Interface (SPI) for transparent data retrieval and object instantiation.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If graph structures are recreated on client devices from graph database data, then data accessibility is improved, but time consumption and error rate increase significantly
Solution Approach 1:
The system performs preliminary actions by pre-generating platform-specific object models on the server side and storing them in the graph database alongside the graph data. When client devices need data, they receive pre-processed objects that are already adapted to their specific platform, eliminating the need for time-consuming recreation of graph structures on the client side.
Solution Approach 2:
The system introduces an intermediary layer (the server-side model generation and storage mechanism) that translates graph database data into platform-specific objects before transmission. This intermediary process handles the complexity of model recreation on the server side, allowing client devices to receive ready-to-use objects without performing complex transformations themselves.
2Adaptability or versatility
If graph structures are recreated on client devices, then platform-specific adaptability is improved, but error rate and synchronization issues increase
Solution Approach 1:
Platform-specific object models are pre-generated and stored on the server side before clients need them. This preliminary action ensures that all platform adaptations are tested and validated on the server, reducing errors when clients receive these pre-processed objects. The models are generated once and reused, ensuring consistency across multiple clients.
Solution Approach 2:
The server acts as an intermediary that centralizes the model generation and adaptation logic. By handling all platform-specific transformations on the server side rather than distributing this complexity to multiple clients, the system reduces synchronization issues and ensures all clients receive consistent, validated objects from a single source of truth.
3Adaptability or versatility
If boilerplate code is maintained for varying platforms, then platform compatibility is improved, but code maintenance complexity increases
Solution Approach 1:
The system introduces a server-side intermediary layer that handles all platform-specific model generation and adaptation logic. This centralizes the complexity of maintaining platform compatibility, allowing clients to receive pre-processed objects without needing their own boilerplate code for model recreation. The server becomes the single location where platform compatibility is managed and maintained.
Solution Approach 2:
Instead of requiring each client platform to maintain its own boilerplate code for model recreation, the system creates and stores copies of platform-specific object models on the server side. These pre-generated model copies are then distributed to clients, eliminating the need for clients to maintain complex transformation code and reducing overall system complexity.
Data Source
AI summary
Implementations of the disclosure provide for unmarshalling objects from a back-end server graph database as they would be available in local memory at a client device. An apparatus is provided that comprises a memory and a processing device to inspect a graph model associated with an object comprising a plurality of node data structures. The graph model defines one or more services provided by each node of the object. Using a graph database, graph data elements are identified for at least one node data structure of the object in view of the inspected graph model. Metadata that describes the object associated with the inspected graph mode is generated. Thereupon, the metadata is provided to reconstruct using the graph data elements the one or more services associated with the object at a client device.


