Smart Proxy Reducing Remote Network Calls in EJB Systems
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In multi-tier enterprise computing systems, the existing J2EE architecture requires multiple remote network calls for creating and removing enterprise Java beans (EJBs), which hampers system efficiency and performance.
Innovation Solution
A smart proxy is generated on a remote JVM to handle certain remote method invocations at the client side, reducing the need for direct references to home or remote objects and stubs, thereby optimizing network traffic by analyzing method calls and deciding whether to forward them to the home or remote objects or handle them locally.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If traditional J2EE architecture is used with direct references to home and remote objects, then system functionality is complete, but network traffic increases and system efficiency decreases
Solution Approach 1:
A smart proxy object is introduced as an intermediary between the client and the EJB home/remote objects. The proxy intercepts method calls, analyzes whether they can be handled locally, and only forwards necessary calls to the server, thereby reducing network traffic while maintaining complete system functionality.
Solution Approach 2:
The smart proxy creates local copies of EJB state and metadata in memory, allowing frequently accessed information to be retrieved locally rather than through network calls. This copying approach reduces network traffic for read operations while preserving data accuracy.
2Reliability
If multiple remote network calls are made for creating and removing EJBs, then proper lifecycle management is achieved, but system performance deteriorates
Solution Approach 1:
The smart proxy pre-loads EJB metadata, interface definitions, and state information into local memory before they are needed. This preliminary action allows the proxy to handle creation and removal operations with minimal network communication, improving performance while maintaining proper lifecycle management through cached validation rules.
Solution Approach 2:
The smart proxy dynamically adjusts its behavior based on the method being called. It analyzes each method invocation to determine whether local handling is sufficient or if server communication is required, optimizing the balance between reliability and performance on a per-call basis.
3Ease of operation
If direct references to home and remote objects are used, then object access is straightforward, but memory usage increases and network overhead accumulates
Solution Approach 1:
The smart proxy extracts only the essential EJB interface definitions and state information needed for local operations, storing them in optimized memory structures. Full object references are replaced with proxy wrappers that contain only the necessary metadata, reducing memory consumption while maintaining ease of access through the same interface.
Data Source
AI summary
A system and method are described for implementing a smart proxy within an object-oriented environment. One embodiment of the invention reduces the number of remote network calls required for creating and removing enterprise java beans (“EJBs”), thereby improving the efficiency of the entire system. Specifically, a smart proxy is generated on a remote java virtual machine (“JVM”), in front of the home object and remote object, and is configured to handle certain types of remote method invocations at the client side. In this embodiment, the client is no longer configured to hold a direct reference to the home or remote objects, or stubs, as in prior systems. Rather, the client holds a reference to the smart proxy, which communicates with the home and remote objects on behalf of the client. In response to a method call on the EJB Object reference, for example, the proxy will analyze the call, possibly change state, and make a decision as to whether the call must be forwarded to the home or remote objects, or whether it can be handled locally by the proxy itself.


