Service Metadata Encoding for Smaller Binaries and Faster Startup
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for generating service metadata, such as AOT and JIT compilation, result in increased disk footprint or degraded application startup and execution time, and negatively affect optimization capabilities.
Innovation Solution
Encoding service metadata at compile-time and initializing them at startup by storing an encoded representation in an initialized read-only data segment, reserving an uninitialized data segment for metadata, and decoding at runtime.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If service metadata are generated in advance by AOT compilers and stored in the executable file, then the service metadata are available at run-time, but the executable file size increases and application startup is slowed down
Solution Approach 1:
The patent extracts only the essential structure information of service metadata (such as class hierarchies, method signatures, and data structure definitions) and stores it in the executable file, while removing redundant runtime data. This allows the metadata to be available at runtime without storing the complete metadata sets, thereby reducing executable file size while maintaining reliability.
Solution Approach 2:
The patent performs preliminary compilation of service metadata structure information during the AOT compilation phase, preparing the essential framework in advance. This preliminary action enables faster runtime initialization compared to generating all metadata from scratch, while avoiding the need to store complete metadata sets in the executable file.
2Weight of stationary object
If service metadata are generated on-demand by JIT compilers at run-time, then disk footprint overheads are eliminated, but application startup time and execution time are degraded
Solution Approach 1:
The patent performs preliminary compilation of service metadata structure information during the AOT compilation phase, preparing the essential framework in advance. This preliminary action enables faster runtime initialization compared to generating all metadata from scratch, while avoiding the need to store complete metadata sets in the executable file.
Solution Approach 2:
The patent segments service metadata into two parts: structure information (compiled in advance and stored in executable) and runtime data (generated on-demand). This segmentation allows the system to benefit from both AOT compilation (faster startup) and JIT compilation (reduced disk footprint) by combining their advantages.
3Weight of stationary object
If service metadata are generated on-demand by JIT compilers, then disk footprint is reduced, but optimization capabilities of AOT compilers are negatively affected
Solution Approach 1:
The patent segments service metadata into structure information (compiled in advance) and runtime data (generated on-demand). This segmentation allows AOT compilers to optimize the structure information portion while maintaining reduced disk footprint, preserving optimization capabilities without requiring complete metadata availability.
Solution Approach 2:
The patent applies partial AOT compilation by generating only the essential structure information in advance rather than complete service metadata. This partial action maintains optimization capabilities for critical path compilation while avoiding the overhead of compiling and storing all metadata, achieving a balance between optimization and disk footprint reduction.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
The present disclosure relates generally to the field of data processing, and particularly to techniques for encoding and initializing service metadata required to efficiently run applications written in object-oriented programming languages. More specifically, these techniques involve obtaining and storing an encoded representation of service metadata in an initialized read-only data segment of an executable file of an application, and reserving, at least in part, an uninitialized data segment of the executable file for the service metadata themselves. The encoded representation is then decoded at the run-time of the application to initialize the service metadata in the reserved uninitialized data segment. By so doing, it is possible to reduce a disk footprint (executable file size) of the application because the encoded representation of the service metadata is only stored in the executable file, instead of the actual service metadata. Moreover, the encoded representation of the service metadata is quick to decode, thereby reducing the startup time of the application.