The field of invention relates generally to the software arts; and, more specifically, to the implementation of a connection manager capable of supporting both distributed computing sessions and non distributed computing sessions.
Even though standards-based application software (e.g., Java based application software) has the potential to offer true competition at the software supplier level, legacy proprietary software has proven reliability, functionality and integration into customer information systems (IS) infrastructures. Customers are therefore placing operational dependency on standards-based software technologies with caution. Not surprisingly, present day application software servers tend to include both standard and proprietary software suites, and, often, “problems” emerge in the operation of the newer standards-based software, or interoperation and integration of the same with legacy software applications.
The prior art application server 100 depicted in
The back and forth communication typically involves a client (“client”) sending a server 100 (“server”) a “request” that the server 100 interprets into some action to be performed by the server 100. The server 100 then performs the action and if appropriate returns a “response” to the client (e.g., a result of the action). Often, a session will involve multiple, perhaps many, requests and responses. A single session through its multiple requests may invoke different application software programs.
For each client request that is received by the application server's connection manager 102, the connection manager 102 decides to which software suite 103, 104 the request is to be forwarded. If the request is to be forwarded to the proprietary software suite 103, notification of the request is sent to a proprietary dispatcher 105, and, the request itself is forwarded into a request/response shared memory 106. The proprietary dispatcher 105 acts as a load balancer that decides which one of multiple proprietary worker nodes 1071 through 107L are to actually handle the request.
A worker node is a focal point for the performance of work. In the context of an application server that responds to client-server session requests, a worker node is a focal point for executing application software and/or issuing application software code for downloading. The term “working process” generally means an operating system (OS) process that is used for the performance of work and is also understood to be a type of worker node. For convenience, the term “worker node” is used throughout the present discussion.
When a particular proprietary worker node has been identified by dispatcher 105 for handling the aforementioned request, the request is transferred from the request/response shared memory 106 to the identified worker node. The identified worker node processes the request and writes the response to the request into the request/response shared memory 106. The response is then transferred from the request/response shared memory 106 to the connection manager 102. The connection manager 102 sends the response to the client via network 101.
Note that the request/response shared memory 106 is a memory resource that each of worker nodes 1071 through 107L has access to (as such, it is a “shared” memory resource). For any request written into the request/response shared memory 106 by the connection manager 102, the same request can be retrieved by any of worker nodes 1071 through 107L. Likewise, any of worker nodes 1071 through 107L can write a response into the request/response shared memory 106 that can later be retrieved by the connection manager 102. Thus the request/response shared memory 106 provides for the efficient transfer of request/response data between the connection manager 102 and the multiple proprietary worker nodes 1071 through 107L.
If the request is to be forwarded to the standards based software suite 104, notification of the request is sent to the dispatcher 108 that is associated with the standards based software suite 104. As observed in
A Java Virtual Machine is associated with each worker node for executing the worker node's abstract application software code. For each request, dispatcher 108 decides which one of the N worker nodes is best able to handle the request (e.g., through a load balancing algorithm). Because no shared memory structure exists within the standards based software suite 104 for transferring client session information between the connection manager 102 and the worker nodes 1091 through 109N, separate internal connections have to be established to send both notification of the request and the request itself to the dispatcher 108 from connection manager 102 for each worker node. The dispatcher 108 then forwards each request to its proper worker node.
b shows a more detailed depiction of the J2EE worker nodes 1091 through 109N of the prior art system of
A virtual machine, as is well understood in the art, is an abstract machine that converts (or “interprets”) abstract code into code that is understandable to a particular type of a hardware platform (e.g., a particular type of processor). Because virtual machines operate at the instruction level they tend to have processor-like characteristics, and, therefore, can be viewed as having their own associated memory. The memory used by a functioning virtual machine is typically modeled as being local (or “private”) to the virtual machine. Hence,
Various problems exist with respect to the prior art application server 100 of
c through 1d relate to differences between different types of sessions. As discussed previously, a session can be viewed as a back and forth communication over a network between a pair of computing systems. In the case of object oriented programming, however, there exist different types of sessions in which different kinds of request/response information are passed over the network.
c relates to a “non-distributed computing” session in which software running on a first computing system (such as client application 153c running on client computing system 151c) is essentially viewed as a separate software program than the software running on a second computing that it is engaged in a session with (such as server application 154c running on server computing system 152c), even if the pair of software programs are regarded as being part of the same overarching “application” software product.
That the pair of software programs 151c, 154c are regarded as being separate programs derives from the manner in which they interact with one another. Specifically, the client application 153c sends formal commands to the server application 154c that the server application 154c as a whole has made available (e.g., through its API 155) for “other” software programs to call upon should they desire to use the server application 154c.
Better said, the server application 154c has been designed to offer a formal set of externally available commands that other programs may use to invoke the use of the server application 154c, and, the client application 153c uses these formal set of commands over the course of its session with the server application. The most common types of sessions that adhere to this kind of session structure are HTTP and HTTPs sessions.
Certain software technologies, including Java, are “object oriented.” According to an object oriented approach, the subject matter that is processed by a computer program is organized into classes of likeness. For example, the software used to sell items to customer X might belong to the same class of software (e.g., a class named “sales”) that is used to sell items to customer Y.
Here, given that a significant degree of overlap is expected to exist regarding the methods and data types used to process sales for both customers X and Y (e.g., an “update billing about sale” method, an “update accounting about sale” method, a “part number” data type, a “quantity” data type . . . etc.) it is deemed more efficient to organize such methods and data types into a generic “sales” class from which specific instances of the class (e.g., an instance for selling to customer X and an instance for selling to customer Y) can be defined and created.
Each specific instance of a class is referred to as an object; and, each object assumes the characteristics of the class from which it is defined. Thus, a first object could be created from the generic sales class to create a “sell to customer X” object; and, a second object could be created from the generic sales class to create a “sell to customer Y” object. Both objects would be able to execute the methods defined by the class. For example, the “sell to customer X” object could execute the “update accounting about sale” method to update an accounting department about a sale to customer X; and, the “sell to customer Y” object could also execute the “update accounting about sale” method to update an accounting department about a sale to customer Y.
In general, the runtime execution of any computer program can be viewed as the execution of a sequence of methods. With respect to an object-oriented approach, such a sequence of methods can be implemented by calling upon a sequence of objects and invoking one or more methods at each object.
c shows both the client application 151c and the server application 154c as being object oriented, and, shows exemplary process flows occurring within each. Specifically, within the client application 153c, object 160 is observed calling upon (e.g., invoking a method of) 161 object 162 which provides a return value 163 to object 160. Object 160 then calls upon 164 object 165 which calls upon object 166, etc. Similarly, at the server application 154c, object 167 is observed calling upon 168.
In the regular flow of an object-oriented program at runtime, a first object's ability to successfully call upon a method of a second object involves knowing the identity and methods of the second object. Because the client application 153c is separate from the server application 154c, the operational flow within the client application 153c generally does not comprehend this level of detail concerning the objects within the server application 154c. As such, client application 153c objects do not directly call server application 154c objects as they do with one another.
Rather, as discussed above, the client side 151c sends a formal command (often packaged into a “request” packet that is sent over a network 150c) to the server application 154, and, the server application 154c responds 157 with a formal response to the request. Thus, in this sense, it can fairly be said that the client application's 153c object-to-object flows and the server application's 154c object-to-object flows are isolated from one another.
By contrast,
As such, as observed in
e shows an exemplary functional model for implementing an object method call across a network 150e from a calling object 169 on a first computing system 151e to a “remote” object 170 on second computing system 152e. According to the functional model of
The stub 174 acts as a sort of “proxy” for the remote object 170 so that it “appears” to the calling object 169 as if the remote object 170 were on the same machine as the calling object 169 (rather than a different one). That is, ideally, the stub 174 behaves, from the perspective of the calling object 169, as the remote object behaves 170. In implementation, the stub 174 may be little more than an interface that accepts method calls in the format that the remote object 170 would accept them if it were local to the calling object 170; and, provides return values in the same format that the remote object 170 would provide them if it were local to the remote object 170.
At least in cases where a remote object method call is actually made, the stub 174 does not contain the coding to perform the method that the calling object 169 has called. As such, a request that identifies the called method is packaged (e.g., by a client side object request brokering function 175) and sent 177 (in the form of a “request”) over a network 150e to a server side object request brokering function 176. According to one perspective, the server side object request broker function 176 is generally deemed responsible for: 1) processing the request that was sent 177 over the network 150e; 2) locating the remote object 170 that will execute the remote method call; and, 3) passing the method call to the remote object's skeleton 177.
The remote object's skeleton 177, analogously with the function of the stub 174, “behaves” from the perspective of the remote object 170 as a calling object that is local to the remote object 170 should behave. As such, the skeleton 177 provides method calls to the remote object 170 in a format that a calling object local to the remote object 170 would provide them; and, accepts return values from the remote object 170 in the same format that a calling object local to the remote object 170 would accept them.
When the remote object 170 receives the method call it executes the called method and responds with a return value that is received by the skeleton 177. The return value is then embedded in a “response” which is passed over the network 150e (e.g., via an exchange 178 between client-side and server-side object request broker functions 175, 176), forwarded to the stub 174 and then to the calling object 169.
Various types of technologies for invoking remote method calls exist that have, at least to some degree, features of the functional model discussed just above. Some of these include, for instance, Common Object Request Broker Architecture (CORBA), Internet-Inter ORB Protocol (IIOP), Remote Method Invocation (RMI), and RMI-P4 (which is SAP corporation's version of RMI that approximately follows the model presented in
Another type of remote calling approach, referred to as “dynamic invocation”, does not use a stub and instead incorporates a specific interface to the object request brokering function that the calling object 169 must comply with.
A method is described that involves establishing a connection over a shared memory between a connection manager and a worker node. The shared memory is accessible to multiple worker nodes. Then sending, from the connection manager to the worker node over the connection, a first request containing a method call to a remote object on the worker node. Also sending, from the connection manager to the worker node over the connection, a second request containing a second method call to a second remote object on the worker node.
The present invention is illustrated by way of example and not limitation in the figures of the accompanying drawings, in which like references indicate similar elements and in which:
a shows a prior art application server;
b shows a more detailed depiction of the J2EE worker nodes of
c shows a request/response cycle for a non distributed computing session;
d shows a request/response cycle for a distributed computing session;
e shows a model for implementing a distributed computing session;
a and 3b show a session request and response methodology that can be performed by the improved system of
Comparing
Secondly, the role of a shared memory has been expanded to at least include: a) a first shared memory region 250 that supports request/response data transfers not only for the proprietary suite 203 but also the standards based software suite 204; b) a second shared memory region 260 that stores session objects having “low level” session state information (i.e., information that pertains to a request's substantive response such as the identity of a specific servlet invoked through a particular web page); and, c) a third shared memory region 270 that stores “high level” session state information (i.e., information that pertains to the flow management of a request/response pair within the application server (e.g., the number of outstanding active requests for a session)). In an implementation, as described in more detail below, shared memory region 260 is a “shared closure” shared memory region that is used not only to store objects is shared closure form having “low level” session state information, but also, objects in shared closure form that implement J2EE application software generally. As such, memory region 260 is much larger than memory region 270.
Third, request notification queues 212 Q1 through QM, one queue for each of the worker nodes 2091 through 209M has been implemented within the standards-based software suite 204. As will be described in more detail below, the shared memory structures 250, 260, 270 and request notification queues 212 help implement a fast session fail over protection mechanism in which a session that is assigned to a first worker node can be readily transferred to a second worker node upon the failure of the first worker node.
Shared memory is memory whose stored content can be reached by multiple worker nodes. Here, the contents of each of the shared memory regions 250, 260 and 270 can be reached by each of worker nodes 2091 through 209M. Different types of shared memory technologies may be utilized within the application server 200 and yet still be deemed as being a shared memory structure. For example, shared memory region 250 may be implemented within a “connection” oriented shared memory technology, while shared memory region 260 may be implemented with a “shared closure” oriented shared memory technology. A more thorough discussion of these two different types of shared memory implementations is provided in more detail below in section 3.0 entitled “Implementation Embodiment of Request/Response Shared Memory” and section 4.0 entitled “Implementation Embodiment of Shared Closure Based Shared Memory”.
The connection oriented request/response shared memory region 250 effectively implements a transport mechanism for request/response data between the connection manager and the worker nodes. That is, because the connection manager is communicatively coupled to the shared memory, and because shared memory contents can be made accessible to each worker node, the request/response shared memory 250—at perhaps its broadest level of abstraction—is a mechanism for transporting request/response data between the connection manager and the applicable worker node(s) for normal operation sessions (i.e., no worker node failure) as well as those sessions affected by a worker node crash.
Although the enhancements of the application server 200 of
In operation, the connection manager 202 forwards actual request data to the first shared memory region 250 (request/response shared memory 250) irregardless of whether the request is to be processed by one of the proprietary worker nodes 207 or one of the standards based worker nodes 204. Likewise, the connection manager 202 receives response data for a request from the request/response shared memory 250 irregardless if the response was generated by a proprietary worker node or a standards based worker node. With the exception of having to share the request/response shared memory 250 with the worker nodes 209 of the standards-based software suite 204, the operation of the proprietary suite 203 is essentially the same as that described in the background.
That is, the connection manager 202 forwards request notifications to the proprietary dispatcher 205 and forwards the actual requests to the request/response shared memory 250. The proprietary dispatcher 205 then identifies which one of the proprietary worker nodes 207 is to handle the request. The identified worker node subsequently retrieves the request from the request/response shared memory 250, processes the request and writes the response into the request/response shared memory 250. The response is then forwarded from the request/response shared memory 250 to the connection manager 202 who forwards the response to the client via network 201.
a and 3b show an improved session handling flow that is used within the standards based software suite 204 of the improved application server 200 of
Then, the dispatcher 308 for the standards-based software suite is invoked. For purposes of the present discussion it is sufficient to realize that the dispatcher 308: 1) accesses and updates at 1 “high level” state information 3701 for the request's session in the shared memory session table 370 (hereinafter, referred to as session table 370); 2) determines which one 309 of the M worker nodes should handle the newly arrived request; and 3) submits at 2 the request 3221 into the request/response shared memory 350 and submits at 3 a request notification 3201 for the request 3221 into a request notification queue Q1 that is associated with the worker node 309 identified by the dispatching algorithm. For ease of drawing,
In an embodiment, there is an entry in the session table 370 for each session being supported by the M worker nodes. If the received request is for a new session (i.e., the received request is the first request of the session), the dispatcher process 308 will create at 1 a new entry 3701 in the session table 370 for the new session and assign at 2 one of the M worker nodes to handle the session based on a load balancing algorithm. By contrast, if the received request pertains to an already existing session, the dispatcher process 308 will access at 1 the already existing entry 3701 for the session and use the information therein to effectively determine the proper worker node to handle the request as well as update at 1 the session table entry 3701. In an embodiment, in the case of an already existing session, the determination of the proper worker node may or may not involve the execution of a load balancing algorithm.
In an embodiment, the following items are associated with each session table entry 3701: 1) a “key” used to access the session table entry 3701 itself (e.g., session key “SK1”); 2) an active request count (ARC) that identifies the total number of requests for the session that have been received from network 301 but for which a response has not yet been generated by a worker node; 3) an identifier of the worker node 309 that is currently assigned to handle the session's requests (e.g., “Pr_Idx”, which, in an embodiment, is the index in the process table of the worker node that is currently assigned to handle the session's requests); and, 4) some form of identification of the request notification queue (Q1) that provides request notifications to the worker node 309 identified in 3) above.
In a further embodiment, each entry in the session table 370 further includes: 1) a flag that identifies the session's type (e.g., in an implementation, the flag can indicate a “distributed” session (which is a session that permits the handling of its requests by different worker nodes over the course of its regular operation), a “sticky” session (which is a session whose requests are handled by only one worker node over the normal course of its operation), or a “corrupted” session (which is a session that has suffered some kind of problem that cannot be corrected); 2) a timeout value that indicates the maximum amount of time a request can remain outstanding, that is, waiting for a response; 3) the total number of requests that have been received for the session; 4) the time at which the session entry was created; and, 5) the time at which the session entry was last used.
For each request, whether a first request of a new session or a later request for an already established session, the dispatcher's dispatching algorithm 308 increments the ARC value and at 8 places a “request notification” RN_13201, into the request notification queue Q1 that feeds request notifications to the worker node 309 that is to handle the session. The request notification RN_1 contains both a pointer to the request data RQD_13221 in the request/response shared memory and the session key SK1 in the session table entry for the session.
The pointer is generated by that portion of the connection manager 302 that stores the request data RQD_13221 into the request/response shared memory 350 and is provided to the dispatcher 308. The pointer is used by the worker node 309 to fetch the request data RQD_13221 from the request/response shared memory 350, and, therefore, the term “pointer” should be understood to mean any data structure that can be used to locate and fetch the request data. The session key (or some other data structure in the request notification RN_1 that can be used to access the session table entry 3701 for the session) is used by the worker node 309 to decrement the ARC counter to indicate the worker node 309 has fully responded to the request.
As will be described in more detail below in section 3.0 entitled “Implementation Embodiment of Request/Response Shared Memory”, according to a particular implementation, the request/response shared memory 350 is connection based. Here, a connection is established between the targeted (assigned) worker node 309 and the connection manager 302 through the request/response shared memory 350 for each request/response cycle that is executed in furtherance of a particular session; and, a handle for a particular connection is used to retrieve a particular request from the request/response shared memory 350 for a particular request/response cycle. According to this implementation, the pointer in the request notification RN is the “handle” for the shared memory 350 connection that is used to fetch request data RQD_13221.
In the case of a first request for a new session, the dispatcher 308 determines which worker node should be assigned to handle the session (e.g., with the assistance of a load balancing algorithm) and places the identity of the worker node's request notification queue (Q1) into a newly created session table entry 3701 for the session along with some form of identification of the worker node itself (e.g., “Pr_Idx”, the index in the process table of the worker node that is currently assigned to handle the session's requests). For already existing sessions, the dispatcher 308 simply refers to the identify of the request notification queue (Q1) in the session's session table entry 3701 in order to understand which request notification queue the request notification RN should be entered into.
In a further embodiment, a single session can entertain multiple “client connections” over its lifespan, where, each client connection corresponds to a discrete time/action period over which the client engages with the server. Different client connections can therefore be setup and torn down between the client and the server over the course of engagement of an entire session. Here, depending on the type of client session, for example in the case of a “distributed” session (described in more detail further below), the dispatcher 308 may decide that a change should be made with respect to the worker node that is assigned to handle the session. If such a change is to be made the dispatcher 308 performs the following within the entry 3701 for the session: 1) replaces the identity of the “old” worker node with the identity of the “new” worker node (e.g., a “new” Pr_Idx value will replace an “old” Pr_Idx value); and, 2) replaces the identification of the request notification queue for the “old” worker node with an identification of the request notification queue for the “new” worker node.
In another embodiment, over the course a single session and perhaps during the existence of a single client connection, the client may engage with different worker node applications. Here, a different entry in the session table can be entered for each application that is invoked during the session. As such, the level of granularity of a session's management is drilled further down to each application rather than just the session as a whole. A “session key” (SK1) is therefore generated for each application that is invoked during the session. In an embodiment, the session key has two parts: a first part that identifies the session and a second part that identifies the application (e.g., numerically through a hashing function).
Continuing then with a description of the present example, with the appropriate worker node 309 being identified by the dispatcher 308, the dispatcher 308 concludes with the submission at 2 of the request RQD_13221 into the request/response shared memory 350 and the entry at 3 of a request notification RN_13201 into the queue Q1 that has been established to supply request notifications to worker node 309. The request notification RN_13201 sits in its request notification queue Q1 until the targeted worker node 309 foresees an ability (or has the ability) to process the corresponding request 3221. Recall that the request notification RN_13201 includes a pointer to the request data itself RQD_13221 as well as a data structure that can be used to access the entry 3701 in the session table (e.g., the session key SK1).
Comparing
When the targeted worker node 309 foresees an ability to process the request 3221, it looks to its request notification queue Q1 and retrieves at 4 the request notification RN_13201 from the request notification queue Q1.
The targeted worker node 309 also assumes control of one or more “session” objects S13232 used to persist “low level” session data. Low level session data pertains to the request's substantive response rather than its routing through the application server. If the request is the first request for a new session, the targeted worker node 309 creates the session object(s) S13232 for the session; or, if the request is a later request of an existing session, the targeted worker node 309 retrieves 6 previously stored session object(s) S13231 from the “shared closure” memory region 360 into the targeted worker node 3232. The session object(s) S1 may 3231 be implemented as a number of objects that correspond to a “shared closure”. A discussion of shared closures and an implementation of a shared closure memory region 360 is provided in more detail further below in section 4.0 entitled “Implementation Embodiment of Shared Closure Based Shared Memory”.
With respect to the handling of a new session, the targeted worker node 309 generates a unique identifier for the session object(s) S1323 according to some scheme. In an embodiment, the scheme involves a random component and an identifier of the targeted worker node itself 309. Moreover, information sufficient to identify a session uniquely (e.g., a sessionid parameter from a cookie that is stored in the client's browser or the URL path of the request) is found in the header of the request RQD_13222 whether the request is the first request of a new session or a later requests of an existing session. This information can then be used to fetch the proper session object(s) S1323 for the session.
b depicts the remainder of the session handling process. With the targeted worker node 309 having the request RQD_13222 and low level session state information via session object(s) S13232, the request is processed by the targeted worker node 309 resulting in the production of a response 324 that is to be sent back to the client. The worker node 309 writes at 7 the response 324 into the response/request shared memory 350; and, if a change to the low level session state information was made over the course of generating the response, the worker node 309 writes at 8 updated session object(s) into the shared closure memory 360. Lastly, the worker node 309 decrements at 9 the ARC value in the session table entry 3701 to reflect the fact that the response process has been fully executed from the worker node's perspective and that the request has been satisfied. Here, recall that a segment of the request notification RN_13202 (e.g., the session key SK1) can be used to find a “match” to the correct entry 3701 in the session table 370 in order to decrement of the ARC value for the session.
In reviewing the ARC value across
After the response 324 is written at 7 into the request/response shared memory 350, it is retrieved at 10 into the connection manager 302 which then sends it to the client over network 301.
Recall from above that according to a particular implementation, the request/response shared memory 250 has a connection oriented architecture. Here, a connection is established between the targeted worker node and the connection manager across the request/response shared memory 350 for each request/response cycle between the connection manager and a worker node. Moreover, a handle to a particular connection is used to retrieve a particular request from the request/response shared memory.
The connection oriented architecture allows for easy session handling transfer from a crashed worker node to a new worker node because the routing of requests to a new targeted worker node is accomplished merely by routing the handle for a specific request/response shared memory connection to the new worker node. That is, by routing the handle for a request/response shared memory connection to a new worker node, the new worker node can just as easily “connect” with the connection manager to obtain a request as the originally targeted (but now failed) worker node. Here, the “pointer” contained by the request notification is the handle for the request's connection.
In a further embodiment, referring to
Above the FCA level 402 is the jFCA level 403. The jFCA level 403 is essentially an API used by the Java worker nodes and relevant Java parts of the connection manager to access the FCA level 402. In an embodiment, the jFCA level is modeled after standard Java Networks Socket technology. At the worker node side, however, a “jFCA connection” is created for each separate request/response cycle through request/response shared memory; and, a “jFCA queue” is created for each request notification queue. Thus, whereas a standard Java socket will attach to a specific “port” (e.g., a specific TCP/IP address), according to an implementation, the jFCA API will establish a “jFCA queue” that is configured to implement the request notification queue of the applicable worker node and a “jFCA connection” for each request/response cycle.
Here, an instance of the jFCA API includes the instance of one or more objects to: 1) establish a “jFCA queue” to handle the receipt of request notifications from the worker node's request notification queue; 2) for each request notification, establishing a “jFCA connection” over request/response shared memory with the connection manager so that the corresponding request from the request/response shared memory can be received (through the jFCA's “InputStream”); and, 3) for each received request, the writing of a response back to the same request/response shared memory connection established for the request (through the jFCA's “OutputStream”).
In the outbound direction (i.e., from the worker node to the connection manager), in an embodiment, the same jFCA connection that is established through the request/response shared memory between the worker node and the connection manager for retrieving the request data is used to transport the response back to the connection manager.
In a further embodiment, a service (e.g., an HTTP service) is executed at each worker node that is responsible for managing the flow of requests/responses and the application(s) invoked by the requests sent to the worker node. In a further embodiment, in order to improve session handling capability, the service is provided its own “dedicated thread pool” that is separate from the thread pool that is shared by the worker node's other applications. By so-doing, a fixed percentage of the worker node's processing resources are allocated to the service regardless of the service's actual work load. This permits the service to immediately respond to incoming requests during moments of light actual service work load and guarantees a specific amount of performance under heavy actual service workload.
According to one implementation, each thread in the dedicated thread pool is capable of handling any request for any session. An “available” thread from the dedicated thread pool listens for a request notifications arriving over the jFCA queue. The thread services the request from the jFCA queue and establishes the corresponding jFCA connection with the handler associated with the request notification and reads the request from request/response shared memory. The thread then further handles the request by interacting with the session information associated with the request's corresponding session.
Each worker node may have its own associated container(s) in which the service runs. A container is used to confine/define the operating environment for the application thread(s) that are executed within the container. In the context of J2EE, containers also provide a family of services that applications executed within the container may use (e.g., (e.g., Java Naming and Directory Interface (JNDI), Java Database Connectivity (JDBC), Java Messaging Service (JMS) among others).
Different types of containers may exist. For example, a first type of container may contain instances of pages and servlets for executing a web based “presentation” for one or more applications. A second type of container may contain granules of functionality (generically referred to as “components” and, in the context of Java, referred to as “beans”) that reference one another in sequence so that, when executed according to the sequence, a more comprehensive overall “business logic” application is realized (e.g., stringing revenue calculation, expense calculation and tax calculation components together to implement a profit calculation application).
Recall from the Background in the discussion pertaining to
According to the depiction of
In order to concurrently execute a comparable number of application threads as the prior art worker nodes 109 of
Thus, for example, if the prior art worker nodes 109 of
Here, the prior art worker nodes 109 instantiate one virtual machine per CPU while the improved worker nodes 509 of
Recall from the discussion of
Thus, whereas the prior art worker nodes 109 of
According to an object oriented approach where each of virtual machines 123, 223, . . . M23 does not have visibility into the local memories of the other virtual machines, specific rules are applied that mandate whether or not information is permitted to be stored in shared memory 560. Specifically, to first order, according to an embodiment, an object residing in shared memory 560 should not contain a reference to an object located in a virtual machine's local memory because an object with a reference to an unreachable object is generally deemed “non useable”.
That is, if an object in shared memory 560 were to have a reference into the local memory of a particular virtual machine, the object is essentially non useable to all other virtual machines; and, if shared memory 560 were to contain an object that was useable to only a single virtual machine, the purpose of the shared memory 560 would essentially be defeated.
In order to uphold the above rule, and in light of the fact that objects frequently contain references to other objects (e.g., to effect a large process by stringing together the processes of individual objects; and/or, to effect relational data structures), “shareable closures” are employed. A “closure” is a group of one or more objects where every reference stemming from an object in the group that references another object does not reference an object outside the group. That is, all the object-to-object references of the group can be viewed as closing upon and/or staying within the confines of the group itself. Note that a single object without any references stemming from can be viewed as meeting the definition of a closure.
If a closure with a non shareable object were to be stored in shared memory 560, the closure itself would not be shareable with other virtual machines, which, again, defeats the purpose of the shared memory 560. Thus, in an implementation, in order to keep only shareable objects in shared memory 560 and to prevent a reference from an object in shared memory 560 to an object in a local memory, only “shareable” (or “shared”) closures are stored in shared memory 560. A “shared closure” is a closure in which each of the closure's objects are “shareable”.
A shareable object is an object that can be used by other virtual machines that store and retrieve objects from the shared memory 560. As discussed above, in an embodiment, one aspect of a shareable object is that it does not possess a reference to another object that is located in a virtual machine's local memory. Other conditions that an object must meet in order to be deemed shareable may also be effected. For example, according to a particular Java embodiment, a shareable object must also posses the following characteristics: 1) it is an instance of a class that is serializable; 2) it is an instance of a class that does not execute any custom serializing or deserializing code; 3) it is an instance of a class whose base classes are all serializable; 4) it is an instance of a class whose member fields are all serializable; 5) it is an instance of a class that does not interfere with proper operation of a garbage collection algorithm; 6) it has no transient fields; and, 7) its finalize ( ) method is not overwritten.
Exceptions to the above criteria are possible if a copy operation used to copy a closure into shared memory 560 (or from shared memory 560 into a local memory) can be shown to be semantically equivalent to serialization and deserialization of the objects in the closure. Examples include instances of the Java 2 Platform, Standard Edition 1.3 java.lang.String class and java.util.Hashtable class.
A container is used to confine/define the operating environment for the application thread(s) that are executed within the container. In the context of J2EE, containers also provide a family of services that applications executed within the container may use (e.g., (e.g., Java Naming and Directory Interface (JNDI), Java Database Connectivity (JDBC), Java Messaging Service (JMS) among others).
Different types of containers may exist. For example, a first type of container may contain instances of pages and servlets for executing a web based “presentation” for one or more applications. A second type of container may contain granules of functionality (generically referred to as “components” and, in the context of Java, referred to as “beans”) that reference one another in sequence so that, when executed according to the sequence, a more comprehensive overall “business logic” application is realized (e.g., stringing revenue calculation, expense calculation and tax calculation components together to implement a profit calculation application).
Referring back to
By contrast, also as described above, recall that each of the request notification queues 212 is specifically associated with a particular worker node and is “on-going”. That is, each queue is a more permanent connection that may exist, for instance, as long as both the connection manager 202 and its corresponding worker node are “up and running”.
According to a further implementation, request/response data for “distributed computing” sessions (e.g., those implemented according to any one of the following protocols: CORBA, IIOP, RMI, RMI-P4, RMI/IIOP, etc.) are passed through more permanent connections established through the request/response shared memory 250—like those used to implement the request notification queues 212. As such, rather than setting up and tearing down a request/response shared memory 250 connection for each request/response cycle (as in the case of HTTP sessions as described above), distributing computing request/response data is sent through a quasi-permanent connection that has been established through the request/response shared memory 250 between the connection manager 202 and the affected worker node.
Thus (recalling the discussion provided in the background of
Here, the cluster 600 is communicatively coupled to the external clients (not shown in
There may also exist request/response cycles between application servers 604 and 605 as well. In these instances, which server is the “client” and which server is the “server” depends on which server issues the request and which server issues the response. Specifically, for any request/response cycle between a pair of computing systems that are both primarily used as servers (such as a pair of application servers) the server that sends the request is deemed “the client” and the server that sends the response to the request is deemed “the server”. Flow 611 is meant to depict request/response cycles between servers 604 and 605.
Referring to
By contrast, within application server 604, connections 6201 through 620M correspond to quasi-permanent connections that have been established between connection manager 608 and worker nodes 6191 through 619M, respectively, for the handling of any “distributed computing” sessions that the application software running on worker nodes 6191 through 619M engage in. For example, certain software applications running on worker node 6191 may engage in a plurality of different distributed computing sessions over time. The request/response data for each of these sessions will flow through connection 6201.
Similarly, within application server 605, connections 6211 through 621M correspond to quasi-permanent connections that have been established between connection manager 609 and worker nodes 6291 through 629M, respectively, for the handling of any “distributed computing” sessions that the application software running on worker nodes 6291 through 629M engage in.
A reason for implementing distributed computing sessions with quasi-permanent connections as described above (instead of “per request/response cycle” connections as in the case of HTTP sessions), is that, from the perspective of one of servers 604, 605, the server: 1) generates and receives session requests for distributed computing sessions (e.g., with the other one of the servers); while, 2) mostly receives session requests for non distributed computing sessions (e.g., HTTP sessions with clients coupled to network 601).
Because of the bi-directional nature of request/response flows within the server for distributed computing sessions (server generates as well as receives session requests), as opposed to the unidirectional request/response flows within the server for HTTP sessions (server primarily receives session requests), by making connections 6201 through 620M and 6211 through 621M quasi permanent, significant worker node resources are not wasted executing connection setup procedures across the request/response shared memory for distributed computing sessions.
Moreover, when different software programs are engaged in a session there tends to be more tolerance (e.g., from the perspective of an end user) if the session is slow or dropped than when different pieces of the same software program are engaged in a session that is slow or dropped. By making connections 6201 through 620M and 6211 through 621M quasi permanent, shared memory resources are quasi-permanently reserved for the carrying out of distributed computing sessions which should result in less delay and/or blocking of these sessions.
Further still, the lifetime of distributed computing sessions tend to be very long (because they tend to be very active when setup), and, they tend to be “bi-directional” in the sense that either broker is capable of generating a request for the other broker (whereas non-distributed computing sessions tend to use a strict “client-server” model in which only one end of the connection generates responses and only the other end of the connection generates requests. Rather than cause a new connection to be established for each request/response cycle where the direction of the request and the direction of the response is a concern, a quasi-permanent bi-directional connection is better suited for distributed computing sessions.
Eve further, at least some distributed computing protocols (e.g., IIOP and RMI-P4) permit request and/or response data from different sessions (e.g., involving different clients) to be sent over a same connection over a network (e.g., network 601, network 610). Instantiating a quasi-permanent connection through shared memory to a worker node for “all” distributed computing session data is harmonious with this approach because incoming and/or outgoing traffic for multiple sessions to/from a worker node will simply “flow” from a network connection through the shared memory into the worker node; and/or, from the worker node through the shared memory and into a network connection.
Another feature observed in
Thus, the connection managers 608, 609 of cluster 600 could collectively support a situation in which a first HTTP session is being handled by server 604 (e.g., via flow 606) and a second HTTP session is being handled by server 605 (e.g., via flow 607), and, servers 604 and 605 are engaged in a distributed computing session (e.g., via flow 611).
For example, if worker node 6191 is handling both the HTTP session and distributed computing session for server 604, connection 613 can be viewed as corresponding to the request/response shared memory connection that is established for a particular request/response cycle of the HTTP session; and, connection 6201 can be viewed as the quasi-permanent request/response shared memory connection used for handling worker node 6191's distributed computing sessions such as the distributed computing session that servers 604 and 605 are engaged in.
Likewise, if worker node 6291 is handling both the HTTP session and distributed computing session for server 605, connection 614 can be viewed as corresponding to the request/response shared memory connection that is established for a particular request/response cycle of the HTTP session; and, connection 6211 can be viewed as the quasi-permanent request/response shared memory connection used for handling worker node 6291's distributed computing sessions such as the distributed computing session that servers 604 and 605 are engaged in.
For example, in the case of
Conceivably, a plug-in could be developed for each of the major non distributed computing request/response session protocols (such as HTTP and HTTPS), and, a plug-in could be developed for each of the major distributed computing system request/response session protocols (e.g., CORBA, IIOP, RMI, RMI/IIOP, RMI-P4, etc.). Plug-ins are also blocks of code that can be individually integrated into the connection manager 708. Here, according to one embodiment, the connection manager 708 is designed to have a specific type of interface/API through which it communicates with its various plug-ins. By designing plug-ins to communicate over this interface, the specific combination of plug-ins to be installed in the connection manager need not be defined until deployment time.
Generic tasks that can be applied to all incoming packets are performed by the connection manager 708 as a whole. For example, in an embodiment, in the case of inbound packets (that contain a request in the case of non distributed computing sessions; or, a request or a response in the case of distributed computing sessions), the connection manager 708 manages the queuing of inbound request packets and characterizes each received packet as pertaining to a specific type of protocol (e.g., HTTP, RMS, IIOP, etc.). The packet is then passed to the proper plug-in for processing.
In a further implementation, lower layer communication protocols that are generically applied across all packets irrespective of any specific type of request/response protocol that is to be applied to the packets individually, such as the Transmission Control Protocol (TCP) and/or Internet Protocol (IP) may be performed by the connection manager 708 as well.
The client side object request brokering function on the client side may include various tasks such as any one or more of the following: 1) construction of a request packet data structure (that includes a method call to a remote object) consistently with a specific distributed computing system protocol that the plug-in corresponds to (e.g., CORBA, IIOP, RMI, RMI/IIOP, RMI-P4, etc.); 2) serialization of a request packet data structure if permitted/mandated by the specific distributed computing system protocol; 3) marshalling of data format type from that used on the worker node 819 to that used by the server side worker node and/or the distributed computing session communication protocol that is executed between the client side and server side.
In another“client-side” implementation, the object request brokering function is essentially split such that a first portion of the object request brokering function is executed by the connection manager 808 and a second portion of the object request brokering function is executed by the worker node 819. According to a further implementation, the first portion mentioned above includes the transport layer tasks for the distributed computing session and the second portion mentioned above includes the data marshalling tasks for the distributed computing session.
The worker node portion of the object request brokering function 976_2 communicates to the plug-in 901 over the quasi-permanent connection 920 established through the request/response memory 950. Here, as observed in
Any of the servers described above may be Java 2 Enterprise Edition (“J2EE”) server nodes which support Enterprise Java Bean (“EJB”) components and EJB containers (at the business layer) and Servlets and Java Server Pages (“JSP”) (at the presentation layer). Of course, other embodiments may be implemented in the context of various different software platforms including, by way of example, Microsoft .NET, Windows/NT, Microsoft Transaction Server (MTS), the Advanced Business Application Programming (“ABAP”) platforms developed by SAP AG and comparable platforms.
Processes taught by the discussion above may be performed with program code such as machine-executable instructions which cause a machine (such as a “virtual machine”, a general-purpose processor disposed on a semiconductor chip or special-purpose processor disposed on a semiconductor chip) to perform certain functions. Alternatively, these functions may be performed by specific hardware components that contain hardwired logic for performing the functions, or by any combination of programmed computer components and custom hardware components.
An article of manufacture may be used to store program code. An article of manufacture that stores program code may be embodied as, but is not limited to, one or more memories (e.g., one or more flash memories, random access memories (static, dynamic or other)), optical disks, CD-ROMs, DVD ROMs, EPROMs, EEPROMs, magnetic or optical cards or other type of machine-readable media suitable for storing electronic instructions. Program code may also be downloaded from a remote computer (e.g., a server) to a requesting computer (e.g., a client) by way of data signals embodied in a propagation medium (e.g., via a communication link (e.g., a network connection)).
It is believed that processes taught by the discussion above can be practiced within various software environments such as, for example, object-oriented and non-object-oriented programming environments, Java based environments (such as a Java 2 Enterprise Edition (J2EE) environment or environments defined by other releases of the Java standard), or other environments (e.g., a .NET environment, a Windows/NT environment each provided by Microsoft Corporation).
In the foregoing specification, the invention has been described with reference to specific exemplary embodiments thereof. It will, however, be evident that various modifications and changes may be made thereto without departing from the broader spirit and scope of the invention as set forth in the appended claims. The specification and drawings are, accordingly, to be regarded in an illustrative rather than a restrictive sense.
Number | Name | Date | Kind |
---|---|---|---|
5497463 | Stein et al. | Mar 1996 | A |
5745703 | Cejtin et al. | Apr 1998 | A |
6223202 | Bayeh | Apr 2001 | B1 |
6401109 | Heiney et al. | Jun 2002 | B1 |
6687702 | Vaitheeswaran et al. | Feb 2004 | B2 |
6766515 | Bitar et al. | Jul 2004 | B1 |
7127713 | Davis et al. | Oct 2006 | B2 |
7177823 | Lam et al. | Feb 2007 | B2 |
7191170 | Ganguly et al. | Mar 2007 | B2 |
7251815 | Donovan et al. | Jul 2007 | B2 |
7305495 | Carter | Dec 2007 | B2 |
7421702 | Margulis et al. | Sep 2008 | B1 |
7444536 | Jairath | Oct 2008 | B1 |
7735097 | Kovachka-Dimitrova et al. | Jun 2010 | B2 |
20020174097 | Rusch et al. | Nov 2002 | A1 |
20020198923 | Hayes | Dec 2002 | A1 |
20030037178 | Vessey et al. | Feb 2003 | A1 |
20030046441 | Rau et al. | Mar 2003 | A1 |
20030135568 | Kim et al. | Jul 2003 | A1 |
20030204645 | Sharma et al. | Oct 2003 | A1 |
20040133691 | Shimada | Jul 2004 | A1 |
20050044551 | Sodhi | Feb 2005 | A1 |
20050086237 | Monnie et al. | Apr 2005 | A1 |
20050155011 | Heik et al. | Jul 2005 | A1 |
20050188055 | Saletore | Aug 2005 | A1 |
20050188068 | Kilian | Aug 2005 | A1 |
20050246717 | Poole et al. | Nov 2005 | A1 |
20060130063 | Kilian et al. | Jun 2006 | A1 |
20060143608 | Dostert et al. | Jun 2006 | A1 |
20060143619 | Galchev et al. | Jun 2006 | A1 |
20060282509 | Kilian et al. | Dec 2006 | A1 |
20070027877 | Droshev et al. | Feb 2007 | A1 |
20070027896 | Newport et al. | Feb 2007 | A1 |
Number | Date | Country | |
---|---|---|---|
20070055781 A1 | Mar 2007 | US |