Inter-Process Data Serialization via API Definition File
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Efficient communication of data between processes written in different programming languages, such as Java and C++, is challenging due to the lack of a unified mechanism, leading to bottlenecks in data transactions in CAD tools.
Innovation Solution
A method involving serialization and deserialization of inter-process functions using an API definition file and a foreign function interface (FFI) is employed, where data transactions are communicated as serialized sets, reducing the number of transactions and improving runtime performance.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If FFI is used to communicate individual data transactions between Java GUI process and C++ modeling process, then data exchange between different programming languages is enabled, but a very large number of transactions are initiated causing communication bottlenecks
Solution Approach 1:
Multiple individual data transactions are merged into a single serialized data stream. The patent combines numerous separate FFI calls into one consolidated communication event by serializing multiple function calls and their parameters into a single byte array that can be transmitted in one FFI transaction, thereby reducing the total number of transactions while maintaining full data exchange capability
Solution Approach 2:
The data transmission format is changed from individual parameter-passing function calls to a serialized byte array representation. By transforming the parameters and function call structures into a serialized format using API definition files, the system alters how data is communicated, enabling multiple transactions to be conveyed through a single FFI interface call
2Ease of manufacture
If multiple programming languages are used for different system components, then each language can be optimized for its specific function, but communication between processes becomes difficult
Solution Approach 1:
An API definition file serves as an intermediary between different programming language processes. This intermediary contains language-neutral function signatures and parameter definitions that enable the Java GUI process and C++ modeling process to communicate without direct language interdependence, maintaining development flexibility while simplifying the communication mechanism
Solution Approach 2:
The API definition file creates a universal interface that works across multiple programming languages. By defining functions and parameters in a language-agnostic format, the same API definition can be used to generate bindings for different languages, allowing each process to be developed in its optimal language while using a common communication protocol
Data Source
AI summary
A method is provided for communicating data between a first process and a second process. A set of inter-process functions of the first and second processes is determined. The set includes one or more functions of the first and second processes that are accessible by the other one of the first and second processes. An API definition file is generated. The API definition file includes a plurality of objects that each define a request to execute one or more inter-process functions of the set of inter-process functions. In response to input to the first process indicating a plurality of the inter-process functions, the plurality of inter-process functions are serialized according to the API definition file. The serialized set of functions is provided to the second process, using an FFI process, and deserialized according to the API definition file.


