Dynamic Proxy Classes for Call-by-Value Semantics

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing systems for enforcing call-by-value semantics between clients and Enterprise Java Beans (EJBs) are inefficient due to the high processing power and time required for marshalling and unmarshalling byte arrays, which is costly in terms of performance.

Innovation Solution

Dynamic generation of proxy classes at runtime using bytecode generation to intercept communication between clients and EJBs, allowing for optimized parameter passing based on object types and reducing the need for costly marshalling and unmarshalling.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If marshalling and unmarshalling byte arrays are used to enforce call-by-value semantics, then correctness is ensured, but processing time and computational resources increase significantly

Engineering Contradiction:
Improvecall-by-value semantics enforcementVSAvoidmarshalling and unmarshalling time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent creates shallow copies of parameter references instead of deep copying serialized data. The wrapper class holds references to the original EJB and parameters, and the invoke method copies these references efficiently without full serialization, maintaining call-by-value semantics while avoiding costly marshalling operations

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent uses lightweight wrapper objects that are created temporarily for each method invocation and then discarded. These wrappers contain only essential reference information and are not serialized, making them cheap to create and destroy, thus reducing the overhead of enforcing call-by-value semantics

Inventive Principle:
Principle #27Cheap short-living objects (Disposable)

2Productivity

If dynamic bytecode generation is used to create proxy classes, then performance is improved by avoiding marshalling, but system complexity increases

Engineering Contradiction:
Improvemethod invocation efficiencyVSAvoidruntime code generation complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent pre-generates wrapper class bytecode at runtime before actual method invocations occur. This preliminary code generation creates optimized invoke methods that directly copy references without serialization overhead, establishing an efficient execution path for subsequent calls while isolating the complexity to a one-time setup phase

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces wrapper classes as intermediary objects between clients and EJBs. These wrappers mediate method invocations by intercepting calls, copying parameter references, and forwarding to the target EJB, thereby simplifying the interaction model while enabling optimized reference copying semantics

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS8881099B2Dynamic generation of wrapper classes to implement call-by-value semantics
Publication Date: 2014.11.04 ORACLE INT CORP
  • US8881099B2 patent drawing
  • US8881099B2 patent drawing
  • US8881099B2 patent drawing

AI summary

A system and method for dynamically generating proxy classes in order to enforce call-by-value semantics between clients and EJBs collocated with a virtual machine. The virtual machine can be a Java virtual machine (JVM) or some other type of virtual machine. The proxy classes are dynamically generated at runtime using dynamic byte code generation. Generated proxies are then interposed between a client and an EJB. The interposition of the generated proxies allows the proxies to intercept communication between the client and the EJB. The dynamically generated wrapper classes may be used in any system wherein a first entity invokes a second entity, wherein the second entity has an interface that can be retrieved or introspected and utilizes call-by-value semantics.