US 7389386 B2
According to the present invention, there is provided a computer system, method and apparatus for making intelligent recommendations for dynamic content caching. In one embodiment of the present invention there is provided a computer implemented method for generating intelligent caching recommendations related to dynamic web content for use on a caching system. The method comprising extracting data associated with the dynamic content of interest in accordance with a predetermined data model. Next analyzing the extracted data in accordance with a plurality of certainty factors and a rule based expert system. Completing the analysis and generating a set of caching recommendations from the analyzed data suitable for use by the caching system. Implementing the recommendations in the caching system are repeated iteratively, as in a loop, automatically generating intelligent caching recommendations related to the dynamic web content for use on the caching system.
1. A computer implemented method for generating intelligent caching recommendations related to dynamic web content for use on a caching system, comprising:
extracting data associated with the dynamic content of interest in accordance with a predetermined data model;
analyzing the extracted data in accordance with plurality of certainty factors and a rules based expert system; and
generating a set of caching recommendations from the analyzed data suitable for use by the caching system.
2. The computer implemented method of
a dynamic content model in combination with dynamic content descriptors; and produces a plurality of entity-relationship data.
3. The computer implemented method of
obtaining an object dependency model;
obtaining a weighting scheme;
creating an enhanced object dependency graph model combined with cacheability data; and,
creating a cache advisor report.
4. The computer implemented method of
obtaining a cache policy model for use with a generator; and
generating a cache policy.
5. The computer implemented method of
6. The computer implemented method of
7. The computer implemented method of
The present invention relates generally to data caching of web content on a computer system on a network and, more specifically, for making automated recommendations toward intelligent data caching of dynamic web page content.
The Internet and the World Wide Web (WWW) provide intra-enterprise connectivity, inter-enterprise connectivity and application hosting on a larger scale than ever before. By exploiting the broadly available and deployed standards of the Internet and the WWW, system users and designers can leverage a single architecture to build client/server applications for internal use that can reach outside to customers, business partners and suppliers.
Each web site normally further provides a plurality of web pages to be served to the local computer systems upon request. Each local computer system may access the remote web sites with web browser software.
The WWW is a collection of servers on an IP (Internet Protocol) network, such as the Internet, an Intranet or an Extranet, that utilize the Hypertext Transfer Protocol (HTTP). Hereinafter, “Internet” will be used to refer to any IP network. HTTP is a known application protocol that provides users with access to files, which can be in different formats, such as text, graphics, images, sound, and video, using a standard page description language known as Hypertext Markup Language (HTML). Among a number of basic document formatting functions, HTML allows software developers to specify graphical pointers on displayed web pages, commonly referred to as “hyperlinks,” that point to other web pages resident on remote servers. Hyperlinks commonly are displayed as highlighted text or other graphical image on the web page. Selection of a hyperlink with a pointing device, such as a computer mouse, causes the local computer to download the HTML associated with the web page from a remote server. The browser then renders the HTML into the displayed web page.
Web pages accessed over the Internet, whether by a hyperlink, opening directly via an “open” button in the browser, or some other means, are commonly downloaded into the volatile cache of a local computer system. In a computer system, for example, the volatile cache is a high-speed buffer that temporarily stores web pages from accessed remote web sites. The volatile cache thus enables a user to quickly review web pages that were already downloaded, thereby eliminating the need to repeat the relatively slow process of traversing the Internet to access previously viewed web pages. This is called local caching.
On the server side, the first web servers were merely HTTP servers that resolved universal resource locators (URLs) by extracting literally from the URL the path to a file that contained the needed page, and transmitting the page back to the browser. Such a server was very simple; it could only be used to access static pages.
A “static” page is a page which, each time it is requested and served to a requester, has the same byte content. That is, it does not depend upon which requester is requesting the page, when the requester is requesting the page, etc.; the byte content of that page remains the same. By contrast, a “dynamic page” is a page which has byte content that may very well change depending upon the particular requestor, when the page is being requested, etc. This will be discussed further below. It is important that web pages be served as quickly as possible, both to reduce the response time to a single user, and to increase the number of users that can be served concurrently. To improve the response time, the Web server uses caches. Web server caches are used to store web page responses in a readily accessible memory location so that when the web page is requested by a user, a previously cached web page response can be retrieved from cache and served quickly to the user.
Caching web page responses by the web server works quite well for web page responses having static content, i.e., content that doesn't change frequently. An example of a static web page is one, at a company's web site, comprising a compilation of text and graphics objects describing that company's history.
In fact, classic web servers cache static pages quite effectively. Specifically, classic web servers serve web page responses, some of which are static, namely, responses comprising HTML from the file system. Each of the static responses has a last modified date associated with it that is maintained by the file system. The contents of the response and its associated last modified date are simply stored in the cache for possible future use by the web server. When a subsequent request is received by the server for that page, the server requests the latest modification date for that page from the file system and compares the latest modification date with the last modified date associated with the candidate cached response. If the latest modification date is the same as the last modified date associated with the candidate cached response, the candidate cached response is considered to be “fresh” and is served to the request (i.e., to the requesting user). If the latest modification date is later than the last modified date associated with the candidate cached response, the candidate cached response is considered “stale” and a “fresh” response is retrieved and built by the web server for serving to the requesting user. The fresh response, along with its associated last modified date, is cached to replace the stale response. This caching scheme saves the time and server processor cycles that otherwise would have been spent to build requested pages which otherwise could have been cached using this classic caching scheme.
However, newer web servers provide not only static web pages but also dynamic web pages, i.e., a page having byte content that may very well change depending upon the particular requester, when the page is being requested, etc. Examples of dynamic web pages are pages containing content from a number of different sources or pages having computed content. For example, a page may contain macros that compute content for the page, i.e., the page has “computable content”. These macros may change the page content each time the page is accessed. This makes it difficult to cache that page using the classic caching method described above. Macros or formulas are expressions that perform a function, such as determining field values, defining which documents appear in a view, or calculating values for a column.
Alternatively, the page may contain information from a number of different sources, and that information may or may not have associated last modified dates making it difficult, if not impossible, to cache using the classic caching method. For example, the page may comprise a composite of a number of “parts” including: other documents, designs from databases, content from databases, the present user's identity, the current time, the current environment, etc. Some of these parts are actual entities in the system, e.g., documents, databases, etc. Some parts though are “virtual” and are used to model the effects of the execution of macros or scripts, for example, the user's identity may be accessed via one of a number of macros for performing specialized. They can be used to format text strings, generate dates and times, format dates and times, evaluate conditional statements, calculate numeric values, calculate values in a list, convert text to numbers or numbers to text, or activate agents and actions. These various part types are computable parts and have correspondingly various types of attributes that can not be handled by the classic caching systems and methods.
Clearly, it is more difficult to use caching as a mechanism for improving user response time for pages with dynamic content. This problem for the server is twofold. First, after building a web page response, the server must determine whether the response that it is preparing to serve the requesting user is cacheable (i.e., determining its cacheability). Second, the server, upon receiving a request for a web page whose previous response has been cached, must determine whether the cached response is valid (i.e., determining its validity) and applicable (i.e., determining its applicability). For instance, web page responses containing macros that are time-dependent may not be cacheable at all. If a page includes a macro for providing the current time, then every access of the page is unique and the page cannot be cached in memory at all. Another example is where is a cached page is valid for serving to some users but not others. For instance, if the page includes a macro for the user's name, then the page can be cached for serving to that particular user, but not for serving to others. (HTML representing a document is specific to a user if macros are dependent on user name or user roles. Using this user data, some data may be made visible based on which user is requesting it.)
The term “Dynamic HTML” (DHTML) needs to be explained in the context of the embodiments of the present invention. “Dynamic” as used in DHTML is referring primarily to the effect that the code has on the web page appearance at the browser. For instance, the dynamic HTML may comprise scripts that run on the browser to change the appearance of the web page such as by displaying a button that, if pushed, displays additional text or graphics. The key distinction is that “dynamic” in the DHTML sense refers to the browser, not the server. From the server's point of view, a DHTML page may still be “static” in that the byte content may be the same each time the page is requested, so for the purposes of this invention, a DHTML page may be “static” or “dynamic” in the sense of the invention. The content is not dependent on any thing, e.g., the properties of the request, such as the identity of the particular user, the time of day that the request is made, etc. “Dynamic” content, as used in the embodiments of the present invention, refers to content that has such dependencies. Thus, “dynamic” in the DHTML sense is not related to “dynamic” in the sense of the embodiments of the present invention.
The problems may be further expressed as that of not knowing which dynamic content such as that found in JSP (Java server page) and ASP (active server page) technology need to be cached and then how to cache effectively. Further when implementing a manual cache configuration incorrect assumptions may cause system performance degradation. This problem arises when developers construct dynamic pages but do not cache them appropriately; which may then lead to poor system performance. Additional decisions based on the various dynamic properties of the page are required regarding whether to not cache a particular dynamic page at all or to cache it as a page fragment or a composite page (including sub-fragments). The drawback of these solutions is the need for significant knowledge of the dynamic content design and the system's dynamic content caching infrastructure.
As can be readily seen, using caching as a means for increasing server performance for responses which have dynamic content has a number of complications and difficulties which have not been overcome by prior systems. As such, HTML representing responses having dynamic content has not been cached in the past. Accordingly, an embodiment to cache content that can include dynamic content without suffering from the drawbacks discussed above is needed. An additional solution is required to make the caching process simpler such that developers can easily determine which dynamic content needs to be cached and how the content should be cached.
According to the present invention, there is provided a computer system, method and apparatus for making intelligent recommendations for dynamic content caching. In an embodiment of the present invention there is a focus on four main components. Included is a Scanner component that takes a list of dynamic pages as input and based on a dynamic page model (JSP, ASP, etc.) and XML definition file outputs the dynamic page content as entities-relationships data described in an XML file. This data is then fed into an Analyser component to be analyzed using the certainty factor model and rule based expert system implementation with user-defined object weighting schemes based on an Object Dependency Graph (ODG) model. The Analyzer then generates caching recommendations in an analysis report with Certainty Factors for each hypothesis, such as cached as a page fragment, cached as a composite page or not cached at all. The Analyser's output is in the form of an enhanced ODG with additional attributes described by an XML file. This enhanced ODG is then used by a Generator component to generate a cache policy for the computer system based on the computer system's cache policy model. The enhanced ODG may optionally be passed to a Visualizer component providing a graphical view of the cached objects and their dependencies. There is also a cache advisor report which may be viewed through the visualizer component.
Embodiments of the present invention may be used to minimize requirements for significant knowledge of page design and cache infrastructure of a system. It may also be used in place of using intuition to determine what needs to be cached, as the certainty factor and rule based expert system provides intelligent recommendations based on supporting evidence to optimize caching opportunities. Further by design all components are logically separated affording greater flexibility to plug in each component, such as the use of a different Scanner, Analyzer, Generator, or Visualizer component. Use of a tool such as that which may be an implementation of an embodiment of the present invention may also provide for automatic generation of the cache policy. Further instead of reading text or code, all object dependencies may be visualized in a user-friendly graphical user interface.
In one embodiment of the present invention there is provided a computer implemented method for generating intelligent caching recommendations related to dynamic web content for use on a caching system, comprising: extracting data associated with the dynamic content of interest in accordance with a predetermined data model; analyzing the extracted data in accordance with plurality of certainty factors and a rules based expert system; and generating a set of caching recommendations from the analyzed data suitable for use by the caching system.
In another embodiment of the present invention there is provided a computer system for generating intelligent caching recommendations related to dynamic web content for use on a caching system, comprising: a means for extracting data associated with the dynamic content of interest in accordance with a predetermined data model; a means for analyzing the extracted data in accordance with plurality of certainty factors and a rules based expert system; and a means for generating a set of caching recommendations from the analyzed data suitable for use by the caching system.
In yet another embodiment of the present invention there is provided an article of manufacture for directing a data processing system generate intelligent caching recommendations related to dynamic web content for use on a caching system, the article of manufacture comprising: a computer usable medium embodying one or more instructions executable by the data processing system, the one or more instructions comprising: data processing system executable instructions for extracting data associated with the dynamic content of interest in accordance with a predetermined data model; data processing system executable instructions for analyzing the extracted data in accordance with plurality of certainty factors and a rules based expert system; and data processing system executable instructions for generating a set of caching recommendations from the analyzed data suitable for use by the caching system.
Other aspects and features of the present invention will become apparent to those of ordinary skill in the art upon review of the following description of specific embodiments of the invention in conjunction with the accompanying figures.
In the figures, which illustrate embodiments of the present invention by example only,
Like reference numerals refer to corresponding components and steps throughout the drawings.
CPU 110 is connected to memory 108 either through a dedicated system bus 105 and/or a general system bus 106. Memory 108 can be a random access semiconductor. Memory 108 is depicted conceptually as a single monolithic entity but it is well known that memory 108 can be arranged in a hierarchy of caches and other memory devices.
Operating system 120 provides functions such as device interfaces, memory management, multiple task management, and the like as known in the art. CPU 110 can be suitably programmed to read, load, and execute instructions of operating system 120 and those of cache advisor tool 200. Computer system 100 has the necessary subsystems and functional components to implement testing of files as will be discussed later. Other programs (not shown) include server software applications in which network adapter 118 interacts with the server software application to enable computer system 100 to function as a network server via network 119 as well as to provide data from remote instances supporting embodiments of cache advisor tool 200 and dynamic content 225.
General system bus 106 supports transfer of data, commands, and other information between various subsystems of computer system 100. While shown in simplified form as a single bus, bus 106 can be structured as multiple buses arranged in hierarchical form. Display adapter 114 supports video display device 115, which is a cathode-ray tube display or a display based upon other suitable display technology that may be used to depict data. Output device 295 of
Adapter 117 is used for operationally connecting many types of peripheral computing devices to computer system 100 via bus 106, such as printers, bus adapters, and other computers using one or more protocols including Token Ring, LAN connections, as known in the art. Network adapter 118 provides a physical interface to a suitable network 119, such as the Internet. Network adapter 118 includes a modem that can be connected to a telephone line for accessing network 119. Computer system 100 can be connected to another network server via a local area network using an appropriate network protocol and the network server can in turn be connected to the Internet.
Logical system architecture to effectively automate the dynamic content recommendation process is established. The following
Output of the translated data is in a XML format to be interpreted by analyser 230. Entities-relationships 210 is then translated through analyser 230 into an enhanced ODG (object dependency graph) model with cacheability data 250. Analyser 230 analyzes extracted dynamic page entities-relationships data 210 and extends ODG model 245 by attaching attributes to ODG nodes, obtained through analysis of the ODG 245 and the entire web application (with data from XML file 215 and related DTD 220). Analyser 230 also applies certainty factor model (probabilistic model) and expert system (heuristics) used for caching dynamic web content in conjunction with weighting scheme and XML based rules 240 for the expert system. The rules may be derived from various different cacheability indicators or evidence. Typical cacheability indicators are as follows:
For example, using the JavaServer Pages (JSP) dynamic page model:
The above indicators or evidence may then be used to compute the certainty factors as found in certainty factors and rules based system 235 for a following hypothesis:
An initial set of CF's (rules), given certain evidence, need to be created in order to provide more accurate CF's given a combination involving any of these evidence. An example may be provided as: CF [CwoF|HAR & HRR]=0.9.
As well, probabilities given certain evidence need to be determined in the calculation of MB/MD as in the next example of P(HV|np)=1 if (np>=MAXnp), otherwise P(HV|np)=np/MAXnp
Also, a prior probability (probability of an event without any evidence) of a dynamic page is required for each evidence. For example, Prior(HV) is the probability of any page having HV without any evidence.
Cacheability also takes into account a weighting scheme based on user input, allowing an expert developer to fine tune the algorithm. Prior probabilities for each evidence and values such as MAXnp in the examples above can be defined in a configuration file hence allowing the expert user knowledge to play a role in the cacheability calculation of different systems.
Analyser 230 produces output of the analyzed data in a XML format to be interpreted by Generator 260 for producing a cache policy 270 XML file. Output from analyser 230 may also be sent as enhanced ODG 250 with or without CA report 255 (cache advisor) to Visualizer 280 for a visual representation. Visualizer 280 creates viewable objects 285 for use with application view 290 to be seen on output device 295.
Generator 260 generates a cache policy based on the analysis report of enhanced ODG 250 and information combined with cache policy model 265. For example, the IBM product WebSphere Application Server Dynamic Cache uses a cache policy in the form of an XML file (cachespec.xml) and its cache policy model is the data type definition file (cachespec.dtd) for the cachespec.xml. Several of cache policy XML 270 may be generated based on a given confidence level.
Visualizer 280 provides a user with a graphical view of object dependencies determined through analysis using a colouring scheme to highlight relationships. For example when displaying objects and dependencies, objects that appear in blue may be JSPs, those in red may be Java beans, pink may be for tag libraries, and HTML objects may be in grey, while unknown object may appear in black. Similarly dependencies could be shown as green to indicate they are dynamic, while cyan could indicate static includes, pink for tag library links and grey for HTML anchors. Further any object having an arrow pointing to it by another object is a parent of that object while an object having a pointer to another object is the child of that object. In the usual manner clicking on an object or dependency will cause the properties of that object or dependency to be displayed. In this way the visualizer 280 provides the ability to view object information at the nodes and at the edges (if dependencies and attributes exist) of the enhanced ODG 250 and maps the analysis report to highlight the important objects with priorities.
Cache advisor report 255 is presented as a textual display having rows of information related to the relationships and resulting recommendations.
Referring now to
The file mapfile.xml is used to map unknown objects to user known objects, for example where some dynamically included page can become unknown, such as the case where the incfile below can be any value depending on the value of the string includeDir which doesn't get determined until runtime. To overcome such problems, a user defined mapping file to map unknown objects to user known objects is provided.
Sample syntax definition of a mapfile.xml may be as follows:
Following is a sample of the mapfile.xml file:
The config.properties file contains information needed to configure prior probabilities, weighting schemes, and threshold values used by the analyser.
Threshold values are values that determine if an evidence is completely true, e.g. in the cacheability algorithm rule P(HV|np)=1 if (np>=MAXnp), otherwise P(HV|np)=np/MAXnp where MAXnp is the threshold value for np, the probability of high variability given evidence of number of request parameters is equal to 1 if the number of request parameters is greater than or equal to the threshold value defined by MAXnp, otherwise the probability of high variability given evidence of number of request parameters is equal to the number of request parameters divided by the threshold value MAXnp.
Weight schemes define the weighting of each attribute contributing to the belief or disbelief of the evidence, e.g. users can define how the number of request parameters (np) and the range of the request parameters (rp) will contribute to the calculation of high variability (HV). These weights are expressed in the config.properties as percentages in the form of decimals (30% or 0.3 weight for np and 70% or 0.7 weight for rp), therefore the weight of np+the weight of rp=1.
Prior probabilities define the probabilities of an event without any evidence support. These prior probabilities are used in cases where there does not exist evidence support, e.g. missing the information of number and range of request parameters then the calculation of HV will use the prior probabilities.
A sample of the syntax definition of config.properties follows:
The following is an example of a config.properties file containing settings for configuring prior probabilities, weighting schemes, and threshold values. The threshold values are values that determine if an evidence is completely true, e.g. in the cacheability algorithm rule P(HV|np)=1 if (np>=MAXnp), otherwise P(HV|np)=np/MAXnp where MAXnp is the threshold value for np, the probability of high variability given evidence of number of request parameters is equal to 1 if the number of request parameters is greater than or equal to the threshold value defined by MAXnp, otherwise the probability of high variability given evidence of number of request parameters is equal to the number of request parameters divided by the threshold value MAXnp.
Weight schemes define the weighting of each attribute contributing to the belief or disbelief of the evidence, e.g. users can define how the number of request parameters (np) and the range of the request parameters (rp) will contribute to the calculation of high variability (HV). These weights are expressed in this config.properties as percentages in the form of decimals (30% or 0.3 weight for np and 70% or 0.7 weight for rp), therefore the weight of np+the weight of rp=1.
Prior probabilities define the probabilities of an event without any evidence support. These prior probabilities are used in cases where there does not exist evidence support, e.g. missing the information of number and range of request parameters then the calculation of HV will use the prior probabilities.
Sample syntax definition of a config.properties file follows:
Following is an example of a default config.properties file showing the settings with values:
The rules.xml file contains specification of certainty factor rules. These certainty factor rules need to be defined in a rules.xml file for subsequent use by the cacheability algorithm. For example, the first rules within the rule list for CWF is CF [CwF |HV & HEC & HAR & HRR]=0.9.
Sample syntax definitions for a rules.xml type of file are as follows:
The following is an example of a portion of a default rules.xml file showing two rules:
Having just described the more granular elements a sample usage flow will now be described. Cache advisor 200 is an implementation of an embodiment of the present invention in the form of a computer system tool containing specific functions for managing cache data as described in
Report 345 and graph 350 components of cache advisor 200 may be viewed as part of visualizer 280 of cache advisor 200. The file objects just described may be viewed through report 345 and tool GUI 355 or other tool capable of displaying files having XML data. Cache advisor 200 generates output in the form of report.html 335 which is a cacheability report and cachespecsample.xml containing recommended cache data. The user would further modify cachespecsample.xml 330 by adding information regarding cache, data dependency and invalidation identifiers to create cache implementation file cachespec.xml 325. Cachespec.xml 325 is further tested and modified by the user throughout production cycles. Information from an implementation on server 320 further provides input to modifications of the configuration files (rules.xml 300, config.properties 305 and mapfile.xml 310) to regenerate recommendations as output in cachespec.xml 325.
Referring now o
Of course, the above described embodiments are intended to be illustrative only and in no way limiting. The described embodiments of carrying out the present invention are susceptible to many modifications of form, arrangement of parts, details and order of operation. The invention, rather, is intended to encompass all such modification within its scope, as defined by the claims.