Caching capability of single-page applications
Patent Information
- Application Number
- DE112020004493
- Authority / Receiving Office
- DE · DE
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-09-24
- Filing Date
- 2020-09-22
- Publication Date
- 2025-07-17
- Estimated Expiration
- 2040-09-22
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
BACKGROUND
[0001] The invention generally relates to content caching in a content delivery network, and more particularly to a computer-implemented method for improving the caching capability of a result of an API request of a content delivery system. The invention further relates to a related caching system for improving the caching capability of a result of an API request of a content delivery system and a computer program product.
[0002] As the volumes of data—especially so-called unstructured data—grow for companies of all sizes, more corporate data must be managed with content management systems. These systems can be used to store the ever-increasing number of documents or as a tool for creating content, for example, for websites. Search engines are also playing an increasingly important role in enterprise content management, not only for unstructured documents, but also for reports from data analysis systems and other sources.
[0003] On the other hand, the content must be distributed within the company—and sometimes shared with customers and suppliers—and made accessible reliably and consistently. This means that the documents and other content must always be available in the most up-to-date version. The distribution network, which may also include caching systems between the source and the destination (often the client system using a browser), should bear the least possible load, i.e., the least possible network traffic.
[0004] Today, single-page applications (SPAs) are commonly used on the client side. Their main feature is their ability to work with dynamic content. Such content can be updated as part of a web page as new information becomes available. This allows other content elements of the website to remain static and not require regular updates.
[0005] Caching is very important for achieving a high-performance client application while keeping the number of requests (and thus the load) to the backend server at an acceptable level. Static, immutable resources (such as images) can be easily cached by adding appropriate HTTP Cache-Control headers.
[0006] On the other hand, caching REST API (REpresentational State Transfer Application Programming Interface) responses is much more difficult because the results are typically dynamic, and caching these results based on an expiration time may result in stale data for the duration of that expiration time. To overcome this limitation, many cloud services today employ validation-based caching by using the HTTP "ETag" and "if-notmatch" fields. This approach allows common servers (or caching systems) to check whether a cache of objects is stale or send an appropriate HTTP request to the service's origin. This approach avoids the repeated transmission of the same data from the source to the edge server.Nonetheless, this approach still imposes validation requirements on the source server, which typically places a significant burden on that server and the network. Furthermore, the validation itself is often far from trivial; for example, the result of an API search call may depend on a variety of metadata used to filter the search query.
[0007] Validation-based caching is typically difficult with HTTP caches. There are currently no technical means to invalidate a browser cache. Some CDN (content delivery network) caches support invalidation, but CDN cache invalidations are not simple operations and typically take a long time to propagate to all edge servers (i.e., client systems). Furthermore, it is not typically intended to be used at a fine-grained level, such as for individual parameterized API calls.
[0008] There are several disclosures regarding methods for managing content in a content delivery system: Document US 2017 / 0046438 A1 discloses a search system comprising a query receiver, a live scraping system, and a cache manager. The query receiver is configured to receive a first query associated with a first application state of a first application. The first query is requested by a user device. The cache manager is configured to store information based on the extracted content and, in response to the query receiver receiving a second query matching the first query, to selectively provide the stored information to the user device for display to a user.
[0009] Document US 2014 / 0372515 A1 discloses a client-based computer system capable of exchanging data with a remote server over a network and providing access to content or services provided by the server, the system comprising a storage unit and a cache. The cache is capable of exchanging data with the server over the network, intercepting a request from the client to the server, and storing responses from the server on a storage unit. The cache is further capable of automatically determining when to send the request to the server over the network.
[0010] Furthermore, the document US 2011 / 0 078 708 A1 is known. It describes a system and a method for communication between a portal application and a portlet that is executed within a portlet container. For this purpose, one or more Service Provider Interfaces (SPI) are used, which provide services that are used or implemented by the portlet to obtain information about the portlet to be used. The document US 2020 / 0 034 050 A1 describes how to create cached content and make it available with only a slight delay. For this purpose, digital content from otherwise remote storage locations is bundled in a central location. The document US 7 788 291 B2 describes an accelerated display of rarely changing, frequently accessed static content. A local cache in the client system is used for this purpose.Finally, document CN 106 657 249 A describes a method for updating cache contents in a cache server in a CDN (Content Distribution Network).
[0011] However, a disadvantage of known solutions often remains the relatively high network traffic between the various systems involved—i.e., the one or more content servers, the one or more caching systems, and the one or more client systems. This is especially true in cases where single-page applications enable access to dynamically changing content.
[0012] Therefore, it may be necessary to overcome unsatisfactory conditions, i.e. unnecessary overhead network traffic in a content delivery network, and still provide reliable access to the latest versions of content items using web pages that provide access to dynamically changing content. SUMMARY
[0013] The above-mentioned problem is solved by the subject matter of the independent patent claims. Further embodiments are described by the respective dependent claims.
[0014] According to one aspect of the present invention, a computer-implemented method for improving the caching capability of a result of an API request of a content delivery system may be provided. The method may include maintaining a unique seed value for each group of content items of a content type and updating the seed value for the group of content items when it is determined that one of the content items in the group has been updated.
[0015] The method may further comprise caching one of the content items of the group together with the associated seed value in a caching system and receiving an API request from the caching system requesting a content item of the group as an API request result, wherein a parameter of the API request is a selected seed value.
[0016] According to another aspect of the present invention, a caching system for improving the caching capability of an API request result of a content delivery system may be provided. The system may include means for maintaining a unique seed value for each group of content items of a content type, means for updating the seed value for the group of content items when it is determined that one of the content items in the group has been updated, means for caching one of the contents of the group together with the associated seed value in a caching system, and means for receiving an API request from the caching system requesting a content item of the group as an API request result, wherein a parameter of the API request is a selected seed value.
[0017] The proposed computer-implemented method for improving the caching capability of an API request result of a content delivery system may provide several advantages, technical effects, contributions, and / or improvements:
[0018] Network traffic between the client and the content management system, which is typically implemented as a back-end server in a data center, can be significantly reduced, resulting in more efficient use of available resources. The caching system, which is typically implemented in a data transmission network between the content server system or content management system in the backend and an information consumption unit such as a client system, which is typically equipped with a browser for rendering the information, must not send unnecessary and uncontrolled requests to the back-end system, but can have the ability to keep the content items cached in the - e.g., distributed - caching system as up-to-date as possible.For this purpose, an intelligent data transfer protocol between the client and the caching system can provide means for controlling the timeliness of a content item in the client system.
[0019] The caching system only needs to request the content item, specifically an updated version of the content item, from the content management system if it has been determined that the content item cached in the caching system is out of date. This can be particularly beneficial in environments where single-page applications may be used, which may contain both static and dynamically changing content on the same web page (or web application).
[0020] The granularity and control over content items and their freshness can be configured by defining groups of content items. This allows for a fine-grained or coarse-grained caching management strategy, depending on the available network bandwidth between the back-end system and the caching system, as well as the network capacity between the caching system and the client. This configurability can also help ensure more economical use of existing resources.
[0021] The new caching approach proposed here, which uses the novel caching seed parameter, can enable API responses to be cached indefinitely. To achieve this, cloud services in this context track the current caching seed values for each type of artifact (i.e., content item) exposed by the services (e.g., one caching seed for content and another caching seed for data assets). Whenever an instance of this type is created, modified, or deleted, the corresponding caching seed value can be updated to a new unique value (one that has never been used before). Clients can retrieve the current seed value for a given type through a corresponding REST API.
[0022] Furthermore, this approach can allow users to decide how up-to-date the loaded information needs to be on the client side. The information is as up-to-date as the loaded cache seed value. This means that if it is sufficient for the client for data to be one minute out of date, the client system would reload the seed values every minute. During periods where there are no updates to the live data provided by the cloud service (i.e., content management system), the seed values do not need to change on a subsequent API call and are still fully served from the CDN cache, i.e., the caching server. This approach can be particularly beneficial for web pages that are updated at specific times but not necessarily according to a reliable, stable schedule. This can represent a typical case for web pages.After an update, all client systems see the latest data within one minute at the most. During the long period without changes, all responses are provided by the CDN's caching system. A client is always free to load the most recent data by either omitting the cache seed parameter or reloading it.
[0023] Furthermore, the load on the back-end server (i.e., the CMS) can be significantly reduced due to the frequent avoidance of update checks by the middle CDN layer, i.e., the caching servers. This can result in better response time for periodic requests to the back-end servers and lower processing power requirements (i.e., potentially smaller, cheaper servers).
[0024] Further embodiments of the inventive concept - applicable to both the system and the method - are described below.
[0025] According to an advantageous embodiment, the method may also comprise: upon detecting—in particular upon receipt of the API request—a difference between the associated seed value and the selected seed value at the caching system, requesting an updated corresponding content item as the API request result, in particular from the content management system. If the seed values of the request and the content item are the same in the caching system, the caching system simply returns a seed value stored in the caching system. However, nothing further is executed because the seed value is unchanged (i.e., the same on the client and the caching system); in particular, no request may be sent to the backend system.
[0026] According to a further advantageous embodiment, the method may also comprise regularly receiving an API request for the content item of the group at the caching system. This may be done to regularly update the content of an SPA in a client's browser. Regularly may mean "at regular time intervals" or may be triggered by other events received by the browser's client system. For example, messages may be received at unpredictable time intervals that are part of the content item's context; then the client / browser may automatically send a request to the caching system to obtain an updated content item—provided the seed value is different. This may be of particular value for dynamic web pages.
[0027] According to a useful embodiment of the method, the API request can request, as an API request result, content from elements belonging to different groups of content item types. Thus, the mechanism described above can also be applied to content elements of different groups. This can also be of particular value for dynamic web pages that handle different types of content elements. Thus, a group can reflect all content elements of a content type of all the content elements of the CMS, meaning that all content elements of a type are located in a group. In this case, the group is no longer required; only the type can be considered.
[0028] According to a permissible embodiment of the method, the parameter of the API request may be the result of an XOR function that takes the seed values of the different types as input. This may represent a direct way to keep network traffic low, as the seed values of more than one seed value for different content item types can be merged. Thus, if two seed values for different content item types have changed or are requested by the client, the known seed values could be merged by the XOR function applied to the two seed values.
[0029] According to an advanced embodiment, the method may also comprise using, at the caching system, a time value greater than or equal to a predefined cache expiration threshold as the cache expiration time for a content item of an API request result. This time value may be close to or equal to the technically possible maximum value (e.g., the largest integer value). In this way, the content item may be cached on the caching system until it is actually out of date. No accidental updates may be triggered due to requests for the content item due to browser / client requests.
[0030] According to a further optional embodiment, the method may include sending—in particular from the caching system to the client—a time value as the cache expiration time for a content item, which is greater than or equal to a predefined cache expiration threshold, e.g., close to or equal to the technically possible maximum value. The client / browser thus assumes that the validity period of the content item is more or less unlimited until a difference in the seed values is detected in the caching system.
[0031] According to a further improved embodiment, the method may also comprise sending—in particular from the CMS server to the client, bypassing the caching server—using push technologies—e.g., web sockets—a message indicating an update of a seed value relating to one of the content items of a group. Due to the mechanisms of the push technology, the client may receive the message and determine that the seed value may have expired. The client may then request an updated version of the content item from the caching system, along with the newly received associated seed value. The caching system may determine that the seed values of the cached content item and the one received with the API request differ.Based on this, the caching system can request the updated content item with the new seed value from the content management server.
[0032] According to a practical embodiment of the method, the content element can be an element of an SPA or otherwise dynamically generated content. In this context, the concept proposed here can unfold its full range of advantages.
[0033] According to another practical embodiment of the method, the API request result can be a search query result. This can represent a common use case for the proposed concept. However, the content item can also be delivered and managed by a streaming analytics or business intelligence and reporting system.
[0034] According to an integral embodiment, before caching one of the content items of the group together with the associated seed value in a caching system, the method may also comprise receiving the API request at the caching system—in particular from the client—and requesting the API request result, in particular from the CMS. In this way, the loop can be closed, and outdated content items never need to be transmitted to and used by the client.
[0035] According to a further improved embodiment of the method, all seed values of content types can be requested, in particular from the caching system or the CMS or an independent auxiliary system that handles seed values, e.g., for a plurality of content elements of different CMS or search systems.
[0036] Furthermore, embodiments may take the form of a related computer program product accessible from a computer-usable or computer-readable medium that provides program code for use by or in connection with a computer or any instruction execution system. For the purposes of this specification, a computer-usable or computer-readable medium may consist of any device that may include means for storing, transmitting, distributing, or transporting the program for use by or in connection with the instruction-executing system, apparatus, or device. BRIEF DESCRIPTION OF THE DIFFERENT VIEWS OF THE DRAWINGS
[0037] It should be noted that embodiments of the invention are described with reference to different subject matters. In particular, some embodiments are described with reference to method claims, while other embodiments are described with reference to apparatus claims. However, those skilled in the art will appreciate from the above and the following description that, unless otherwise stated, in addition to any combination of features belonging to one type of subject matter, any combination of features related to different subject matters, in particular features of the method claims and features of the apparatus claims, is also considered to be disclosed within this document.
[0038] The above-defined aspects and further aspects of the present invention will become apparent from the embodiments to be described below and will be described with reference to the embodiments to which, however, the invention is not limited.
[0039] Preferred embodiments of the invention will be described by way of example only and with reference to the following drawings: Fig. 1 shows a block diagram of an embodiment of the inventive computer-implemented method for improving the caching capability of an API request result of a content delivery system. Fig. Figure 2 shows a block diagram of an embodiment with two CMSs in different data centers, a caching system, and clients. Fig. Figure 3 shows a block diagram of one embodiment of a data flow from a CDN to a content service supported by a caching seed service. Fig. 4 shows a block diagram of an embodiment of the caching system according to the invention for improving the caching capability of an API request result of a content delivery system. Fig. 5 shows an embodiment of a computer system that implements the caching system according to Fig. 4. DETAILED DESCRIPTION
[0040] The following conventions, terms and / or expressions may be used in connection with this description:
[0041] The term "caching capability" can refer to the ability to cache a content item more efficiently than in the source systems; i.e., it can reflect the ability of a system to store data—particularly data for web pages and even more specifically for single-page applications—in such a way that it can be made accessible more quickly. The system and focus in the context of this document is a caching system that can reduce network traffic from a client system to a back-end content storage system (and thereby also reduce the load on the back-end server). The caching system must request a specific content item from the back-end content storage system—e.g., a content management system—for delivery to a client system only when it is clear that the content item currently stored, i.e., cached, on the caching system is out of date.
[0042] The term “API request result” can refer to a system response in response to a function call to an application programming interface (API).
[0043] The term "content delivery system" can refer to any distributed single-core system that stores content assets of any kind. This can be a content management system, a transaction system, or a combination of the two.
[0044] The term "unique seed value" can refer to a numeric value that is unique for a particular class or group of content items. Alphanumeric values or any other digital structures can also be used instead of the numeric value. An example of a unique seed value—or simply seed value—could consist of a version number of a single content item. However, the concept proposed here relies on groups of content items, so the unique seed value can be changed if any of the content items in the group have been modified.The group may contain all content items of a particular type in a content management system (or a collection of multiple content management systems), or it may consist of a subset of content items of a particular type, or even a group of content items of different types organized by a theme.
[0045] The term "content type" can refer to a data type of a content item. Common content types include, but are not limited to, text, images, audio, video, and combinations thereof. However, any structured, semi-structured, or so-called unstructured data can be used. In particular, a group can include all content items of a content type.
[0046] The term "caching" can refer to the temporary storage of data to ensure rapid availability. Data storage can typically be performed closer to a data sink.
[0047] The term "API request" can refer to a function call that addresses an application programming interface to trigger a response. Typically, the response is a set of data. An API request typically has one or more parameters that specify the returned set of data.
[0048] The term "parameter" here can refer to a parameter in the sense of a function call, i.e., a variable as part of an API request. A specific parameter can be a seed value of a content item, e.g., displayed in a browser of a client system, which represents a specific version of the currently available or shared content item that is being re-requested in / for the client system.
[0049] The term "XOR function" can refer to a bit operation that only produces a true output if one of the input bits is logical "1" and the other input bit is logical "0"; XOR stands for "exclusive or." The XOR function can also be applied to longer bit sequences (e.g., a byte), although in this case the function is usually performed bit by bit. Alternatively, a hash function can be used.
[0050] The term “cachal expiration threshold” can refer to a numerical value – also implementable as a timestamp – after which a cached content item may have expired, i.e. is no longer current or outdated.
[0051] The term "single-page application" (SPA) can refer to a web application or website that interacts with a user by dynamically rewriting a subset of a web page, rather than loading the entire new web page from a server when only a small portion has been updated. This approach can avoid any interruption in the user experience between successive pages (or portions of pages), making the application behave more like a desktop application. In an SPA, the necessary code—e.g., HTML, JavaScript, and CSS (Cascading Style Sheets)—is fetched when a single page loads, or the corresponding resources, i.e., content elements, are dynamically loaded and added to the page as needed, usually in response to user action. At no point is the page reloaded, and control is not transferred to another page.A user's interaction with this single-page application can often involve a dynamic data exchange with the web server behind the scenes.
[0052] The term “middle tier” can refer to a layered system between a back-end content management system and a client system, i.e., in the context of this document, the caching system.
[0053] The term “3-tier content delivery system” can refer to an architecture for delivering content items from a content storage system to a client via a middle layer of networks and caching systems.
[0054] The term "content management system" (CMS) can refer to a combination of a hardware system and software components that enable it to manage the creation and modification of digital content, i.e., content items. These systems typically support multiple users in a collaborative environment, enabling document management with different control styles and workflows. In the context of this document, content items are typically managed by the CMS, which may be dedicated to single-page applications. Another feature of the CMS is a separation between content creation, publishing, and presentation of the content items.
[0055] The term "client" can refer to an endpoint system in a digital network that serves as a user interface to access information and services from a network of other systems, e.g., caching systems, network servers, back-end systems, storage systems, and so on. Examples of client systems include a personal computer, a workstation, a tablet computer, a mobile phone, or any other mobile or specially dedicated device. In this sense, a camera with a receiver or a monitor in an automobile with associated computing resources can also be a client.
[0056] The term "content delivery network" (CDN) or content distribution network can refer to a geographically distributed network of proxy servers and their associated data centers. The goal may be to provide high availability and high performance by spatially distributing the service relative to end users. Thus, a specific group of users can receive their requested content primarily from a specific data center and only exceptionally from a backup data center. The data centers can provide digital content in the form of downloadable objects such as media files, software, documents, applications, live streaming data, on-demand streaming data, access to social media sites, and so on.
[0057] A detailed description of the figures is provided below. All instructions in the figures are schematic. First, a block diagram of one embodiment of the inventive computer-implemented method for improving the caching capability of an API request result of a content delivery system is presented. Further embodiments and embodiments of the caching system for improving the caching capability of an API request result of a content delivery system are then described.
[0058] Fig. 1 shows a block diagram of a preferred embodiment of the computer-implemented method 100 for improving the caching capability of an API request result of a content delivery system. The content delivery system can be implemented at different levels: the back-end server, the middle layer for caching, and the information consumption layer, i.e., the client. Thus, the content delivery system is suitable for providing content to a client system. The method comprises maintaining 102 a unique seed value for each group of content items of a content type. A content type can—in simplified terms—refer to all text content items in the content delivery system, and in a more complex implementation, a content type (which may also have subtypes) can comprise either a subset of a content type (e.g.,Text in a specific format or on a specific overarching topic) or can refer to different basic content types and be focused on a content topic (e.g., reports, images, video clips from a specific conference). The content types can include text (subtypes of the text type can include different formats for the text, e.g., PDF format, TXT format, HTML format, OpenDocument format, etc.), pixel graphics or vector graphics, sound files, video streams, as well as results from a search engine, a database, etc.
[0059] The method 100 also includes updating 106 the seed value (e.g., similar to a version number or a hash value) for the group of content items when it is determined 104 that one of the content items of the group has been updated.
[0060] The method 100 also includes caching 108 one (i.e., at least one) of the content items of the group, along with the associated seed value, in a caching system. Here, the content item may consist of any data processable by a client system (usually a browser, but also any other data-receiving application), i.e., static content, dynamic content, lists of search results, and the like. The caching system may be part of the CDN, i.e., an associated distribution server. However, it should also be noted that the distribution server may also be implemented as a service of the hardware system that also executes the back-end CMS system. This may depend on a specific implementation of the configuration or the CDN.
[0061] Furthermore, the method 100 also comprises receiving 110 an API request—in particular from the client / associated browser—requesting a content item of the group as an API request result, wherein a parameter of the API request is a selected seed value. This parameter, used to reflect the selected seed value, would be considered an extension to normal, pre-existing API calls between clients and CDNs. If conventional API calls are used, the seed value parameter would be missing, meaning that the caching server would behave as under conventional conditions. Thus, the newly proposed method can be used in both conventional and computing environments that support the concept proposed here. A technical conflict would not be caused in any case.
[0062] Fig. 2 shows a block diagram of an embodiment with two CMSs in different data centers, a caching system 212, and a plurality of client systems 218. The content delivery network may, for example, comprise a first data center 202 and a second data center 220. Both data centers 202, 220 each comprise a content management system (not shown), each comprising an authoring component 204, 222 and a delivery component 208, 226. Once a content item (not shown) has been created or updated, it may be released 206, 224 from the respective authoring system 204, 222 to the respective delivery system 208, 226. Each created or updated content item (CI), or a group to which the content items belong, has an associated seed value. A created content item can have a seed value of 1234 for a specific group of content items. When the content item is updated (i.e.changed), the seed value can also be updated, e.g. to a value of 1235.
[0063] A corresponding content item may be present in the second data center 220. Special services may enable synchronization between the creation component 204 and the creation component 222 (see reference numeral 228), as well as between the provisioning components 208 and 226 (see reference numeral 230). The seed value for the not yet updated content item in the second data center 220 may be, for example, 9876, and after an update, 9877. The synchronization between the components may indicate that a particular content item may have been changed. Based on this, the seed value for the associated content item in the second data center can be changed autonomously.
[0064] Further shows Fig. 2, a caching server 212 as part of the CDN, which is suitable for caching a specific content item 214 and its associated actual seed value. If a client system 218 requests a specific content item from the caching system 212 via an API call and over the network connection 216, and the specific content item is not available in the caching system 212, the caching system 212 forwards the request for the content item (via an API call) over the network connection 210 to the CMS in the first data center.
[0065] In this context, for the purpose of updating a portion of an SPA, the client system 218 requests the content item along with a specific seed value as an additional parameter in the API request. If the seed value in the API request and the seed value of the content item 214 in the caching system 212 are the same, no action needs to be taken on the back-end system. The caching system simply returns the seed value to the client. If the two seed values differ, the caching system 212 forwards the request to the back-end system (i.e., the CMS) and updates the content item from the content management system of the data center 202. This typically drastically reduces network traffic.
[0066] The general idea is to track seed values per classification of content items, i.e., per group and / or content type. The seed value must encode the data center ID and classification information. A simple form of classification can be achieved using a single lowercase letter: c = content, a = data asset, and = layout mapping, t = type, i = image profile, lowercase o = other. Thus, a request for a content item A from a data center in Washington might have the seed value wdc:c:1234; analogously, a seed value from the Frankfurt data center for data assets would be encoded as fra:a:5678. To calculate aggregate seed values, an XOR function can be used. If all participating lowercase letters are sorted alphabetically, a combined seed value for data assets and content is (for example) fra:ac:9012.However, such a format, which could be used as a hidden seed value generated by a caching seed service, would not be made visible to users.
[0067] This cache seed service can be accessed through a specific cache seed service API call. A call from a client system to load seed values can take the form: GET / delivery / v1 / seeds?classifications={classifications}
[0068] A JSON (JavaScript Object Notation) response can then contain a combined seed value for the given classifications, as well as the individual seed values for each classification. For example, / delivery / v1 / seeds?classifications=content,asset,content-type can return: { "content": "fra: c: 1234", "asset": "fra:a:354354", "content-type": "fra:t: 3253466", "combined":"fra:act 348767593":}.
[0069] Another example of the cache seed service API would be a seed validation call (intercepted by a dispatcher): GET / delivery / v1 / seed / validation / {seed-value}
[0070] An associated JSON response contains validation results. In case of an error, the valid seed value is returned.
[0071] For example, / delivery / v1 / seeds / validation / Classifications =wcd:ac:123456 may return: { "valid": true} or { "valid": false, "value": "fra:ac: 32465231"}. At least three cases must be distinguished: Case 1: Cache error (cache miss) at the CDN
[0072] The client sends a cache seed value with the request and a cache error occurs at the CDN, e.g., the caching system 212. Then, a dispatcher as part of the backend server (cf. Fig. 3) Use the provided data center information in the seed value to check whether the seed value was generated in the global data center. If the provided seed value matches the current seed value, the dispatcher can send the API request as usual and set the configured cache headers for edge control (to a very long maximum age).
[0073] If the provided seed value does not match, the dispatcher calls the cache seed service to obtain a valid seed for the current data center (via / validate...) and sends a redirect for that same URL, simply replacing the seed value with the current value. Note that this should only occur in very rare cases (e.g., during a data center failover). This safely prevents the delivery of outdated cache data for a newer seed value for a particular content item (or group of content items) generated in a different data center. Case 2: Expired seed value on the CDN
[0074] If a client 200 sends a cache seed value with the corresponding API request and an expired value is present at the cache on the CDN, the dispatcher can validate the data center information (as before). If a match is found, the dispatcher can safely skip the actual API call and return a 304 "not modified" code instead. As a result, the CDN is informed that the cached value is still valid, and the CDN reinserts it into its expiration cache. Otherwise, a redirect command is sent (the same as in the cache error workflow above). Case 3: Unexpired cache hit on the CDN
[0075] In this case, a result of the API request is delivered by the CDN as usual.
[0076] Fig. 3 shows a block diagram 300 of one embodiment of a data flow from a CDN to a content service supported by a cache seed service 310. An API request may arrive at the CDN 302, which may be managed by component 304, which may be, for example, an AKAMAI system (other CDN management systems may also be used). The CDN management component 304 sends the request to the backend server. The backend server has a dispatcher 306, from which the request is forwarded to a specific service 308 for serving the content. In parallel, the dispatcher 306 calls the cache seed service 310. If the data center information in the cache seed value does not match the current data center, the cache seed service is called, and a corresponding redirection command is sent.Otherwise, dispatching is performed as in conventional systems and a value of a very long maximum age is sent.
[0077] Client-side cache seed management can be performed as follows: All clients can ignore the cache seed concept and operate as traditional systems (caching remains as poor as in known systems). However, the current cache seed values for specific content elements or their classes are available via a public API call. The cache seed values are also exposed in the "page" rendering context, allowing subsequent requests to use a valid seed value. The client is free to reload the seed values at appropriate times, e.g., at regular time intervals (e.g., every minute) or when triggered by a user-pressed refresh button.
[0078] A data center change—admittedly a rare case—would be handled by the CDN management component 304. However, in a typical flow, requests from a given client may always be routed to the same data center. Seed values obtained from the first data center are not valid in the second data center, even if they are still valid; as a result, the client may receive a redirect to a second data center's version of the current seed value (in the example above, from the first data center, DC1:c:12352 DC":C9877).
[0079] If a content item hasn't been updated for long periods of time, the content items remain stable on the caching systems, meaning the caching system doesn't need to force the content item to be updated in the CMS's caching system. Therefore, after a while, almost all API calls should result in CDN caching hits (i.e., the content items are found in the caching systems).
[0080] The client system can also control how often the seed values are validated by a given call. As a result, and if the most recent seed value was used as a parameter in the respective API request, the maximum latency is the published latency (max-age).
[0081] Fig. 4 shows a block diagram of an embodiment of the caching system 400 according to the invention for improving the caching capability of an API request result of a content delivery system. The content delivery system is also suitable for providing content to a client system. The caching system comprises means—in particular, a suitable seed management unit (or a suitable seed management module) 402—for maintaining a unique seed value for each group of content items of a content type, and means—in particular, a suitable update unit (or a suitable update module) 404—for updating the seed value for the group of content items when it has been determined—by a determination unit (or a determination module) 406—that one of the content items of the group has been updated.
[0082] In addition, the caching system 400 comprises means - in particular a suitable caching unit (or a suitable caching module) - for caching a content element of the group together with the associated seed value in a caching system and means - in particular a suitable receiver unit (or a suitable receiver module) 408 - for receiving an API request by the caching system which requests a content element of the group as an API request result, wherein a parameter of the API request is a selected seed value.
[0083] Embodiments of the invention may be implemented with almost any type of computer, regardless of whether the platform is capable of storing and / or executing a particular program code.
[0084] Fig.5 shows, as an example, a computer system 500—in particular a cache system—suitable for executing program code in connection with the proposed method.
[0085] Computer system 500 is merely one example of a suitable computer system and is not intended to suggest any limitation on the scope or functionality of embodiments of the invention described herein, regardless of whether computer system 500 can be implemented with and / or perform any of the functionality set forth above. There are components within computer system 500 that are usable with numerous other general-purpose or special-purpose computing system environments or configurations.Examples of known data processing systems, environments, and / or configurations that may be suitable for use with the computer system / server 500 include, without limitation, personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network computers, minicomputer systems, mainframe computer systems, and distributed cloud computing environments that include any of the above-mentioned systems or devices, and the like. The computer system / server 500 may be described in the general context of computer system-executable instructions, such as program modules, executed by the computer system 500. In general, the program modules may include routines, programs, objects, components, logic, data structures, etc.that perform specific tasks or implement specific abstract data types. The computer system / server 500 may operate in distributed cloud computing environments where tasks are performed by remote processing units connected via a data transmission network. In a distributed cloud computing environment, program modules may be located on both local and remote computer system storage media, such as memory storage units.
[0086] As shown in the figure, the computer system / server 500 is depicted in the form of a general-purpose computing device. The components of the computer system / server 500 may include, but are not limited to, one or more processors or processing units 502, system memory 504, and a bus 506 that connects various system components, such as the system memory 504 and the processor 502. The bus 506 represents one or more of several types of bus structures, such as a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus, using a variety of bus architectures.By way of example and not limitation, such architectures include an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus, an Enhanced ISA (EISA) bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnects (PCI) bus. The computer system / server 500 typically includes a variety of media readable by a computer system. Such media may be any available media accessible by the computer system / server 500, and include both volatile and non-volatile media, removable and non-removable media.
[0087] System memory 504 may include computer system-readable media in the form of volatile memory, such as random access memory (RAM) 508 and / or cache memory 510. Computer system / server 500 may further include other removable / non-removable, volatile / non-volatile storage media of the computer system. For example only, a storage system 512 may be provided for reading from and writing to a non-removable, non-volatile magnetic medium (not shown and commonly referred to as a "hard drive"). Although not shown, a magnetic disk drive may be provided for reading from and writing to a removable, non-volatile magnetic disk (e.g., a "floppy disk") and an optical disk drive may be provided for reading from or writing to a removable, non-volatile optical disk such as a CD-ROM, DVD-ROM, or other optical media.In such cases, they may each be connected to bus 506 via one or more media data interfaces. As further shown and described below, memory 504 may contain at least one program product having a set of program modules (e.g., at least one) configured to perform the functions of embodiments of the invention.
[0088] The program / service may be stored in memory 504, including a set of program modules 516 (at least one), as well as an operating system, one or more application programs, other program modules, and program data, by way of example and not limitation. The operating system, the one or more application programs, the other program modules, and the program data, and / or a combination thereof, may comprise an implementation of a network environment. The program modules 516 generally perform the functions and / or methods of embodiments of the invention as described herein.
[0089] The computer system / server 500 may also communicate with one or more external devices 518, such as a keyboard, a pointing device, a display 520, etc.; one or more devices that allow a user to interact with the computer system / server 500; and / or one or more devices (e.g., a network card, a modem, etc.) that allow the computer system / server 500 to communicate with one or more other computing devices. Such communication may occur via input / output (I / O) interfaces 514. Still further, the computer system / server 500 may communicate with one or more networks, such as a local area network (LAN), a wide area network (WAN), and / or a public network (e.g., the Internet), via a network adapter 522.As shown, network adapter 522 may communicate with the other components of computer system / server 500 via bus 506. It should be understood that other hardware and / or software components, although not shown, may be used in conjunction with computer system / server 500. Examples include, but are not limited to: microcode, device drivers, redundant processing units, external disk arrays, RAID systems, tape drives, and data archival storage systems, etc.
[0090] Further, the caching system 400 may be connected to the bus system 506 to improve the caching capability of an API request result of a content delivery system.
[0091] The description of the various embodiments of the present invention has been presented for purposes of illustration, but is not intended to be exhaustive or limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein has been chosen to best describe the principles of the embodiments, practical application, or technical improvement over existing technologies in the marketplace, or to enable others skilled in the art to understand the embodiments disclosed herein.
[0092] The present invention may be embodied as a system, a method, and / or a computer program product. The computer program product may comprise a computer-readable storage medium (or media) having computer-readable program instructions embodied thereon for causing a processor to perform aspects of the present invention.
[0093] The medium can be an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system for a propagation medium. Examples of computer-readable media can include semiconductor or solid-state memory, magnetic tape, a removable computer diskette, random access memory (RAM), read-only memory (ROM), a rigid magnetic disk, and an optical disk. Current examples of optical disks include CD-ROM (Compact Disk Read Only Memory), RD-RW (Compact Disk Read / Write), DVD, and Blu-ray Disc.
[0094] The computer-readable storage medium may be any physical device capable of holding and storing instructions for use by an instruction-executing system. The computer-readable storage medium may be, for example, but not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. A non-exhaustive list of more specific examples of the computer-readable storage medium includes the following: a portable computer diskette, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM).Flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD), memory stick, floppy disk, mechanically encoded device such as punched cards or raised structures in a groove on which instructions are stored, and any suitable combination thereof. A computer-readable storage medium, as used herein, shall not be construed as carrying transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., pulses of light traveling through fiber optic cables), or electrical signals carried through a wire.
[0095] Computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to respective computing / processing units or to an external computer or storage unit via a network such as the Internet, a local area network, a wide area network, and / or a wireless network. The network may include copper transmission cables, fiber optic transmission lines, wireless transmission, routers, firewalls, switching units, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing unit receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium within the respective computing / processing unit.
[0096] Computer-readable program instructions for performing operations of the present invention may be assembly language instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state-setting data, or either source code or object code, written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, or the like, as well as conventional procedural programming languages such as the C programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server.In the latter case, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, over the Internet using an Internet service provider). In some embodiments, electronic circuits, including, for example, programmable logic circuits, field programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), may execute the computer-readable program instructions by utilizing state information of the computer-readable program instructions to personalize the electronic circuits to perform aspects of the present invention.
[0097] Aspects of the present invention are described herein with reference to flowchart and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It should be understood that each block of the flowchart and / or block diagrams, as well as combinations of blocks in the flowchart and / or block diagrams, may be implemented by computer-readable program instructions.
[0098] These computer-readable program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that the instructions, executed via the processor of the computer or other programmable data processing apparatus, produce means for implementing the functions / steps defined in the flowchart and / or block diagram block(s).These computer-readable program instructions may also be stored on a computer-readable storage medium that can direct a computer, a programmable data processing apparatus, and / or other devices to function in a particular manner, such that the computer-readable storage medium having instructions stored thereon comprises an article of manufacture, including instructions that implement aspects of the function / step specified in the block(s) of the flowchart and / or block diagrams.
[0099] The computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of process steps to be performed on the computer, other programmable device, or other device to produce a computer-executing process such that the instructions executing on the computer, other programmable device, or other device implement the functions / steps specified in the block(s) of flowchart and / or block diagram.
[0100] The flowcharts and / or block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowcharts or block diagrams may show a module, segment, or portion of instructions comprising one or more executable instructions for performing the particular logical function(s). In some alternative implementations, the functions indicated in the blocks may occur in a different order than shown in the figures. For example, two blocks shown in sequence may actually execute substantially concurrently, or the blocks may sometimes execute in reverse order depending on the corresponding functionality.It is further to be understood that each block of the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by special purpose hardware-based systems that perform the specified functions or steps, or by combinations of special purpose hardware and computer instructions.
[0101] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It is further understood that the terms "comprises" and / or "comprising," when used in this specification, indicate the presence of stated features, integers, steps, acts, elements, and / or components, but do not preclude the presence or addition of further features, integers, steps, acts, elements, components, and / or groups thereof.
[0102] The corresponding structures, materials, acts, and equivalents of all means or step-plus-function elements in the following claims are intended to encompass any structure, material, or act for performing the function in combination with other claimed elements as specifically claimed. The description of the present invention has been presented for purposes of illustration and description, but is not intended to be exhaustive or limiting of the invention in the form disclosed. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the invention.The embodiments were chosen and described in order to best explain the principles of the invention and its practical application and to enable others skilled in the art to understand the invention for various embodiments with various modifications as are suited to the particular use contemplated.
Claims
[1] A computer-implemented method for improving the caching capability of an API request result of a content delivery system adapted to deliver content to a client system, the method comprising - Maintaining, through a content management system, a unique seed value for each group of dynamically changing content elements of a specific type of single-page application (SPA), - if it was detected that one of the group's content items was updated, - Updating, by the content management system, the unique seed value for the group of content items to provide an updated seed value, - Caching one of the content elements of the group together with the updated seed value in a caching system, - receiving, by the caching system, an API request from the client system requesting, as an API request result, a content item of the group of the specific type, wherein a parameter of the API request is a selected seed value, wherein the selected seed value is associated with the group, and if a difference between the updated seed value and the selected seed value is detected by the caching system, requesting a corresponding updated content item as the API request result. [2] The method of claim 1, further comprising - The client system retrieves the selected seed value for the group from an intermediate seed value storage server. [3] Method according to one of the preceding claims, further comprising - periodically receiving an API request for the group's content item at the caching system. [4] A method according to any one of the preceding claims, wherein the API request requests, as an API request result, content from elements belonging to different groups of content element types. [5] The method of claim 4, wherein the parameter of the API request is a result of an XOR function having the seed values of the different types as input. [6] Method according to one of the preceding claims, further comprising - Using a time value greater than or equal to a predefined cache expiration threshold as the cache expiration time for a content item of an API request result at the caching system. [7] Method according to one of the preceding claims, further comprising - Sending a time value as the cache expiration time for a content item that is greater than or equal to a predefined cache expiration threshold. [8] Method according to one of the preceding claims, further comprising - Pushing a message to the client system, where the message indicates an update to a seed value belonging to one of the content items in a group. [9] Method according to one of the preceding claims, wherein the API request result is a result of a search query. [10] A method according to any one of the preceding claims, further comprising, prior to caching one of the content items of the group together with the associated seed value in a caching system: - Receiving the API request at the caching system, and - Request the API request result. [11] A method according to any preceding claim, wherein each of the seed values of the content types is requestable. [12] Caching system for improving the caching capability of an API request result of a content delivery system suitable for delivering content to a client system, comprising the method - Means for maintaining, through a content management system, a unique seed value for each group of dynamically changing content elements of a particular type of single-page application, - means for updating, by the content management system, the seed value for the group of content items when it is detected that one of the content items of the group has been updated, - means for caching one of the contents of the group together with the associated seed value in a caching system, - means for receiving, by the caching system, an API request from the client system requesting, as an API request result, a content item of the group of the specific type, wherein a parameter of the API request is a selected seed value, the selected seed value being associated with the group, and if a difference between the updated seed value and the selected seed value is detected by the caching system, requesting a corresponding updated content item as the API request result. [13] The caching system of claim 12, wherein the caching system comprises - Means for retrieving the selected seed value for the group by the client system from an intermediate seed value storage server. [14] The caching system of claim 12 or 13, wherein the API request requests, as an API request result, content of items belonging to different groups of content item types. [15] The caching system of claim 14, wherein the parameter of the API request is a result of an XOR function having the seed values of the different types as input. [16] A buffer system according to any one of claims 12 to 15, further comprising - means for using a time value greater than or equal to a predefined cache expiration threshold as a cache expiration time for a content item of an API request result at the caching system. [17] A buffer system according to any one of claims 12 to 16, further comprising - means for sending a time value as a cache expiration time for a content item that is greater than or equal to a predefined cache expiration threshold. [18] A caching system according to any one of claims 12 to 17, wherein the caching system represents a middle layer of a three-tier content delivery system comprising a content management system, the caching server and a client system. [19] A computer program product for improving the caching capability of an API request result of a content delivery system suitable for providing content to a client system, the computer program product comprising a computer-readable storage medium having program instructions embodied thereon, the program instructions being executable by one or more computer systems or controllers to carry out a method according to any one of claims 1 to 11.
Citation Information
Patent Citations
CN000106657249A
System and Method for Communication Between Portal Applications and Portlet Containers
US20110078708A1
Generating and providing low-latency cached content
US20200034050A1
Web accelerator apparatus, system, and method
US7788291B2