Java Virtual Machine Code Sharing for Web Container Resource Reduction

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional implementations of web server applications using Java virtual machines result in increased server resource usage due to each web container being executed in a separate virtual machine.

Innovation Solution

The technique allows multiple Java applications to be executed on the same Java virtual machine by instancing specific types of fields within Java classes and using a transformation module to facilitate code sharing between applications that use common classes, enabling transparent hosting of multiple web container instances.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If each web container is executed in a separate virtual machine, then isolation and security are improved, but server resource usage increases

Engineering Contradiction:
Improveisolation and securityVSAvoidserver resource usage
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The patent merges multiple web container instances into a single Java virtual machine by enabling code sharing between different web containers. The transformation module modifies class files to allow different web containers to share common classes, reducing the number of separate virtual machines needed while maintaining isolation through the sharing application framework.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The patent introduces a sharing application as an intermediary layer between multiple web containers and the Java virtual machine. This sharing application manages code sharing, handles class loading, and coordinates resource access between different web containers, enabling them to coexist in the same virtual machine while maintaining their individual identities and security boundaries.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If multiple Java applications share the same virtual machine, then resource efficiency is improved, but code conflicts and interference may occur

Engineering Contradiction:
Improveresource efficiencyVSAvoidcode interference
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent segments the class loading and execution space by introducing a transformation module that processes and modifies class files specific to each web container. This segmentation allows different web containers to share common classes while maintaining separate execution contexts, preventing code interference through controlled class loading and transformation.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies local quality by enabling selective code sharing where common classes are shared across web containers, but container-specific classes and methods remain isolated. The transformation module ensures that each web container has its own instance of shared classes when needed, providing local isolation while maintaining global sharing efficiency.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS9639381B2Sharing applications in a java virtual machine
Publication Date: 2017.05.02 AMAZON TECH INC
  • US9639381B2 patent drawing
  • US9639381B2 patent drawing
  • US9639381B2 patent drawing

AI summary

Disclosed are various embodiments for executing multiple applications in a single virtual machine. The classes of an application executing in the virtual machine are traversed to identify non-sharable static fields. Upon identifying a non-sharable static field, mapping data is created that corresponds to the non-sharable static field. During another traversal of the classes of the application, access to the identified non-sharable static field is translated into an access to the mapping data that is associated with the non-sharable static field.