|Publication number||US7584418 B2|
|Application number||US 09/872,589|
|Publication date||Sep 1, 2009|
|Filing date||May 31, 2001|
|Priority date||May 31, 2001|
|Also published as||CA2448613A1, CA2448613C, EP1405195A1, EP1405195A4, EP2101270A2, EP2101270A3, EP2101270B1, US20020194211, WO2002097647A1|
|Publication number||09872589, 872589, US 7584418 B2, US 7584418B2, US-B2-7584418, US7584418 B2, US7584418B2|
|Inventors||Sowmya Subramanian, Ramu Sunkara, Kunal Kapur, Anthony Lai, Sarim Siddiqui, Sunny Wong, Hyun-Sik Byun|
|Original Assignee||Oracle International Corporation|
|Export Citation||BiBTeX, EndNote, RefMan|
|Patent Citations (22), Non-Patent Citations (13), Referenced by (2), Classifications (6), Legal Events (4)|
|External Links: USPTO, USPTO Assignment, Espacenet|
The present invention relates to the field of computer systems. More particularly, the invention relates to a method and system for prefabricating information in a computer system.
Many computer applications obtain and display information to users. For example, a web browser is a specially configured application for retrieving and displaying web pages. When the user of a web browser indicates a desire to view a particular page of information, the browser or its supporting hardware/software components on the user station performs actions to create and send an information request to the location of the information. The information request is sent across the network to the location of the information, is serviced at the remote location to create/send the requested information, which is then returned to the local user station for viewing. In a multi-tier architecture, the information request may be directed to a middle tier web server, which in turn handles the requesting, retrieval, and packaging of information from one or more back-end data servers. Such information retrieval and display actions are relevant to many networked computer applications, such as distributed database applications.
To illustrate, consider a typical user's home page that is established on a web portal site. A portion of the home page may be configured to display the latest prices for stocks owned by the user and a summary of the value of the user's stock portfolio. Other portions of the home page can be configured to display other types of information, such as news, weather, etc. When the user's browser requests the home page, a page request is sent to a web server having the responsibility for retrieving relevant items of information on the home page from one or more back-end data servers (e.g., stock price information from a database server), processing the data if necessary (e.g., to calculate stock portfolio values for the user), and packaging the page information into a designated page format for display.
In conventional computer systems, there is always an inherent delay associated with this process of “fabricating” a page of information. Each information request could involve multiple network roundtrips that consume a given quantity of time. Substantial delays may also occur because of large information items that must be retrieved or downloaded across the network. The information request may involve database processing at a back-end data server, causing more delays. In addition, once all the information is collected, it may have to be rendered or packaged into a specific format, causing yet more delays. These delays could significantly affect the performance or usability of a computer application. In modern business environments, such delays could contribute to unacceptable productivity losses for computer users.
Therefore, it is an object of the invention to provide a method and system for increasing response speeds and reducing response times to user requests for information.
The present invention provides a method and system for prefabricating information, in which the necessary steps to retrieve and package information requested by a user are preemptively performed by the computer system. When the user later makes an explicit request for information, the desired information can be immediately displayed to the user without the delays associated with contemporaneous retrieval and packaging of the information.
In one embodiment, the invention comprises a prefabricator that generates prefabrication requests. The prefabrication requests are processed to create and store prefabricated information. An interceptor receives information requests from users, and provides the prefabricated information in response to the information requests. The prefabrication components of the invention can be non-intrusively used with any existing computer application and without requiring installation of any additional hardware components.
The prefabrication system of the invention can be configured to automatically tune its processing to the changing conditions that exist in the computer system. This permits the prefabrication process to take full advantage of any excess resources available in the system during periods of low resource usage, by automatically increasing the prefabrication workload. During periods of high resource usage, the prefabrication workload is automatically lowered to minimize any harmful effects upon other run-time work being performed by the system.
The present invention can be scalably deployed to perform coordinated prefabrication services on multiple, distributed computing nodes. According to an embodiment of the invention in a multi-node environment, any number of prefabricator instances can be configured to perform prefabrication functions on separate network nodes. Each prefabricator instance handles its allocated portion of the prefabricated information, and stores the prefabricated information in a network accessible storage device. When a user makes an information request, any of the nodes within the prefabrication framework can determine if the requested information has been prefabricated, and retrieve the prefabricated information for the user. By intelligently distributing the workload across multiple nodes, the system resources in all prefabricator nodes can be optimally harnessed and dynamically tuned. Regardless of the quantity of prefabrication workload that is assigned to a given node, all nodes equally participate in the benefits of prefabricated information, since all prefabricated information, even information prefabricated by other nodes, are universally accessible from networked storage devices.
An embodiment of the invention provides a method to manage session security for prefabrication services. The interceptor in this embodiment is configured to verify the validity of session ID values for users. If the user makes an information request that can be satisfied with prefabricated information, then the interceptor provides the prefabricated information with the valid session ID for the user attached to the information.
Further details of aspects, objects, and advantages of the invention are described below in the detailed description, drawings, and claims.
The accompanying drawings are included to provide a further understanding of the invention and, together with the Detailed Description, serve to explain the principles of the invention.
The present invention takes the form of a method and system for prefabricating information, in which the necessary steps to retrieve and package information requested by a user are preemptively performed by the computer system—before the user makes an explicit information request. Instead, an embodiment of the invention predictively identifies and prefabricates information that may be displayed to the user in the future. When the user later makes a request for information, the desired information can be immediately displayed to the user without the delays associated with contemporaneous retrieval and packaging of the information. For the purposes of illustration, and not by way of limitation, the present explanation is made with respect to “pages” of information that are displayed to a user. It is noted, however, that other granularities of information may be prefabricated within the scope of the invention.
According to an embodiment, a set of prefabrication system components is deployed to prefabricate pages for a computer application. Referring to
An interceptor 108 is logically interposed between the user interface 102 and the computer application 104. When a page request is sent from user interface 102 to computer application 104, the interceptor 108 intercepts the page request to determine if a valid, prefabricated page exists that is responsive to the request. This determination is made by identifying whether the requested page had already been prefabricated and cached/stored in a storage device 112. Storage device 112 could be any device usable to store an accessible copy of the prefabricated page, such as a memory cache, a local disk drive, or a network file system (“NFS”) device.
If the requested page has already been prefabricated, then the page request is immediately fulfilled by retrieving the prefabricated page from the storage device 112 for display at the user interface 102. If the requested page has not already been prefabricated, then the page request is sent to the computer application 104 to be fulfilled by dynamically fabricating the requested page.
A prefabricator 110 identifies information pages to prefabricate. Configuration settings and/or heuristics may be employed to predictively determine which information pages should be prefabricated. For each of these identified pages, a page request is sent from the prefabricator service module 110 to the interceptor 108. The interceptor 108 sends these page requests to the computer application 104. Each of these page requests from the prefabricator 110 is processed by the computer application 104 to fabricate a requested information page. The process at the computer application 104 to respond to a page request could be the same, regardless of whether the page request originates from the prefabricator service module 110 or the user interface 102. However, information pages generated in response to prefabricated page requests from the prefabricator 110 are cached by the interceptor 108, e.g., at a storage device 112. In contrast, information pages dynamically fabricated in response to a current page request from the user interface 102 are immediately sent to the user interface 102 for display. These contemporaneously fabricated pages may also be cached by the interceptor 108 for later access.
The prefabrication components of the invention may be installed at any physical or logical location in the computer system. Physically, the interceptor and prefabricator components may be located, for example, at the physical locations of the user interface, the computer application, or at other network locations such as a middle-tier web server computer. Logically, the interceptor and prefabricator components can be installed anywhere in the computer system, and/or integrated into other system components. In an embodiment, the interceptor 108 is integrated into a middle-tier web server or is logically located before it to intercept all communications between a user interface/browser and any applications accessed by the user running on a back-end data server.
It is noted that the format of page requests made to the computer application 104 could remain the same, regardless of whether prefabrication is being performed in the system. The interceptor component is configured to distinguish between ordinary page requests from the user interface and page requests from the prefabricator component, and to route the fabricated page from the computer application accordingly. Thus, introducing prefabrication components into a computer system need not result in modifications to a computer application. Instead, the present invention may be employed to non-intrusively prefabricate pages for any computer application, without requiring any or significant modifications to the computer application, merely by interposing the interceptor component in the communications path (e.g., at a web server) between the computer application and its corresponding user interfaces.
To illustrate, the following sets forth an example of a set of prefabrication policy parameters for a computer application:
Referring back to
In operation, the prefabrication-enabled computer system filters page requests to intercept any page request that corresponds to a prefabricated page (208). If a pre-existing, valid prefabricated page responsive to the page request exists, then it is sent to the user for display (210). If the requested page does not exist or if the prefabricated page responsive to the page request is not valid, then the page request is sent to the computer application for contemporaneous fabrication (212). It is noted that prefabricated pages may be marked as being invalid under certain circumstances, e.g., if it becomes stale. The term “stale” refers to a prefabricated page in which the entire prefabricated page, or items of information located on the prefabricated page, is no longer considered to be valid. In one embodiment, staleness is based upon whether the creation/update time for a prefabricated page is within a threshold time period. A parameter can be established to determine the periodicity at which prefabricated pages should be created or updated to avoid staleness. Other approaches can also be used to establish staleness. For example, an alternate approach is based upon whether some or all of the information on the prefabricated page has been changed in a way that is relevant. Messaging can be used to determine whether some or all of the information on a prefabricated page has changed. The back-end database can send a message to the manager or location of the prefabricated page to indicate staleness. Alternatively, the cache server/prefabricator components can itself send a message to the back-end server to determine whether a prefabricated page is stale.
Page requests are sent to the interceptor service module 304 as Uniform Resource Locator (URL) requests. For user page requests, the interceptor service module 304 determines if the HTTP response for the requested URL has already been prefabricated and stored. The prefabricated HTTP responses are stored in a storage device 308.
If a valid, prefabricated HTTP response to the user requested URL is not available, then the URL request is dynamically processed by a Java servlet 316 to produce the desired HTTP response. The Java servlet 316 may access a database 312 to retrieve or process information associated with the URL. The HTTP response produced by the Java servlet 316 is routed to the browser 302 by the interceptor service module 304.
The prefabricator service module 310 accesses a set of prefabrication policies 314 to identify URLs that should be prefabricated. Prefabrication policies 314 can be stored at the database 312. Each URL identified to be prefabricated is sent as a prefabrication page request to the interceptor service module 304. The prefabricator URL requests are processed by one or more Java servlets 316 to produce the desired HTTP responses. The interceptor service module 304 distinguishes between HTTP responses from user page requests and HTTP responses from prefabricator page requests. The HTTP responses to prefabricator page requests produced by the Java servlet(s) 316 are stored in the storage device 308, before they are sent back to the prefabricator service module 310.
One or more PRBs are sent from the start loader 404 to the benefit analyzer 406, with each PRB corresponding to a separate page to prefabricate. The benefit analyzer 406 prioritizes the list of PRBs based upon prioritization parameters established in the prefabrication policies 402. Examples of prioritization parameters include available system resources, page fabrication times, user access patterns, and the page depth of a PRB page. The benefit analyzer also determines a preferred batch size to process the PRBs. Once the benefit analyzer has prioritized and generated a batched set of PRBs to process, the set of PRBs is sent to the page request feeder 408.
The page request feeder 408 receives PRBs from the Benefit Analyzer 406 and issues HTTP requests based upon the received PRBs. The HTTP requests for the PRBs are sent to the interceptor service module for processing by the web server. The HTTP responses are sent from the interceptor service module/web server to the page request feeder 408. Each PRB, along with its associated HTTP response, is sent to the URL collector 412.
The page request feeder 408 is configured to concurrently handle multiple HTTP requests, by assigning PRBs to one or more processing entities (e.g., threads) that execute in parallel. The number of PRBs that is concurrently processed depends upon the level of available resources in the system. The greater the level of available system resources, the greater the number of PRBs that may be concurrently processed in the system. The prefabrication policies 402 may include parameters governing the level of system resources at which prefabrication procedures may execute or limit the quantity of system resources that may be consumed by the prefabrication policy.
The resource manager 410 monitors system resource usage, such as CPU and memory usage, both at the prefabricator location as well as the web server location(s), and indicates the level of system resources available to the prefabricator service module. The resource manager 410 provides system resource information used by the page request feeder 408 to throttle the rate in which HTTP requests are sent to the interceptor/web servers. The resource manager 410 can also be configured to provide information used by the page request feeder 408 to identify which web server or load balancer at which HTTP requests should be directed.
In this manner, the prefabrication system automatically adapts or “tunes” its processing to the changing conditions that exist in the system. This permits the prefabrication process to take full advantage of excess resources available in the system during periods of low resource usage, by automatically increasing the prefabrication workload. During periods of high resource usage, the prefabrication workload can be automatically lowered to minimize resource drains from other run-time work being performed by the system.
Each processed PRB and its associated HTTP response from the interceptor/web server are sent from the page request feeder 408 to the URL collector 412. The URL collector 412 crawls through the HTTP responses to identify new URLs that should be prefabricated. The new URLs form additional PRBs that are sent to the benefit analyzer 406 for prioritization and further processing. The prefabrication policies 402 define parameters used by the URL collector 412 to identify additional URLs that should be prefabricated. In one embodiment, the pages dynamically fabricated in response to an immediate user request can also be sent to the URL collector 412 to be crawled for pages that should be prefabricated.
To illustrate the operations of prefabricator service module 310, consider again the example prefabrication policy, described above, having the following policy parameters:
When this prefabrication policy is executed, the start loader 404 in the prefabricator service module 310 performs the action of identifying the URLs of the start pages for all relevant users (i.e., “Guest” users) of the Foo computer application. In some circumstances, the start loader 404 may also identify some or all of the URLs for the menu pages for the relevant users. PRBs corresponding to the identified URLs are sent to the benefit analyzer 406.
The benefit analyzer 406 prioritizes the PRBs and sends a series of PRB batches to the page request feeder 408. Various prioritization procedures may be employed. In this example, an applicable prioritization procedure is to give higher priority to start page URLs and lower priority to other URLs having higher depths in the page hierarchy, i.e., menu page URLs. Thus, the initial batch of PRBs identified by the benefit analyzer 406 should be directed to higher priority URLs.
The page request feeder receives system resource information from the resource manager 410. Based upon this system resource information, the page request feeder 408 determines the number of PRBs that may be concurrently processed at any moment in time. The PRBs are assigned to the processing entities that work for the page request feeder 408. HTTP requests are sent by the processing entities to the interceptor/web server. HTTP responses to the HTTP requests are returned from the interceptor/web server, and are attached or logically associated with the original PRBs.
The PRBs and the associated HTTP responses are sent to the URL collector 412. The URL collector 412 attempts to identify additional URLs that should be prefabricated. In this example, the prefabrication policies indicate that both start pages as well as menu pages should be prefabricated. Thus, the URL collector 412 crawls through the HTTP response for each start page to attempt to identify URLs for additional menu pages. The URLs for the identified menu pages are packaged as new PRBs that are sent to the benefit analyzer 406.
The benefit analyzer 406 reprioritizes the set of pending PRBs based upon the new PRBs received from the URL collector 412, and sends another batch of PRBs to the page request feeder 408. The above process continues until all the PRBs have been processed or until the processing time period for the policy expires.
A scheduler (not shown) coordinates the activities of the components within the prefabricator service module 310. In one embodiment, the scheduler is a thread that monitors the prefabrication policies, and determines which policies become active and which policies are scheduled to end.
Multi-Node Prefabrication System
The present invention can be scalably deployed to perform coordinated prefabrication services on multiple, distributed computing nodes. By way of example, if embodiments of the invention are employed in a system configuration having multiple middle-tier machines, then the prefabricator service can be started on some or all of the middle-tier machines to share the prefabrication workload. Each prefabricator instance produces its allocated portion of the prefabricated pages, and stores the prefabricated pages in a network accessible storage device. When a user requests an information page, any of the web servers operating within the prefabrication system can determine if the requested page has been prefabricated. If so, then the web server retrieves the prefabricated page from the particular network accessible device upon which the prefabricated page was stored.
When a user page request is sent from browser 602, the page request is routed to one of the middle-tier nodes 606 a or 606 b by router/load balancer 604. The node presently handling the page request determines if a valid, prefabricated version of the requested page exists somewhere in the system. If so, then the node retrieves the prefabricated page. If the page was not locally prefabricated, and the prefabricated page is stored in a network accessible file system like a remotely produced prefabricated page, then the node retrieves the page from the network accessible file system. If the locally produced prefabricated pages are stored in a local cache or storage device, then a local request for that page would result in retrieval from the local cache or storage device. If the page was prefabricated at another network node, then the prefabricated page is retrieved from the network accessible storage device, and sent to the browser 602 for display.
To describe how prefabricator workload is distributed among multiple nodes, shown in
The load distributor 702 accesses all prefabrication policies to determine the current prefabrication workload for the distributed system. Based upon the prefabrication policies, the load distributor 702 identifies the pages to prefabricate. For each identified page, a page request PRB is created.
The load distributor 702 divides the set of PRBs across the fabricator nodes in the system. In an embodiment, workload distribution is based upon the resource usage and availability levels of each prefabricator node. Prefabricator nodes having higher resource availability levels are assigned more work while prefabricator nodes having lower resource availability levels are assigned less work. Examples of resource usage parameters that may factor into the workload distribution decision are CPU, memory, and current prefabrication request levels at each prefabricator node. For this reason, the resource manager 706 at each prefabricator service instance 704 preferably communicates resource usage information to the load distributor 702.
A first approach to assigning work to prefabricator nodes involves looking at resource utilization levels in a global way, where the entirety of the workload is distributed across all the participating nodes to balance resource usage across the entire system. The total resource “headroom” for each node is identified to make the workload allocation. A second approach to assigning work involves looking at each prefabrication node on an individual basis, and assigning work to a node only within the exact resource utilization constraints that have been imposed for that node.
The load distributor 702 maintains a PRB data structure that lists all PRBs to prefabricate as well as the identity of the specific prefabricator node assigned to each PRB. The PRB data structure can be stored as a table in a database 708. The start loader 710 at each prefabricator service instance 704 scans the PRB data structure to identify the PRBs assigned to that instance. The assigned PRBs for the prefabricator service instance 704 are sent to the benefit analyzer 712 for that instance 704 for prioritization and further processing. The processing of the PRBs thereafter is substantially identical to the processing of PRBs as described with reference to
The load distributor 702 can be configured to distribute the prefabrication workload at a number of occasions. For example, the load distributor 702 may redistribute the workload at prefabrication system startup time, at predefined intervals, or when a “redistribute workload” command is explicitly issued. Each prefabricator instance can be configured to periodically log a set of statistics or status messages in a database. These statistics can be used to identify load imbalances across the system that can be corrected by redistributing the workload. In addition, the periodic reports can be used to identify error conditions at the distributed nodes. For fault tolerance purposes, load redistribution may also occur based upon identifying an error or problem at one of the prefabrication nodes.
The present invention can therefore be effectively scaled over any number of prefabricator nodes, merely by distributing the prefabrication workload over the prefabrication nodes in the system. The excess resources in all prefabricator middle-tier nodes can be harnessed by appropriate distribution or redistribution of additional workloads to those nodes having excess resource availability levels. On the other hand, those nodes having lower available resources are assigned smaller portions of the prefabrication workload. Regardless of the quantity of prefabrication workload that is assigned to a given node, all nodes equally participate in the benefits of prefabricated pages, since all prefabricated pages, even pages prefabricated by other nodes, are universally accessible from networked storage devices.
PRB—Page Request Block
According to an embodiment, information pages that are candidates for prefabrication are internally represented as formatted page requests or PRBs.
An inherent hierarchy exists between many PRBs within the system. A PRB (A) that is created by identifying URIs in the page represented by another PRB (B) is referred to as a child of PRB (B). Any PRB can have zero or more child PRBs. The child PRBs are considered to be at a depth of one more than the depth of the parent PRB. Attribute 814 identifies the entry page for this application of the present PRB. Attribute 816 identifies the child PRBs for the present PRB. Attribute 820 identifies the number of child PRBs to the present PRB.
In an embodiment, PRBs being processed by the system are stored in-memory in a UserPageTable, which is described in more detail below. This table preferably persists in a database. A history table is maintained in one embodiment to track all PRBs processed by the system for a given application. Statistics, such as the frequency or rate of change for a PRB, are maintained in the history table. These statistics can be used to modify or update weighting algorithms for PRBs. PRBs that are very old and which are not recently or frequently accessed can be expunged from the history table.
This section describes the structure of prefabrication policies according to an embodiment of the invention. According to an embodiment, the prefabrication policy contains configuration information used to bootstrap and tune the prefabricator. The prefabrication policies are preferably striped by application and are stored as persistent information in a database. The prefabrication policy identifies some or all of the following: (1) the computer application that the policy applies to; (2) the users that the policy applies to; (3) the information pages to be prefabricated; (4) prefabrication scheduling and refresh interval(s); (5) responsibilities that the policy applies to; and (6) prefabrication priorities. A hierarchy of different categories of policies can be used in the invention, such as the following categories:
At the java-layer or middle-tier, policies can be represented as object instances of a Policy class. Some of the properties in the Policy object are persistent while others are transient. The following is a list of properties for the Policy class that may be employed in one embodiment of the invention:
As a security measure, policy information is preferably maintained or modified only by appropriately authorized administrators. When an administrator changes a policy, it is preferably immediately updated and propagated, e.g., to the relevant database tables at which the policies are stored.
In an embodiment of the invention, for every application the prefabricator services is processing, a Policy object is instantiated on the prefabricator service side. A policy thread/process is configured to periodically refreshes the persistent properties of the Policy objects. In an embodiment, each prefabricator service is dedicated to only one application, i.e., if there are three applications to be prefabricated, then three instances of the prefabricator service are started. In this approach, a prefabricator service instance corresponds to only Policy object instances for this application and the policy thread/process will refresh only the policies for this application. In an alternate embodiment, a prefabricator service is configured to support multiple applications. In this alternate approach, multiple policy objects belonging to multiple applications are associated with a prefabricator service instance.
Different components in the prefabricator service access the policy object. For example, the start loader component accesses the policy object to identify the users and responsibilities configured for a given application, and to generate the initial workload. The benefit analyzer accesses the policy object to identify system configurations and refresh intervals. The benefit analyzer also updates the currentDepth property in the policy object. The page request feeder sets up the currentBatchSize property based upon the number of concurrent requests that can be handled. The URL collector reads the currentDepth property information to decide whether to crawl a prefabricated page.
User Page Table
An in-memory data structure, referred to herein as the User Page Table, keeps track of all the PRBs that the prefabricator service is processing in an embodiment of the invention. The contents of the User Page Table represent the entire set of PRBs that have been identified for prefabrication. The User Page Table includes both PRBs that have been prefabricated as well as those not yet prefabricated, and includes data indicating which PRBs have been prefabricated.
In an embodiment, the User Page Table is frequently accessed, queried, and updated by the Benefit Analyzer component. Indexes can be built that allow querying of the user page table using some of the PRB attributes. The index tables are constructed as Hashtables, with the key being the PRB property and the value being a Vector of PRBs that have the same key-property value. The User Page Table can itself be implemented as a Vector of PRBs.
In an embodiment, the Benefit Analyzer is the only component in the prefabricator service module that directly invokes changes to User Page Table. The Benefit Analyzer can be configured to ensure that no duplicate PRBs (i.e, two PRBs with the same URI) are added to the table.
This section describes a start loader according one embodiment of the invention. The start loader generates the initial set of PRBs to be processed by the prefabricator service. A default implementation of the start loader provides a mechanism to generate all possible URIs for user start/home/entry pages, based on the applications, responsibilities and users configured in the Prefabricator Policy. In an embodiment, applications can override this default implementation to provide application specific logic for determining the entry page URIs for users. Every URI generated by the start loader is represented as a PRB and passed on to the Benefit Analyzer component. It is noted that other mechanisms, in addition to the start loader, may also be employed to generate the initial workload for the prefabricator service. For example, the set of PRBs created in a prior prefabrication session, including PRBs previously generated from the URL collector, can be used as the initial workload for a present prefabrication session. This alternate approach is useful for pages that tend to remain static over time.
Using the Policy object, the method identifies the special responsibilities and user ID configured for the policy (1204). If no special responsibilities are configured, then it is assumed that all responsibilities within the application need to be prefabricated. Else, only the configured set of responsibilities are used. In addition, the process ensures that all configured userIDs are generated in the initial workload. Unlike responsibilities, this set of users may not be the only users for which prefabrication is turned on. A determination is made regarding a valid set of userIDs that match the configured set of responsibilities. In addition, a determination is made regarding the responsibility identifiers for the userIDs configured. User ID and responsibility tables can be maintained and queried to perform these determinations. The prefabricator logs into the system as a trusted user, and then switches identity to a specific user when it is prefabricating a page for that user.
The method determines the entry page URI for every applicable user ID (1206). Using application specific logic and data, the component that generates the initial workload generates URL values for all users it is prefabricating for (1208). These URL representations are appended to the previously obtained URI. The method thereafter constructs a PRB for each generated URI (1210). The constructed PRBs are sent to the benefit analyzer for further processing and prefabrication.
This section describes an embodiment of the benefit analyzer. At any given point of time and state of the prefabricator system, the benefit analyzer determines the next set of pages to prefabricate. In one approach, the benefit analyzer is executed as a single thread.
The benefit analyzer maintains an in-queue of pending PRBs. The in-queue contains all the PRBs to be processed once at any point in time. The in-queue is populated by PRBs from either the start loader or the URL collector. As noted above, the start loader produces the initial bootstrapping workload. The URLCollector produces new PRBs for the benefit analyzer by crawling previously processed PRB outputs. The benefit analyzer also uses the User Page Table to identify the workload of PRBs to process. The benefit analyzer maintains an out-queue of PRBs to send to the page request feeder.
The benefit analyzer uses a weighting algorithm to prioritize the queue of pending PRBs and to associate a weight with every PRB in the system. In one embodiment, the weight (w) is related to the following:
In one embodiment, the applicable policies may also be prioritized by the benefit analyzer. The requirements of first policy could be given higher priority than the requirements of a second policy. For example, if a first policy has a higher priority than a second policy, then the set of PRBs produced in response to the first policy is given greater weight than the set of PRBs produced in response to the second policy.
In one embodiment, the Benefit Analyzer is configured to generate, track, or maintain the following statistics: (1) Number of PRB generated; (2) Average refresh rate; (3) Total number of PRBs in the system—user page table size; (4) Optimal batch size; (5) Current depth; (6) start time of policies; (7) end time of policies; (8) duration of run; and, (9) hit ratio=(number of prefabricated URIs accessed)/(total number of URIs user requested).
Page Request Feeder
This section describes an embodiment of the page request feeder. The page request feeder initiates page generation from the PRBs. Based on the current system snapshot, the page request feeder sets the number of concurrent requests to send to the web-server, receives the responses back, and passes the page response to the URL Collector. The Page Request Feeder receives PRBs to be processed as input from the BenefitAnalyzer. The page request feeder also uses the optimal batch size value and maximum CPU consumption limit value from the Policy object.
The Page Request Feeder includes a “monitor” processing component (e.g., monitor thread) and a changing number of “worker” components (e.g., worker threads). The monitor thread is responsible for dynamically changing the number of concurrent requests to send to the web server based on the current system snapshot. The monitor thread uses the following steps to dynamically adjust the number of requests: (1) The monitor thread checks if the current CPU utilization in the system is less than the maximum CPU value configured in the policy object; (2) the number of outstanding page requests is checked to determine if it is less than the optimal value listed in the prefabrication policy; and, (3) if both of the above conditions are met, then one or more PRBs are retrieved from the benefit analyzer and passed to a free worker thread, or to a new, created worker thread if none is presently available.
Each worker thread is responsible for performing the following steps: (1) taking a PRB from the request feeder's in-queue; (2) sending a HTTP Request to process the URI in the PRB; (3) appending the HTTP Response to the PRB; and (4) passing the PRB to the URL collector.
In one embodiment of the invention, the page request feeder's concurrency level, or number of outstanding requests, is controlled by the benefit analyzer. However, this approach may cause a delay in the prefabricator system adapting to changes in the middle-tier or database workload. Thus, in an alternate embodiment, the benefit analyzer determines the optimal concurrency, but the request feeder calculates the adaptive or current concurrency it should support. This provides better reaction time to bursty traffic on the webserver, or sudden changes in the system load.
This section describes an embodiment of the URL collector. The URL Collector obtains PRBs as inputs from an in-queue from the Page Request Feeder. Each PRB includes an HTTP response stream that was produced and sent by the web server in response to the HTTP request of the PRB. The URL Collector crawls through the HTTP response stream to gather new URIs to prefabricate. In an embodiment, the URL collector functions as a web crawler, and crawls through a response stream based upon the current prefabrication policy. The prefabrication policy determines which pages should be crawled by the URL collector. For example, the currentDepth parameter in the Policy object can be used to establish whether a particular page should be crawled.
In an embodiment, the URL collector executes as a single thread. For every relevant PRB in the URL collector's in-queue, it parses the response stream string buffer, looking for all the <href> references. For each relevant <href>, the URL collector constructs a PRB and sends it to the Benefit Analyzer. The Benefit Analyzer ensures no duplicate URIs are added to the PRB list.
The URL collector is configured to only crawl pages that have not already been crawled, or that has changed since the last time it was crawled. To accomplish this, the URL Collector checks whether the response stream buffer size is the same as last time it was crawled. A checksum or hashID routine can be executed to additionally determine if a page has sufficiently changed as to require being crawled. Any response streams forming an error page, e.g., which have compilation or other JSP exceptions, are not crawled.
This section describes an embodiment of the resource manager usable in the invention. The resource manager monitors system resource usage, such as CPU and memory usage, on the machine where the prefabricator service is executing. The resource manager is also the component responsible for monitoring the load of the middle-tier system, by monitoring the number of concurrent requests of the Apache servers that the prefabricator service is interested in. This monitoring can be performed by sending URL requests to the mod-status Apache modules.
Based on the current system usage and predefined system resource limits, the resource manager provides information to other prefabricator components, such as the page request feeder, regarding whether the preset system resource limits have been exceeded, and how many page prefabrication requests that the prefabricator service can send to the Apache servers.
The Resource Manager uses the following system resource limits and information from the System Policy object, which in one embodiment, is stored in the database: (1) a list of all Apache servers and their port numbers in the middle-tier system; (2) whether a load balancer should be used, and if so, the host name and port number of the load balancer; (3) memory usage limit; (4) CPU usage limit; and, (5) maximum number of concurrent requests that the middle-tier system should be able to handle without significant impact on system response time.
The Resource Manager accesses the configuration information to determine which web server or load balancer the page prefabricator requests should be sent to. In an embodiment, if a load balancer is being used (e.g., for an n-node architecture), all page prefabrication requests should be sent to the load balancer. If no load balancer is available, page prefabrication requests are sent to the local web server, i.e., the web server residing on the same machine as the prefabricator service. If there are more than one web server running on such machine, an equal number of page prefabrication requests are sent to each web server.
The resource manager also determines the number of concurrent page prefabrication HTTP requests that the Page Request Feeder can send. In an embodiment, the following configured values are used in the calculation of the number of concurrent request that a prefabricator service instance should be sent to the web server:
If a load balancer is to be used, then the Resource Manager regularly monitors the number of concurrent requests on all the web servers configured (Rc1). In an embodiment, the number of requests (R) that this prefabricator service instance can send to the load balancer is:
If a load balancer is not used, and page prefabrication requests are to be sent to the local web server, then the Resource Manager regularly monitors the number of concurrent requests on the local web server(s) (Rc2). In an embodiment, the number of requests (R) that this prefabricator service instance can send to the load balancer is:
The resource manager also monitors the CPU and Memory usage on the local system. In an embodiment, a separate thread is spawned for CPU and memory usage measurements. The measurements are taken at predefined intervals, and the resource manager uses the measured usage number and the preset resource limits to determine whether the limits have been exceeded. The resource manager produces the following outputs: (1) current CPU usage on the local machine; (2) whether the CPU usage limit been exceeded; (3) current memory usage on the local machine; (4) whether the memory usage limit been exceeded; (5) the host name and port number of the web servers where page prefabrication HTTP requests should be sent to; and, (6) the number of concurrent page prefabrication HTTP requests that this page prefabricator service instance can send to the web server(s) or load balancer.
The goal of the prefabricator service is to optimally use the available system resources to prefabricate and regenerate pages. In one approach, the prefabrication and refresh rate should be as fast as, or faster than, the refresh interval configured for a given policy. The refresh interval configured by the administrator indicates the staleness of pages that are acceptable for the specific application.
By way of example, the following describes a resource optimization method for a system having one or more middle-tier machines that access a back-end server (e.g., a database server). The following factors are used in this embodiment to optimize resource utilization for the prefabrication process:
Jserv load is
Jserv load is
tier > CPUmax
Based on the above table, the number of concurrent requests can be increased from the prefabrication service to the web-server until the CPU utilization reaches the maximum level. Once this level is reached, the concurrency that provides a CPU utilization level less than the maximum response-time is chosen as the optimal concurrency. This optimal concurrency is re-calibrated periodically so as to tune to the changing system behavior.
An alternative approach uses a parameter setting that sets the maximum number of concurrent requests that can be handled by the web-server. This parameter setting can be provided, for example, by an authorized administrator. In this approach, the goal of the prefabricator system is not to use all the available resources, but instead to use the optimal amount of available resources to obtain the best refresh time per page. This approach uses the maximum number of concurrent requests that can be issued. The exact parameter setting for the maximum or optimal concurrency in the system is fundamental to this approach. The incoming traffic to the Jserv process should be carefully tuned to avoid overloading the user system with too many concurrent requests. An advantage of this approach is that it avoids making platform dependent system calls, distributed CPU measurements, and it can be used to specify the exact amount of CPU resource the prefabricator should use.
Security and Session Management
This section describes security management methods for prefabrication according to an embodiment of the invention. For the purposes of illustration, and not by way of limitation, the present explanation refers to a user connection as a “session” and to the identifier for the user connection as a “session ID”. An identified user session may be formed, for example, when a user establishes an authorized connection to a database server to execute a database application. The session ID is used to validate a user session and to identify user preferences. In one approach to implementing sessions, a valid session ID is issued when a user successfully logs into an application. The session ID is checked for validity before the user is permitted to access pages within the application. The session ID remains valid until the user logs out.
As the user moves from page to page within the session, the session ID is passed along with the viewed pages by the server. The session ID is set as a cookie value when cookies are enabled, or as an URL parameter when cookies are disabled. In the present invention, since some pages accessed by a user are prefabricated while other are contemporaneously fabricated, there may be breaks in continuity between the pages handled by the server that are sent to the user, and thus the session IDs may not be fully passed from page to page. The present invention provides additional techniques to verify the validity of a session ID associated with a user session, even when prefabricated pages are returned to the user.
In one embodiment of the invention, the prefabricator is configured to avoid prefabricating the log-in page for a user. Thus, the user must proceed with normal log-in procedures to establish a valid user session. Upon successfully logging in, a session ID is assigned to the user session.
The first time the user requests a page from the interceptor, the validity of the session ID is verified through normal verification procedures, e.g., by passing the page request to the back-end database server. From that point on, the interceptor maintains a record of the validity of the session ID. If the user request a page that is not prefabricated, then the server dynamically services the page request and places the session ID on the page response. However, if the user requests a page that has been prefabricated, the interceptor returns the prefabricated page to the user - with the valid session ID includes as part of the page. Thus, the interceptor will itself make sure that the session ID is passed along in the page returned to the user, even if a prefabricated page is returned to the user. Because the valid session ID is always returned to the user in the response page, user sessions will not change during transitions when users move between prefabricated and non-prefabricated pages.
In an n-node environment, it is possible that within a single session, a user will send page requests to multiple server nodes. According to one embodiment, the interceptor module that first verifies the validity of a session ID will propagate that session ID to every other node in the system. A record of that session ID will be maintained at every node as being valid. When the user issues a page request, the router or load balancer will route that page request to one of the distributed nodes. Since the local interceptor at that node will presumably already recognize the validity of the session ID for the user, that local interceptor can immediately service the page request without further verifications. If the requested page has already been prefabricated, the page response with the attached session ID, can be immediately returned to the user.
In an embodiment of the invention, a cookie is employed to store information about the user's preferences, application the user is logged into and the responsibility the user has. The cookie may also contain other state information, such as the selected menu page. When cookies are disabled, this information is set as an URL parameter.
When a user logs in with a valid user name and password, a session identifier is generated for tracking the user session. This session identifier is contained in all subsequent requests of the user, until the time the user logs out voluntarily or the session times out. The session identifiers are captured at login time and stored in a shared-memory table (so all Apache processes have access to it). Subsequent requests that are serviced from Cache are sent back only after confirming that the session identifier is present in Shared memory. If the session identifier is not present in the shared-memory, session validation and default processing to the Jserv is performed. This ensures that an invalid session identifier cannot be used to access the system.
The following steps are performed to set-up a user session according to an embodiment of the invention:
The created sessionID is used by the Start Loader to construct the URI for the user. Since session creation and validation may be expensive, the session ID is shared by prefabricator requests belonging to multiple users. Therefore, when a prefabricator generated HTTP request is issued, the typical validation of sessionID process is bypassed. Instead, the cookie parameters are used to obtain the user's preference settings and to set up the user context correctly. This sets up both at the middle-tier and the connection-level context of the user.
If cookies are turned on, then the generated URI contains all URL parameters and cookie parameters according to an embodiment. In order to support smooth transition between prefabricated and non-prefabricated pages, the interceptor uses the actual user's sessionID in the URI and not the prefabricator generated sessionID. This ensures that, regardless of which page that is being accessed, the user is always in the context of the currently logged in session.
This section describes an embodiment of the interceptor. The interceptor stores prefabricated versions of dynamically generated JSP (JavaServer Pages) in its cache, and attempts to service real-user requests using these static cached versions of JSPs. The Interceptor over-rides the default behavior of the Apache WebServer's mod_serv module, by first attempting to service the user requests using pre-fabricated cached page responses. The user request is mapped to a prefabricated page filename and if an exact match is found in the cache, the prefabricated response is served back to the user. If no match is found, the default dynamic page generation process occurs and the page is sent back to the user.
The interceptor handles a page request differently depending upon whether the page request originates from the prefabricator or from the user. In an embodiment, a parameter is defined in the page request object that identifies the originator of the page request.
If a user sends a page request, then the interceptor performs the following steps to process the page request according to one embodiment:
If the prefabricator sends the page request, then the interceptor performs the following steps to process the page request:
In an embodiment, the host computer 1322 operates in conjunction with a data storage system 1331, wherein the data storage system 1331 contains a database 1332 that is readily accessible by the host computer 1322. Note that a multiple tier architecture can be employed to connect user stations 1324 to a database 1332, utilizing for example, a middle application tier (not shown). In alternative embodiments, the database 1332 may be resident on the host computer, stored, e.g., in the host computer's ROM, PROM, EPROM, or any other memory chip, and/or its hard disk. In yet alternative embodiments, the database 1332 may be read by the host computer 1322 from one or more floppy disks, flexible disks, magnetic tapes, any other magnetic medium, CD-ROMs, any other optical medium, punchcards, papertape, or any other physical medium with patterns of holes, or any other medium from which a computer can read. In an alternative embodiment, the host computer 1322 can access two or more databases 1332, stored in a variety of mediums, as previously discussed.
A processing unit may be coupled via the bus 1406 to a display device 1411, such as, but not limited to, a cathode ray tube (CRT), for displaying information to a user. An input device 1412, including alphanumeric and other columns, is coupled to the bus 1406 for communicating information and command selections to the processor(s) 1407. Another type of user input device may include a cursor control 1413, such as, but not limited to, a mouse, a trackball, a fingerpad, or cursor direction columns, for communicating direction information and command selections to the processor(s) 1407 and for controlling cursor movement on the display 1411.
According to one embodiment of the invention, the individual processing units perform specific operations by their respective processor(s) 1407 executing one or more sequences of one or more instructions contained in the main memory 1408. Such instructions may be read into the main memory 1408 from another computer-usable medium, such as the ROM 1409 or the storage device 1410. Execution of the sequences of instructions contained in the main memory 1408 causes the processor(s) 1407 to perform the processes described herein. In alternative embodiments, hard-wired circuitry may be used in place of or in combination with software instructions to implement the invention. Thus, embodiments of the invention are not limited to any specific combination of hardware circuitry and/or software.
The term “computer-usable medium,” as used herein, refers to any medium that provides information or is usable by the processor(s) 1407. Such a medium may take many forms, including, but not limited to, non-volatile and volatile media. Non-volatile media, i.e., media that can retain information in the absence of power, includes the ROM 1409. Volatile media, i.e., media that can not retain information in the absence of power, includes the main memory 1408. Additionally, transmission media can take the form of acoustic or light waves, such as those generated during radio wave and infrared data communications.
Common forms of computer-usable media include, for example: a floppy disk, flexible disk, hard disk, magnetic tape, any other magnetic medium, CD-ROM, any other optical medium, punchcards, papertape, any other physical medium with patterns of holes, RAM, ROM, PROM (i.e., programmable read only memory), EPROM (i.e., erasable programmable read only memory), including FLASH-EPROM, any other memory chip or cartridge, carrier waves, or any other medium from which a processor 1407 can retrieve information. Various forms of computer-usable media may be involved in providing one or more sequences of one or more instructions to the processor(s) 1407 for execution. The instructions received by the main memory 1408 may optionally be stored on the storage device 1410, either before or after their execution by the processor(s) 1407.
Each processing unit may also include a communication interface 1414 coupled to the bus 1406. The communication interface 1414 provides two-way communication between the respective user stations 1424 and the host computer 1422. The communication interface 1414 of a respective processing unit transmits and receives electrical, electromagnetic or optical signals that include data streams representing various types of information, including instructions, messages and data. A communication link 1415 links a respective user station 1424 and a host computer 1422. The communication link 1415 may be a LAN 1326, in which case the communication interface 1414 may be a LAN card. Alternatively, the communication link 1415 may be a PSTN 1328, in which case the communication interface 1414 may be an integrated services digital network (ISDN) card or a modem. Also, as a further alternative, the communication link 1415 may be a wireless network 1330. A processing unit may transmit and receive messages, data, and instructions, including program, i.e., application, code, through its respective communication link 1415 and communication interface 1414. Received program code may be executed by the respective processor(s) 1407 as it is received, and/or stored in the storage device 1410, or other associated non-volatile media, for later execution. In this manner, a processing unit may receive messages, data and/or program code in the form of a carrier wave.
In the foregoing specification, the invention has been described with reference to specific 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. For example, the reader is to understand that the specific ordering and combination of process actions shown in the process flow diagrams described herein is merely illustrative, and the invention can be performed using different or additional process actions, or a different combination or ordering of process actions. The specification and drawings are, accordingly, to be regarded in an illustrative rather than restrictive sense.
|Cited Patent||Filing date||Publication date||Applicant||Title|
|US5727220 *||Nov 29, 1995||Mar 10, 1998||International Business Machines Corporation||Method and system for caching and referencing cached document pages utilizing a presentation data stream|
|US5758072 *||Oct 23, 1996||May 26, 1998||International Business Machines Corp.||Interactive computer network and method of operation|
|US5765205 *||Dec 27, 1995||Jun 9, 1998||International Business Machines Corporation||Method and system for on-demand software distribution|
|US5797128 *||May 14, 1997||Aug 18, 1998||Sun Microsystems, Inc.||System and method for implementing a hierarchical policy for computer system administration|
|US5951694||Feb 3, 1997||Sep 14, 1999||Microsoft Corporation||Method of redirecting a client service session to a second application server without interrupting the session by forwarding service-specific information to the second server|
|US6038574||Mar 18, 1998||Mar 14, 2000||Xerox Corporation||Method and apparatus for clustering a collection of linked documents using co-citation analysis|
|US6092196 *||Nov 25, 1997||Jul 18, 2000||Nortel Networks Limited||HTTP distributed remote user authentication system|
|US6138120 *||Jun 19, 1998||Oct 24, 2000||Oracle Corporation||System for sharing server sessions across multiple clients|
|US6182085 *||May 28, 1998||Jan 30, 2001||International Business Machines Corporation||Collaborative team crawling:Large scale information gathering over the internet|
|US6182095||Apr 30, 1998||Jan 30, 2001||General Electric Capital Corporation||Document generator|
|US6182122 *||Mar 26, 1997||Jan 30, 2001||International Business Machines Corporation||Precaching data at an intermediate server based on historical data requests by users of the intermediate server|
|US6205481 *||Mar 17, 1998||Mar 20, 2001||Infolibria, Inc.||Protocol for distributing fresh content among networked cache servers|
|US6253208 *||Mar 31, 1998||Jun 26, 2001||British Telecommunications Public Limited Company||Information access|
|US6298356||Nov 20, 1998||Oct 2, 2001||Aspect Communications Corp.||Methods and apparatus for enabling dynamic resource collaboration|
|US6549935 *||May 23, 2000||Apr 15, 2003||Silverbrook Research Pty Ltd||Method of distributing documents having common components to a plurality of destinations|
|US6629132 *||Sep 20, 1999||Sep 30, 2003||Novell, Inc.||Predicate indexing of data stored in a computer with application to indexing cached data|
|US6691163 *||Dec 23, 1999||Feb 10, 2004||Alexa Internet||Use of web usage trail data to identify related links|
|US6742033 *||Jun 12, 2000||May 25, 2004||Gateway, Inc.||System, method and computer program product that pre-caches content to provide timely information to a user|
|US20020078165 *||Dec 14, 2000||Jun 20, 2002||International Business Machines Corporation||System and method for prefetching portions of a web page based on learned preferences|
|US20020147887 *||Dec 18, 2000||Oct 10, 2002||Copeland George P.||Distributed execution coordination for web caching with dynamic content|
|EP0847020A2||Dec 8, 1997||Jun 10, 1998||Sun Microsystems, Inc.||Dynamic cache preloading across loosely-coupled administrative domains|
|WO2000022526A1||Oct 8, 1999||Apr 20, 2000||International Business Machines Corporation||Load balancing cooperating cache servers|
|1||"IBM Web Cache Manager: Isn't It Time You Gained Control Over Rising Internet Access Costs?", IBM Web Cache Manager-Overview, http://www.storage.ibm.com/hardsoft/products/wcm/webcache/, Apr. 1998, pp. 1-5, IBM, Inc., San Jose, CA, USA.|
|2||AU Office Action for Australian Patent Application No. 2002344294, mailed Mar. 21, 2007.|
|3||Challenger, J. et al., "A Scalable System for Consistently Caching Dynamic Web Data"; INFOCOM '99. 18th Annual Joint Conference of the IEEE Computer and Communications Societies Proceedings. Mar. 21, 1999, pp. 294-303, vol. 1, IEEE, New York, NY, USA.|
|4||EP Office Action for European Patent Application No. 02751998.2, mailed Feb. 13, 2008.|
|5||EP Office Action for European Patent Application No. 02751998.2, mailed Oct. 30, 2006.|
|6||IN Office Action for Indian Patent Application No. 1531/KOLNP/2003, mailed Aug. 18, 2008.|
|7||IN Office Action for Indian Patent Application No. 1531/KOLNP/2003, mailed Oct. 31, 2008.|
|8||International Search Report from International Application No. PCT/US02/16475, mailed on Sep. 30, 2002.|
|9||Japanese Patent Application Publication No. 11-194983, dated Jul. 21, 1999, and English Translation of Abstract for Publication No. 11-194983.|
|10||Japanese Patent Application Publication No. 2000-09001, dated Mar. 31, 2000, and English Translation of Abstract for Publication No. 2000-09001.|
|11||JP Office Action for Japanese Patent Application No. 500759/2003, mailed Jun. 3, 2008, and English translation of Office Action for Japanese Patent Application No. 500759/2003.|
|12||Shin Kurihara, Innovation in Mobile Contents Business, Mobile Media Magazine, vol. 6 No. 10, pp. 66-67.|
|13||Supplementary European Search Report from related European Patent Application EP 02 75 1998, mailed on Jul. 18, 2006.|
|Citing Patent||Filing date||Publication date||Applicant||Title|
|US8793346 *||Apr 27, 2012||Jul 29, 2014||International Business Machines Corporation||System and method for constructing session identification information|
|US20120278480 *||Apr 27, 2012||Nov 1, 2012||Paul Ionescu||System and method for identifying session identification information|
|International Classification||G06N3/00, G06F17/30, G06F13/00|
|May 31, 2001||AS||Assignment|
Owner name: ORACLE CORPORATION, CALIFORNIA
Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:SUBRAMANIAN, SOWMYA;KAPUR, KUNAL;SIDDIQUI, SARIM;AND OTHERS;REEL/FRAME:011863/0646
Effective date: 20010523
|Mar 11, 2003||AS||Assignment|
Owner name: ORACLE INTERNATIONAL CORPORATION (OIC), CALIFORNIA
Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:ORACLE CORPORATION;REEL/FRAME:013797/0613
Effective date: 20030221
|Aug 17, 2010||CC||Certificate of correction|
|Jan 30, 2013||FPAY||Fee payment|
Year of fee payment: 4