Non-blocking Dynamic Update of Statically Typed Object-Oriented Software

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current methods for dynamically updating statically-typed class-based object-oriented software running on virtual machines, such as Java, require restarting the system or cause service disruptions, as they fail to support non-blocking updates that preserve state and maintain binary compatibility across different versions of classes.

Innovation Solution

The system performs pre-boot byte-code transformations to enable runtime switching of objects from previous versions to surrogate objects of new classes, allowing for non-blocking dynamic updates by transforming byte-code to ensure shared object identity and state transfer without interrupting the application's execution.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If standard deployment methods are used to update software, then the new version can be installed, but the system must be shut down or restarted causing service disruption

Engineering Contradiction:
Improveservice availabilityVSAvoiddowntime
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system performs preliminary actions by transforming and preparing the new version of the class definition before actually replacing the old one. The byte-code of the new class is transformed in advance to ensure compatibility, and the transformation agent is pre-configured to handle the replacement process, allowing the update to occur without interrupting the running system.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

A transformation agent acts as an intermediary between the old and new class definitions. This agent transforms the byte-code of the new class to make it compatible with the running virtual machine environment, and mediates the replacement process to ensure smooth transition without service disruption.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If class redefinition is performed in Java, then code updates are possible, but restrictions must be imposed to avoid binary incompatibility

Engineering Contradiction:
Improvecode update capabilityVSAvoidupdate restrictions
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The transformation agent serves as an intermediary that handles the complexity of maintaining binary compatibility. It automatically transforms the byte-code of the new class to ensure compatibility with existing classes and the virtual machine environment, relieving the developer of manual compatibility management.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system changes the state of the class definition by transforming its byte-code representation. The transformation agent modifies the byte-code parameters and structure to maintain compatibility with the existing system state, allowing flexible updates without manual restriction management.

Inventive Principle:
Principle #35Parameter changes

3Adaptability or versatility

If dynamic class reloading is implemented, then runtime updates are enabled, but thread blocking occurs to prevent race conditions

Engineering Contradiction:
Improveruntime update capabilityVSAvoidexecution continuity
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The transformation agent performs all necessary transformations and preparations in advance, before the actual class replacement. This preliminary action eliminates the need for thread blocking during the update process, as the transformation is completed beforehand while the system continues to execute.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system maintains continuous execution by performing the class replacement and transformation in a way that does not interrupt the useful action of the running application. The transformation agent operates in a manner that allows the virtual machine to continue executing threads without blocking.

Inventive Principle:
Principle #20Continuity of useful action

4Reliability

If state data is preserved during update, then runtime state is maintained, but state transfer complexity increases

Engineering Contradiction:
Improvestate preservationVSAvoidstate transfer mechanism
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The system performs self-service by automatically transferring state data from the old class instances to the new class instances during the replacement process. The transformation agent handles the state transfer automatically without requiring manual intervention or complex state management mechanisms.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS9015659B2Method, computer program product, and system for non-blocking dynamic update of statically typed class-based object-oriented software
Publication Date: 2015.04.21 ZEROTURNAROUND
  • US9015659B2 patent drawing
  • US9015659B2 patent drawing
  • US9015659B2 patent drawing

AI summary

Under the present invention, a method, computer program product, and system for non-blocking dynamic update of statically-typed class-based object-oriented software executing as byte-code on a virtual machine within an actively running computer system is provided. A set of objects instantiated from an existing module or multiple modules (identifiable collections of application resources and class definitions in the form of byte-code representations) is ready for execution on a virtual machine in an actively running computer system. New versions of one or more modules corresponding to those already loaded into the actively running virtual machine are dynamically loaded into the virtual machine for the purpose of updating the running software. The class definitions within the loaded modules are prepared for dynamic update by inserting byte-code that enables transparent state transfer and shared object identity between objects of a former version and the new version of a class. On the event of a software update, the objects instantiated from a former version of an updated class become uninitialized surrogate objects with the potential to redirect to their future corresponding objects. Corresponding objects are created lazily on first access of the declaring class members. Besides lazy redirection of the behavior of objects and classes, non-blocking dynamic update is achieved by lazy migration of the state offormer objects and classes while locking on a temporary field access lock. Thus, the algorithm for controlling field access and state migration is completely lock-free both before and after state migration; hence the performance degradation is minimal. Finally, any unreferenced objects are removed from memory.