Java Session Object Failover via Shared Memory

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In Java-based system architectures, the crash of a virtual machine can lead to the failure of numerous concurrent application threads, resulting in significant disruptions due to the lack of effective failover protection for session objects, which are typically stored in local memory and lost upon a virtual machine crash.

Innovation Solution

Implementing a method that uses shared memory to store session state information, allowing it to be transferred between virtual machines in case of a failure, thereby ensuring that session handling can continue uninterrupted even if one virtual machine crashes, by instantiating more virtual machines with less local memory and utilizing shareable closures and soft references to manage session objects across multiple virtual machines.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If session objects are stored in local memory of virtual machines, then access speed is improved, but system reliability deteriorates when virtual machine crashes occur

Engineering Contradiction:
Improvesession object access speedVSAvoidsystem reliability
Core Design Contradiction:
SpeedVSReliability

Solution Approach 1:

The patent introduces shared memory as an intermediary between virtual machines and session objects. Instead of storing session objects directly in local memory (which causes reliability issues) or accessing them from remote storage (which slows access), the shared memory acts as a mediator that provides both fast access and persistence across virtual machine failures.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent moves session object storage from a single-dimension local memory space to a multi-dimensional architecture involving both local memory (for speed) and shared memory (for reliability). This dimensional change allows the system to simultaneously achieve fast access and high reliability by accessing session objects from appropriate memory layers.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Reliability

If more virtual machines are instantiated with less local memory, then system reliability is improved through failover capability, but device complexity increases

Engineering Contradiction:
Improvesystem reliabilityVSAvoidvirtual machine management complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent merges the memory resources of multiple virtual machines into a shared memory space that collectively stores session objects. This consolidation reduces the need for each individual virtual machine to have extensive local memory, simplifying the overall system architecture while maintaining reliability through the shared resource pool.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The shared memory serves multiple functions simultaneously: it acts as storage for session objects, provides failover capability across virtual machines, and enables inter-virtual machine communication. This multi-functionality reduces the need for separate dedicated components for each function, thereby reducing overall device complexity.

Inventive Principle:
Principle #6Universality (Multi-functionality)

3Loss of information

If session state information is written to shared memory, then data loss is minimized during virtual machine failure, but memory usage increases

Engineering Contradiction:
Improvesession data lossVSAvoidmemory usage
Core Design Contradiction:
Loss of informationVSQuantity of substance

Solution Approach 1:

The patent implements a copying mechanism where session objects are duplicated from local memory to shared memory. This ensures that even if the original in local memory is lost during a virtual machine failure, a copy exists in shared memory that can be retrieved by another virtual machine, thereby minimizing data loss.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent applies different storage strategies to different portions of session data based on their access patterns and criticality. Frequently accessed session objects are kept in local memory for speed, while less frequently accessed but critical session state information is stored in shared memory for persistence, optimizing the balance between memory usage and data protection.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS8015561B2System and method for managing memory of Java session objects
Publication Date: 2011.09.06 SAP SE
  • US8015561B2 patent drawing
  • US8015561B2 patent drawing
  • US8015561B2 patent drawing

AI summary

A method for managing a session with a client is described in which the method receives from the client a request for the session. The session is handled with a first virtual machine. The method places the session state information for the session into an object located in the first virtual machine's local memory. The method writes into a shared memory an object that contains the session state information. In response to a failure that renders the first virtual machine unable to handle the session, the method reads the object in the shared memory from the shared memory and places it into a second virtual machine's local memory. Lastly, the method receives from the client another request for the session, and handles the another request with the second virtual machine and the session state information.