The present invention relates to data storage and, in particular, to redirecting client-side storage operations to remote storage devices.
It is common for a web site to store information on a client device. Cookies are one example of such client-side storage. Cookies retain information generated by a web site while the web site is being accessed by a user. An example of data that may be stored in a cookie is user account information, such as a user identifier and password, which may be used by a web site to automatically authenticate the user to the web site without requiring reentry by the user of their respective user identifier and password each time the user navigates to the web site.
Storing data on a client device provides several advantages to a web site. First, physical storage device requirements are decreased by storing data on the client device rather than on a central server maintained by a web site operator. Second, storing data on the client device allows additional processing to be performed by the client device rather than by the web site, improving the scalability of the web site. Accordingly, there is significant interest in utilizing client-side storage among web site developers. Additional client-side storage technologies, such as client-side database storage, are being introduced to help satisfy this interest.
Unfortunately, client-side storage can result in data being spread across multiple devices that may be used by a user to access a web site. For example, the user may access a web site from an Internet-capable phone, such as an iPhone, when shopping, from a home computer when at home, and from a work computer when at work. Information stored in client-side storage will only be available to the device on which the information was stored. For example, items placed into a “wish list” by a user while accessing a web site from a work computer will not be available to the user when they later access the same web site from their home computer. Accordingly, what is needed is a mechanism for redirecting client-side operations to remote storage locations so that data may be accessed by client devices other than the client device to which the web site directed the data.
The present invention automatically redirects client-side storage operations to remote storage devices. For example, read and write operations that are directed to a client device are redirected to one or more remote storage devices. In one embodiment, a web service generates a hypertext transfer protocol (HTTP) message and sends the HTTP message toward a user agent executing on a client device. The user agent receives the HTTP message and detects in the HTTP message a client-side storage operation directed to a client storage device. The user agent implements the client-side storage operation on a remote storage device in lieu of the client storage device.
The user agent may access defined criteria to identify a particular remote storage device from a number of potential remote storage devices. The defined criteria may include a type of service provided by the web service, a source address of the web service, a type of data that is the subject of the client-side storage operation, and the like. For example, if the HTTP message relates to an email service, the defined criteria may indicate that the client-side storage operation is to be implemented on an email remote storage device. If the source of the HTTP message is from a particular web site, such as the web site BUY.COM, the defined criteria may indicate that the client-side storage operation is to be implemented on a home server remote storage device.
The client-side storage operation may be, for example, a local storage command, a local session storage command, or a local database storage command. The client-side storage operation may be implemented on one or more remote storage devices.
In one embodiment, the user agent includes a script engine having a pre-processing phase and an execution phase. Upon detection of a script in the HTTP message, the user agent provides the script to the script engine for execution. During an initial pre-processing phase, the script engine identifies client-side storage operations and replaces the client-side storage operations with remote storage operations. The remote storage operations, for example, may invoke a remote storage engine in lieu of a local storage engine. After the pre-processing phase, the script engine performs an execution phase, wherein the script is executed. During the execution phase, the script engine executes the remote storage operations, thereby implementing the client-side storage operations on a remote storage device in lieu of the client storage device. During the pre-processing phase, the user agent may access one or more defined criteria to determine one or more remote storage devices on which the client-side storage operations should be implemented and generate remote storage operations accordingly.
According to another embodiment, the script engine may detect a client-side storage operation while executing the script and implement a remote storage operation in lieu of the client-side storage operation. For example, the user agent may include a local storage engine for implementing client-side storage operations on a client storage device and a remote storage engine for implementing client-side storage operations on remote devices. The script engine may detect in the script an invocation of a function in the local storage engine and invoke a corresponding function in the remote storage engine to implement the client-side storage operation on a remote storage device. The script engine may also access one or more defined criteria to determine one or more remote storage devices on which the client-side storage operations should be implemented and provide such information to the remote storage engine.
According to another embodiment of the invention, the user agent may include a local storage engine for implementing client-side storage operations on a client storage device and a remote storage engine for implementing client-side storage operations on one or more remote storage devices. A script engine may invoke the local storage engine to implement a client-side storage operation on the client storage device. The local storage engine may access one or more defined criteria to determine one or more remote storage devices on which the client-side storage operation should be implemented and call the remote storage engine to implement the client-side storage operation on the one or more remote storage devices in lieu of the local storage device.
Those skilled in the art will appreciate the scope of the present invention and realize additional aspects thereof after reading the following detailed description of the preferred embodiments in association with the accompanying drawing figures.
The accompanying drawing figures incorporated in and forming a part of this specification illustrate several aspects of the invention, and together with the description serve to explain the principles of the invention.
The embodiments set forth below represent the necessary information to enable those skilled in the art to practice the invention and illustrate the best mode of practicing the invention. Upon reading the following description in light of the accompanying drawing figures, those skilled in the art will understand the concepts of the invention and will recognize applications of these concepts not particularly addressed herein. It should be understood that these concepts and applications fall within the scope of the disclosure and the accompanying claims.
The present invention relates to redirecting client-side storage operations to remote storage devices in lieu of a local storage device. To provide context to the present invention,
The messages exchanged between the web server 14 and the client devices 12 can comprise any suitable message format and protocol capable of communicating the information necessary for the web server 14 to provide a desired web service to the client devices 12. According to one embodiment of the invention, the messages comprise hypertext transfer protocol (HTTP) messages.
The web server 14 may provide any type of web service to the client devices 12, such as, for example, a retail online shopping web service (e.g., the sale of toys via a WWW.TOYZ.COM web site), a document generation and modification web service, an email web service, and the like. Generally, the user agent module 18, such as the user agent module 18A, generates and sends an HTTP message towards the web server 14 in response to input from a user. For example, the user may enter a uniform resource locator (URL) such as WWW.TOYZ.COM in an address window of the user agent module 18A. The phrase “towards” means the HTTP message is being sent to an intended destination. The destination may be identified in the HTTP message, such as via a domain name or an internet protocol (IP) address, for example. In the present example, the HTTP message may contain an IP address identifying the web server 14, and the HTTP message is ultimately delivered to the web server 14 via the network 16 directly or indirectly through one or more intermediate network elements such as routers (not illustrated) and the like. The network 16 can comprise any proprietary or conventional network, or combination thereof, capable of routing messages between processing devices, such as the client devices 12 and the web server 14. Each of the client devices 12 and the web server 14 are coupled to the network 16 via an access link 20, which may comprise any suitable access technology, such as a cable or digital subscriber line (DSL) modem, WiFi, cellular technology, and the like.
In response to the HTTP message from the client device 12A, the web server 14 generates an HTTP response message and sends the HTTP response message towards the client device 12A. The HTTP response message may include a message body portion containing instructions that direct the user agent module 18A to display information on a display 22A. The message body portion may comprise a hypertext markup language (HTML) document, for example. The message body portion may also include one or more client-side storage operations that direct the user agent module 18A to access a client-side storage 24A integral with, or coupled to, the client device 12A. The client-side storage 24A may comprise any suitable storage medium, including, for example, a hard disk drive, a flash drive, a universal storage bus (USB) drive, and the like. The client-side storage operations can comprise any type of conventional or proprietary storage instructions, such as, for example, local storage instructions, session storage instructions, database storage instructions, and the like. The client-side storage operations may comprise a web storage command as defined by the W3C in one or more W3C specification documents, such as the Web Storage W3C Working Draft 29 Oct. 2009, available at www.w3.org, the contents of which are hereby incorporated herein by reference. One example of a type of data that may be stored on the client device 12A is shopping cart data 26A identifying one or more products the user has selected for purchase from the web server 14.
Assume for the purposes of illustration that the user selects a particular product for purchase from the web server 14 via the user agent module 18A. The user agent module 18A generates an HTTP message identifying the product and sends the HTTP message towards the web server 14. The web server 14 receives the HTTP message, generates an HTTP message including client-side storage instructions directing the user agent module 18A to store product identification information identifying the selected product in the client-side storage 24A, and then sends the HTTP message towards the user agent module 18A via the client device 12A. The client device 12A provides the HTTP message to the user agent module 18A, which executes the client-side storage instructions and stores the product identification information in the client-side storage 24A. For purposes of illustration, assume the user is interrupted and is unable to complete the purchase at that time.
Assume further that the user later accesses the web server 14 via the client device 12C while at home. While the client-side storage 24C similarly contains shopping cart data 26C, the shopping cart data 26C does not contain the product identification information previously stored in the shopping cart data 26A, because the client-side storage operations previously generated by the web server 14 were directed to the client device 12A, not the client device 12C. This example illustrates one problem with client-side storage inherent in many web services; the information stored on a client device 12, such as the client device 12A, is not easily, or perhaps not at all, accessible by other client devices 12, such as the client devices 12B and 12C. Thus, the user must repeat on the client device 12C the steps that were previously performed on the client device 12A to identify and select the desired product from the web server 14.
The user agent module 18A includes one or more script engines 36 which process scripts contained or referenced in any HTTP messages received by the user agent module 18A. The script engine 36 may process scripts written in any of various script languages, such as JavaScript, Jscript, or Adobe® Flex. The user agent module 18A may also include a local storage engine 38, which may be used by the user agent module 18A, or a module of the user agent module 18A, such as the script engine 36, to implement client-side storage operations directed to the client-side storage 24. The user agent module 18A may also include a remote storage engine 40 for implementing client-side storage operations on one or more of the remote storage devices 32A, 32B. While the local storage engine 38 and the remote storage engine 40 are illustrated as being separate from the script engine 36, it will be understood that the local storage engine 38 and the remote storage engine 40 could be integral with the script engine 36.
Defined criteria 42 may be maintained in a memory and/or a file. The word “criteria” may be used herein in both the singular and the plural sense, and reference to the word criteria, such as the defined criteria 42, may constitute a reference to a single criterion. The user agent module 18A may use the defined criteria 42 to identify one or more remote storage devices 32 on which a client-side storage operation should be implemented. According to one embodiment of the invention, the user agent module 18A may also use the defined criteria 42 to determine whether a client-side storage operation should be implemented on a remote storage device 32 or, alternatively, whether the client-side storage operation should be implemented on the client-side storage 24. The defined criteria 42 may be maintained in a global location that is accessible to each of the client devices 12A-12C and may be loaded into a memory of the respective client devices 12A-12C when the user agent modules 18A-18C initially load.
The defined criteria 42 can include criteria based on one or more attributes of the HTTP message, the client device 12A to which the HTTP message is addressed, contextual information such as time or date, and the like. Criteria based on one or more attributes of the HTTP message can include, for example, a type of service associated with the HTTP message, a type of data that is the subject of the client-side storage operations contained in the HTTP message, or a source address, such as a domain or URL of the HTTP message. Criteria based on the client device 12A to which the HTTP message is directed can include, for example, an address associated with the client device 12A, a location of the client device 12A, a proximity of the client device 12A to another client device 12, and the like. Location information of a mobile client device 12 may be obtained in any known manner, such as via a location detecting service, or via the service provider providing service to the mobile client device 12.
Assume that a user using the client device 12A directs the user agent module 18A to display the home page of the web service TOYZ.COM, hosted by the web server 14. For example, the user may enter the WWW.TOYZ.COM URL into a URL address field of the user agent module 18A and select “ENTER.” The user agent module 18A initiates an HTTP message to the web server 14 requesting the content of the home page. In response, the web server 14 sends the user agent module 18A, via the client device 12A, an HTTP message which contains data for displaying the home page of the TOYZ.COM web service. The HTTP message may also contain a plurality of client-side storage operations. In particular, assume that the HTTP message includes client-side storage operations which involve opening a database in the client-side storage 24A, retrieving data from the database, and displaying the data to the user on the display 22A (
Assume that the defined criteria 42 indicates that client-side storage operations contained in HTTP messages received from the TOYZ.COM web service are to be implemented on the remote storage devices 32A, 32B. Because the client-side storage operations in the HTTP message are read-type storage operations, the user agent module 18A may implement the client-side storage operations on only one of the remote storage devices 32A, 32B. The particular remote storage device 32A or 32B on which to implement read-type storage operations may be indicated during configuration of the user agent module 18A or based simply on which of the remote storage devices 32A, 32B are identified first in the defined criteria 42, for example. Assume that the user agent module 18A implements read-type storage operations on the remote storage device 32A. The user agent module 18A directs the client-side storage operations to the remote storage device 32A, which responds by providing the TOYZ.COM shopping cart data 26D from the storage device 34A. The user agent module 18A may then display the shopping cart data 26D, or a summary of such data, to the user as directed by the instructions in the HTTP message received from the web server 14.
In this manner, the user agent module 18A implements client-side storage operations on the remote storage device 32A in lieu of the client-side storage 24A. One advantage of the present invention may be illustrated by a further example wherein the user, while browsing the TOYZ.COM web service, adds another product to their shopping cart. The user agent module 18A detects the client-side storage operations associated with storing the product information in the client-side storage 24A, determines that the client-side storage operations should be implemented on the remote storage devices 32A, 32B, and implements the client-side storage operations on the remote storage devices 32A, 32B in lieu of the client-side storage 24A. Assume that the user subsequently interrupts their browsing activity. Assume further that the user, perhaps after arriving home in the evening, subsequently uses the client device 12C to access the home page of the TOYZ.COM web service, in a similar manner as described previously. The user agent module 18A receives an HTTP message from the web server 14 and, as described previously, obtains the shopping cart data 26D from the remote storage device 32A. However, in this situation, and in contrast to the example provided with respect to
According to one embodiment of the invention, the script engine 36 has a script pre-processing phase and a script execution phase. In the script pre-processing phase, the script engine 36 processes the script prior to executing the script instructions. The script engine 36 processes the script to detect any client-side storage operations. For example, the script engine 36 may parse each script instruction to determine if any script instruction is a predetermined client-side storage operation. For example, the script engine 36 may maintain a list of potential client-side storage operations, such as “open,” “read,” “save,” “store,” and the like and may determine if the script contains any such client-side storage operations during the script pre-processing phase. Table 1 contains an exemplary client-side storage operation.
The client-side storage operation “openDatabase” may comprise a function, or method, invocation of a function contained in the local storage engine 38. Assume that the script engine 36 detects the client-side storage operation during the script pre-processing phase (step 106). The script engine 36 may access the defined criteria 42 to determine a particular remote storage device(s) 32 on which the client-side storage operation should be implemented (step 108). The defined criteria 42 may be based on any desired criteria, including a type of service provided by the web service, a source address of the web service, a type of data that is the subject of the client-side storage operation, and the like. Assume that the defined criteria 42 indicates that client-side storage operations associated with HTTP messages from the TOYZ.COM web service are to be implemented on the remote storage devices 32A, 32B. In particular, assume the defined criteria 42 indicates that read-type client-side storage operations should be directed to the remote storage device 32A, and write-type client-side storage operations should be directed to both remote storage devices 32A, 32B.
Based on the defined criteria, the script engine 36 alters the client-side storage operation with a remote storage operation (step 110). For example, the client-side storage operation illustrated in Table 1 may be replaced by the remote storage operation illustrated in Table 2 below.
The remote storage operation illustrated in Table 2 may comprise a function invocation of a function contained in the remote storage engine 40. The function invocation may include various parameters, including the IP address of the remote storage device 32A (e.g., 192.168.1.2). Thus, the script engine 36 has replaced the client-side storage operation with a remote storage operation. Assume that the script engine 36 finishes the script pre-processing phase and enters the script execution phase. The script engine 36 begins executing the script. Upon execution of the remote storage operation illustrated in Table 2, the script engine 36 invokes the “remoteStorage_openDatabase” function of the remote storage engine 40 (step 112). The remote storage engine 40 receives the parameters “(“Shopping Cart”, “1.0”, “example”, “200000”, “192.168.1.2”)” and opens the database containing the TOYZ.COM shopping cart data 26D on the remote storage device 32A.
In an alternative embodiment, rather than using a remote storage engine 40, the script engine 36 may generate additional script instructions for implementing the client-side storage operations on the remote storage device 32A. For example, the script engine 36 may, upon detection of the client-side storage operation illustrated in Table 1, generate new script instructions such as those illustrated in Table 3, below.
In this embodiment, the client-side storage operation “openDatabase (“Shopping Cart”, “1.0”, “example”, “200000”)” is still replaced with the function call illustrated in Table 2, but upon execution during the script execution phase, the script function illustrated in Table 3 is invoked rather than a function in the remote storage engine 40.
According to one embodiment of the invention, the defined criteria 42 may be based on contextual information to determine whether or not to implement client-side storage on a remote storage device. In such an embodiment, a synchronization mechanism may be used to ensure that data contained in client-side storage locations, such as the client-side storage 24, is periodically synchronized with remote storage devices 32.
The data type identifier 56 may identify a type of data that is the subject of the client-side storage operations, such as video data, image data, and the like. For example, based on the criteria illustrated in
The battery level identifier 60 can indicate a battery level threshold. For example, if a battery level of the client device 12 is below an identified threshold, the client-side storage operation will be implemented on a remote storage device, but if the battery level of the client device 12 is above the identified threshold, the client-side storage operations will not be implemented on a remote storage device. Those of skill in the art will recognize the identifiers 54-60 are merely exemplary.
The system bus 74 can be any of several types of bus structures that may further interconnect to a memory bus (with or without a memory controller), a peripheral bus, and a local bus using any of a variety of commercially available bus architectures. The system memory 72 can include non-volatile memory 76 and/or volatile memory 78 (e.g., random access memory (RAM)). A basic input/output system (BIOS) 80 can be stored in the non-volatile memory 76 (e.g., ROM, EPROM, EEPROM, etc.), which can include the basic routines that help to transfer information between elements within the client device 12. The volatile memory 78 can also include a high-speed RAM such as static RAM for caching data.
The client device 12 may further include an internal hard disk drive (HDD) 82 (e.g., enhanced integrated drive electronics (EIDE) or serial advanced technology attachment (SATA)) for storage. The internal HDD 82 may also be configured for external use in a suitable chassis, such as an optical disk drive 84 (e.g., reading a compact disc read-only memory (CD-ROM) disk 86). The drives and associated computer-readable media provide non-volatile storage of data, data structures, computer-executable instructions, and so forth. For the client device 12, the drives and media accommodate the storage of any data in a suitable digital format. Although the description of computer-readable media above refers to a HDD and a removable optical media such as a CD or DVD, it should be appreciated by those skilled in the art that other types of media which are readable by a computer, such as zip drives, magnetic cassettes, flash memory cards, cartridges, and the like, may also be used in the exemplary operating environment, and further, any such media may contain computer-executable instructions for performing novel methods of the disclosed architecture.
A number of program modules can be stored in the drives and volatile memory 78 including an operating system 88; one or more application modules 90 including, for example, the user agent module 18, the script engine 36, the local storage engine 38, and the remote storage engine 40, and other program modules. All or portions of the operating system 88, applications, modules, and/or data 92 can also be cached in the volatile memory 78. It is to be appreciated that the disclosed architecture can be implemented with various commercially available operating systems or combinations of operating systems. All or a portion of the invention may be implemented as a computer program product, such as a computer usable medium having a computer readable program code embodied therein. The computer readable program code can include software instructions for implementing the functionality of the user agent module 18 and other aspects of the present invention, as discussed herein.
A user can enter commands and information into the client device 12 through one or more wired/wireless input devices, for example, a keyboard and a pointing device, such as a mouse (not illustrated). Other input devices (not illustrated) may include a microphone, an infrared (IR) remote control, a joystick, a game pad, a stylus pen, touch screen, or the like. These and other input devices are often connected to the central processing unit 70 through an input device interface 94 that is coupled to the system bus 74 but can be connected by other interfaces such as a parallel port, an IEEE 1394 serial port, a game port, a USB port, an IR interface, etc.
The client device 12 may include the display 22, which may also be connected to the system bus 74 via an interface, such as a video adapter 96. The client device 12 may operate in a networked environment using a wired and/or wireless communication network interface or adapter 98. The adapter 98 can facilitate wired and/or wireless communications to the network 16 (
The client device 12 may be operable to communicate with any wireless devices or entities operatively disposed in wireless communication, for example, a printer, a scanner, a desktop and/or portable computer via wireless technologies, such as Wi-Fi and Bluetooth, for example.
Those skilled in the art will recognize improvements and modifications to the preferred embodiments of the present invention. All such improvements and modifications are considered within the scope of the concepts disclosed herein and the claims that follow.