Java Object Serialization to Bytecode via Build-Time Pre-generation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Generating intermediate representations of objects, such as custom Java bytecode, at runtime is complex and difficult to integrate, leading to slower startup times and increased memory usage, especially in cloud environments where hundreds to thousands of application instances are deployed.

Innovation Solution

A system and method for serializing objects to bytecode prior to runtime using a serializer that follows a rule set, allowing for pre-generation of intermediate representations at build time, which can be executed at runtime to recreate objects and configure applications, reducing complexity and resource consumption.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If intermediate representations (bytecode) are generated at runtime, then objects can be created dynamically, but startup times increase and memory usage increases

Engineering Contradiction:
Improvedynamic object creationVSAvoidstartup time
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The patent applies preliminary action by generating and serializing intermediate representations (bytecode) at build time rather than runtime. The serializer processes configuration objects during the build phase, converting them into executable bytecode that is stored and later executed at runtime. This pre-computation eliminates the need for complex runtime bytecode generation, thereby reducing startup time while preserving dynamic object creation capabilities.

Inventive Principle:
Principle #10Preliminary action

2Adaptability or versatility

If intermediate representations (bytecode) are generated at runtime, then objects can be created dynamically, but memory usage increases

Engineering Contradiction:
Improvedynamic object creationVSAvoidmemory usage
Core Design Contradiction:
Adaptability or versatilityVSQuantity of substance

Solution Approach 1:

The patent reduces runtime memory usage by performing the memory-intensive bytecode generation operation at build time. The serializer consumes memory to generate and serialize configuration objects during the build phase, but this serialized bytecode is then stored in a compact form that requires minimal memory at runtime. This shifts the memory burden from runtime to build time, enabling dynamic object creation with reduced runtime memory footprint.

Inventive Principle:
Principle #10Preliminary action

3Ease of manufacture

If custom bytecode generation is implemented, then object serialization is achieved, but integration difficulty increases

Engineering Contradiction:
Improvebytecode implementationVSAvoidintegration complexity
Core Design Contradiction:
Ease of manufactureVSDevice complexity

Solution Approach 1:

The patent introduces a serializer as an intermediary component that simplifies bytecode generation. Instead of requiring developers to implement complex custom bytecode generation logic, the serializer acts as a mediator that automatically converts configuration objects into executable bytecode according to defined rules. This intermediary layer abstracts the complexity of bytecode generation, making it easier to integrate into existing systems while maintaining the ability to create dynamic objects.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS10795704B2Serialization of objects to java bytecode
Publication Date: 2020.10.06 RED HAT INC
  • US10795704B2 patent drawing
  • US10795704B2 patent drawing
  • US10795704B2 patent drawing

AI summary

A system includes a memory, a processor in communication with the memory, and a serializer. The serializer is configured to receive an object that includes at least one field, initiate serialization of the object according to a rule set, and write a first intermediate representation of a new object based on the object. The serializer is also configured to write a second intermediate representation to set the at least one field in the new object. Additionally, the serializer is configured to output a serialization of the new object based on the first intermediate representation and the second intermediate representation.