The present invention relates generally to state synchronization, and more particularly to implementing synchronization of state information between instances of an application as well as between different applications in an efficient, scalable manner.
Today, users may often use multiple computing devices, such as mobile computing devices and desktop computing devices. In addition, such users may utilize multiple instances of an application on these computing devices. For example, instances of an e-mail application may be loaded onto a laptop computer, a smartphone and a desktop computer. In this way, the user may have access to the same application and/or application data on multiple devices. For instance, the user may check an e-mail account on the user's desktop computer at home and then later check the e-mail account on the user's smartphone while running errands.
As a result of having multiple instances of an application on multiple devices, the application state, such as application settings, for each of the instances of the application needs to be synchronized in order for the user to be provided with a seamless and consistent experience. That is, the application state, such as application settings, for each of the instances of the application needs to be synchronized in order for each application to perform consistently regardless of which device the user is using. For example, if the user configures a new e-mail account within an e-mail application on a laptop computer, then the new e-mail account should be reflected within the e-mail application on the user's desktop computer. As a result, the application state for each of the instances of the application needs to be synchronized.
Currently, such instances of an application become synchronized by creating an interface with a remote service (e.g., web services, such as JAX-RS services) and have those instances periodically synchronize in order to maintain consistency. Unfortunately, such a synchronization process occurs at unpredictable times. Furthermore, such a synchronization process may have unpredictable results depending on which application instance is synchronized first.
In one embodiment of the present invention, a method for implementing synchronization of state information in an efficient, scalable manner comprises receiving a request relayed from a first server, where the request is a request from a first client device to obtain state information stored in a scope, where the scope is distributed over one or more partitions and where the request comprises a key associated with a value corresponding to the state information. The method further comprises identifying one of the one or more partitions storing the value associated with the key. Additionally, the method comprises obtaining the value from the one of the one or more partitions. In addition, the method comprises sending, by a processor, the value to the first server to be relayed to the first client device.
Other forms of the embodiment of the method described above are in a system and in a computer program product.
The foregoing has outlined rather generally the features and technical advantages of one or more embodiments of the present invention in order that the detailed description of the present invention that follows may be better understood. Additional features and advantages of the present invention will be described hereinafter which may form the subject of the claims of the present invention.
A better understanding of the present invention can be obtained when the following detailed description is considered in conjunction with the following drawings, in which:
The present invention comprises a method, system and computer program product for implementing synchronization of state information in an efficient, scalable manner. In one embodiment of the present invention, a shared state server receives a request from a client device to access a shared state scope containing state information. The shared state scope is distributed over one or more partitions via the use of a “data grid” thereby increasing scalability. The request received from the client device is relayed to a server, referred to herein as the “data grid server,” by the shared state server, where the data grid server is responsible for maintaining the data grid comprised of an in-memory cache and partitions outside of the in-memory cache. The request may include a key associated with a value corresponding to the requested state information. A determination is made by the data grid server using a routing table as to whether the requested state information is stored in the in-memory cache of the data grid server. The routing table includes a listing of keys and associated containers of the in-memory cache or associated partitions outside of the in-memory cache storing the values associated with the keys. If the requested state information is not stored in the in-memory cache (i.e., a cache miss), then the data grid server identifies the partition outside of the in-memory cache, such as in a separate physical machine, storing the value associated the key. The data grid server then obtains the value from the identified partition and sends the obtained value to the shared state server to be relayed to the requesting client device. In this manner, the state information can be stored in a scalable manner thereby improving the efficiency in synchronizing state information.
In the following description, numerous specific details are set forth to provide a thorough understanding of the present invention. However, it will be apparent to those skilled in the art that the present invention may be practiced without such specific details. In other instances, well-known circuits have been shown in block diagram form in order not to obscure the present invention in unnecessary detail. For the most part, details considering timing considerations and the like have been omitted inasmuch as such details are not necessary to obtain a complete understanding of the present invention and are within the skills of persons of ordinary skill in the relevant art.
Referring now to the Figures in detail,
In one embodiment, shared state server 102 is configured to synchronize the state information in an efficient, scalable manner using the data grid as discussed in further detail below. The state information (e.g., user-wide state information, device-wide state information, application-specific state information) stored within the state scope can be shared among the multiple instances of an application residing on multiple client devices 101. For example, the state information in a shared state scope can be shared among an instance of an application on a laptop computer and an instance of the application on a desktop computer. Furthermore, the state information may include common information (e.g., user information) that is shared among different applications. For example, common user information may be shared among multiple different applications thereby negating the requirement of each application maintaining a separate copy of common user information. In this manner, the state information of an application having multiple instances on multiple client devices 101 can be synchronized among these client devices 101 (e.g., between a mobile computing device and a desktop computing device) without requiring periodic synchronization as discussed further below. Furthermore, in this manner, the state information containing common information used by different applications can be synchronized among these applications without requiring periodic synchronization as discussed further below. A description of the hardware configuration of shared state server 102 is provided further below in connection with
Network 103 may be, for example, a local area network, a wide area network, a wireless wide area network, a circuit-switched telephone network, a Global System for Mobile Communications (GSM) network, Wireless Application Protocol (WAP) network, a WiFi network, an IEEE 802.11 standards network, various combinations thereof, etc. Other networks, whose descriptions are omitted here for brevity, may also be used in conjunction with system 100 of
While
Referring now to
Referring again to
Shared state server 102, data grid server 104 may further include a communications adapter 209 coupled to bus 202. Communications adapter 209 of shared state server 102, data grid server 104 interconnects bus 202 with an outside network (e.g., network 103 of
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or computer program product. Accordingly, aspects of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, micro-code, etc.) or an embodiment combining software and hardware aspects that may all generally be referred to herein as a “circuit,” ‘module” or “system.” Furthermore, aspects of the present invention may take the form of a computer program product embodied in one or more computer readable medium(s) having computer readable program code embodied thereon.
Any combination of one or more computer readable medium(s) may be utilized. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the C programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, 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, through the Internet using an Internet Service Provider).
Aspects of the present invention are described below with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the present invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the function/acts specified in the flowchart and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer readable medium that can direct a computer, other programmable data processing apparatus, or other devices to function in a particular manner, such that the instructions stored in the computer readable medium produce an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the function/acts specified in the flowchart and/or block diagram block or blocks.
As stated in the Background section, as a result of having multiple instances of an application on multiple devices, the application state, such as application settings, for each of the instances of the application needs to be synchronized in order for the user to be provided with a seamless and consistent experience. That is, the application state, such as application settings, for each of the instances of the application needs to be synchronized in order for each application to perform consistently regardless of which device the user is using. For example, if the user configures a new e-mail account within an e-mail application on a laptop computer, then the new e-mail account should be reflected within the e-mail application on the user's desktop computer. As a result, the application state for each of the instances of the application needs to be synchronized. Currently, such instances of an application become synchronized by creating an interface with a remote service (e.g., web services, such as JAX-RS services) and have those instances periodically synchronize in order to maintain consistency. Unfortunately, such a synchronization process occurs at unpredictable times. Furthermore, such a synchronization process may have unpredictable results depending on which application instance is synchronized first.
The principles of the present invention provide a means for synchronizing the state information of an application among multiple instances of the application without requiring periodic synchronization in an efficient, scalable manner as discussed further below in connection with
As discussed above,
Referring to
Containers 303 function as partitions that store portions of the data (state information) in in-memory cache 301. Combining the data stored by all of the containers 303 defines the total data stored by in-memory cache 301. In one embodiment, the memory address space associated with containers 303 is virtualized. That is, containers 303 may each map to a portion of the shared address space though they may be run by different computing systems.
The “in-memory data grid” is comprised of in-memory cache 301 and the partitions, and shards, if applicable, that may reside on separate physical machines as discussed below. In one embodiment, the in-memory data grid may use a hash function or key-value pairs to store data in containers 303 and in the partitions, and shards, if applicable, that may reside on separate physical machines. In one embodiment, routing table 302 stores the necessary information (e.g., a list of keys and the associated containers 303 of in-memory cache 301 or associated partitions outside of in-memory data cache 301 storing the values (i.e., the state information) associated with the keys) to determine if the state information requested from a client device 101 is stored within in-memory cache 301, and if so, which container 303 stores the requested state information. By having an in-memory cache 301 storing state information, the requested state information may be obtained quicker if the requested state information is stored within in-memory cache 301 (i.e., a cache hit). If, however, the requested state information is not stored within in-memory cache 301 (i.e., a cache miss), then data grid server 104 will obtain the requested state information from the partition and shard, if applicable, outside of in-memory cache 301 identified in routing table 302 as discussed in further detail below. For example, routing table 302 may store a list of keys and the associated partitions, and shards, if applicable, that store the value (i.e., the state information) associated with the key.
As discussed above, the state information is stored in multiple partitions or “shared state scopes” (also referred to as simply “scopes”). In one embodiment, each shared state scope is distributed over one or more partitions, which may or may not reside on different physical machines, thereby increasing scalability. For example, the state information in a scope may be distributed over “partition A” 304A and “partition B” 304B of server 305A (identified as “server A” in
Furthermore, each partition 304 may be further partitioned into what is referred to herein as “shards” providing further scalability. For example, partition 304C of server 305B includes shard A 306A and shard B 306B. Shards 306A-306B may collectively or individually be referred to as shards 306 or shard 306, respectively. Each shard 306 may be representative of data stored on behalf of a company thereby providing multitenancy. For example, shard 306A may store state information on behalf of company A and shard 306B may store state information on behalf of company B. Each partition 304 may include any number of shards 306 and
Referring again to
Each container 303 in in-memory cache 301 may be a virtual machine (e.g., Java® Virtual Machine (JVM)) that stores one or more data objects as illustrated in
Referring now to
Referring to
In step 402, shared state server 102 relays the received request from client device 101 to data grid server 104. As stated above, the request includes a key associated with a value corresponding to the requested state information. For example, each key may be associated with a container 303 or partition 304 (e.g., partition 304A of server 305A) that stores the value associated with the key. Such information is stored in routing table 302 which is used by data grid server 104 to determine the location of the requested state information.
In step 403, a determination is made by data grid server 104 as to whether the requested state information is stored in in-memory cache 301. For example, routing table 302 may be used by data grid server 104 to determine if the key provided in the request of step 401 is associated with a container 303 of in-memory cache 301 or associated with a partition 304 outside of in-memory cache 301.
If the requested state information is stored in in-memory cache 301 (i.e., a cache hit), then, in step 404, data grid server 104 retrieves the value (i.e., the state information) stored in the container 303 of in-memory cache 301 that is associated with the key provided in the request of step 401. That is, if the key provided in the request of step 401 is associated with a container 303 of in-memory cache 301, then, in step 404, data grid server 104 retrieves the value (i.e., the state information) stored in the container 303 of in-memory cache 301 that is associated with the key.
If, however, the requested state information is not stored in in-memory cache 301 (i.e., a cache miss), then, in step 405, data grid server 104 identifies the partition 304 and shard 306, if applicable, storing the value associated the key provided in the request of step 401. In one embodiment, the partition 304 and shard 306, if applicable, is identified using routing table 302.
In step 406, data grid server 104 obtains the value from the identified partition 304 and shard 306, if applicable, storing the value associated the key provided in the request of step 401. For example, referring to
Upon retrieving the value stored in container 303 of in-memory cache 301 or upon obtaining the value from partition 304 and shard 306, if applicable, data grid server 104, in step 407, data grid server 104 sends the retrieved value/obtained value to shared state server 102.
In step 408, shared state server 102 relays the retrieved value/obtained value to the requesting client device 101 (e.g., client device 101A).
In step 409, shared state server 102 receives an update to the state information by the requesting client device 101. For example, once client device 101 obtains the state information stored in the requested shared state scope, client device 101 may perform various operations on the state information. For example, if the user of client device 101 configures a new e-mail account within an e-mail application, then the state information directed to application settings is modified/updated to reflect the new e-mail account. Client device 101 may immediately send the update to the state information to shared state server 102 or after a period of time, such as in the case where the shared state scope is defined as only being accessible by one client device 101 at a time. In such a scenario (where the shared state scope is defined as only being accessible by one client device 101 at a time), client device 101 may simply send all of its updates to shared state server 102 at one particular time.
In step 410, a determination is made by shared state server 102 as to whether there are other instances of the application, whose state information was updated, being used by other client devices 101 with access to the requested shared state scope.
If there are other instances of the application, whose state information was updated, being used by other client devices 101 with access to the requested shared state scope, then, in step 411, server 102 notifies those client device(s) 101 with access to the requested shared state scope regarding the update to the state information for the application.
Referring now to
If the updated state information corresponds to common information that is shared among different applications from client devices 101 with access to the requested shared state scope, then, in step 413, server 102 notifies other client device(s) 101 with access to the requested shared state scope regarding the update to the common information used by other application(s) of the notified client device(s) 101.
If, however, the updated state information does not correspond to common information that is shared among different applications from client devices 101 with access to the requested shared state scope, then, in step 414, shared state server 102 does not notify other client devices 101 regarding such an update to the state information.
In some implementations, method 400 may include other and/or additional steps that, for clarity, are not depicted. Further, in some implementations, method 400 may be executed in a different order presented and that the order presented in the discussion of
The descriptions of the various embodiments of the present invention have been presented for purposes of illustration, but are not intended to be exhaustive or limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein was chosen to best explain the principles of the embodiments, the practical application or technical improvement over technologies found in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.
The present application is a continuation application of pending U.S. patent application Ser. No. 13/903,174, which was filed on May 28, 2013, which is assigned to the assignee of the present invention. The present application claims priority benefits to U.S. patent application Ser. No. 13/903,174.
Number | Name | Date | Kind |
---|---|---|---|
6049838 | Miller et al. | Apr 2000 | A |
6594671 | Aman | Jul 2003 | B1 |
7899917 | Chitre et al. | Mar 2011 | B2 |
7900203 | Ozzie et al. | Mar 2011 | B2 |
8386540 | McAlister et al. | Feb 2013 | B1 |
8463884 | Clinton et al. | Jun 2013 | B2 |
8539567 | Logue et al. | Sep 2013 | B1 |
8613070 | Borzycki et al. | Dec 2013 | B1 |
8635373 | Supramaniam et al. | Jan 2014 | B1 |
8666933 | Pizzorni et al. | Mar 2014 | B2 |
8682916 | Wong et al. | Mar 2014 | B2 |
8769127 | Selimis et al. | Jul 2014 | B2 |
8806570 | Barton et al. | Aug 2014 | B2 |
8832712 | Houston et al. | Sep 2014 | B2 |
9003299 | Freedman | Apr 2015 | B2 |
9037714 | Belchee et al. | May 2015 | B2 |
9116862 | Rath | Aug 2015 | B1 |
9331937 | Koponen et al. | May 2016 | B2 |
9361122 | Chen et al. | Jun 2016 | B2 |
9542231 | Khan et al. | Jan 2017 | B2 |
9563413 | Chan et al. | Feb 2017 | B2 |
9632828 | Mehta et al. | Apr 2017 | B1 |
9633098 | Aissi et al. | Apr 2017 | B2 |
9674731 | Raleigh et al. | Jun 2017 | B2 |
9690836 | Johnsen et al. | Jun 2017 | B2 |
9740761 | Adoc, Jr. et al. | Aug 2017 | B2 |
9800608 | Korsunsky et al. | Oct 2017 | B2 |
9854063 | Borzycki et al. | Dec 2017 | B2 |
9888068 | Kamath et al. | Feb 2018 | B2 |
20020198883 | Nishizawa et al. | Dec 2002 | A1 |
20060085594 | Roberson et al. | Apr 2006 | A1 |
20060190468 | Mihaila et al. | Aug 2006 | A1 |
20070101326 | Cai et al. | May 2007 | A1 |
20070203943 | Adlung | Aug 2007 | A1 |
20080320244 | Shen | Dec 2008 | A1 |
20090112779 | Wolf et al. | Apr 2009 | A1 |
20090172101 | Arthursson | Jul 2009 | A1 |
20100030995 | Wang et al. | Feb 2010 | A1 |
20100262958 | Clinton | Oct 2010 | A1 |
20100275260 | Bergheaud | Oct 2010 | A1 |
20110055827 | Lin et al. | Mar 2011 | A1 |
20110078274 | Joachimpillai | Mar 2011 | A1 |
20110270855 | Antonysamy | Nov 2011 | A1 |
20120109926 | Novik et al. | May 2012 | A1 |
20120137210 | Dillon | May 2012 | A1 |
20120185500 | Bhogal et al. | Jul 2012 | A1 |
20120254175 | Horowitz | Oct 2012 | A1 |
20120254289 | Sathish | Oct 2012 | A1 |
20120278344 | Berg et al. | Nov 2012 | A1 |
20130047165 | Goetz | Feb 2013 | A1 |
20130066832 | Sheehan | Mar 2013 | A1 |
20130212340 | Berg et al. | Aug 2013 | A1 |
20130318158 | Teng et al. | Nov 2013 | A1 |
20140032875 | Butler | Jan 2014 | A1 |
20140095625 | Quan | Apr 2014 | A1 |
20140199979 | Singhai et al. | Jul 2014 | A1 |
20140244721 | Taine et al. | Aug 2014 | A1 |
20140258703 | Vanturennout et al. | Sep 2014 | A1 |
20140287836 | Chan | Sep 2014 | A1 |
20140289411 | Bornstein | Sep 2014 | A1 |
20140304409 | Kamath et al. | Oct 2014 | A1 |
20140334369 | Kaikkonen et al. | Nov 2014 | A1 |
20140358988 | Howard et al. | Dec 2014 | A1 |
20170063968 | Kitchen et al. | Mar 2017 | A1 |
20170177694 | Aissi et al. | Jun 2017 | A1 |
Number | Date | Country |
---|---|---|
2007128687 | Nov 2007 | WO |
Entry |
---|
Office Action for U.S. Appl. No. 13/903,130 dated Jul. 15, 2015, pp. 1-27. |
Office Action for U.S. Appl. No. 13/904,217 dated Jul. 17, 2015, pp. 1-22. |
Office Action for U.S. Appl. No. 13/904,217 dated Jan. 15, 2016, pp. 1-27. |
Office Action for U.S. Appl. No. 13/903,130 dated Jan. 15, 2016, pp. 1-26. |
Wang et al.; “A Scalable Queuing Service Based on an In-Memory Data Grid,” Proceedings 2010 IEEE 7th International Conference on e-Business Engineering (ICEBE 2010), pp. 236-243, 2010. |
Patent Application entitled “Maintaining State Synchronization of an Application Between Computing Devices as well as Maintaining State Synchronization of Common Information Between Different Applications Without Requiring Periodic Synchronization,” filed on May 28, 2013. |
Bolosky, WJ., et al., “Paxos Replicated State Machines as the Basis of a High-performance Data Store,” http://static.usenix.org/events/nsdi11/tech/full_papers/Bolosky.pdf, Feb. 18, 2012. |
Anonymous, “Efficient Run-time Scoped Memory Assignment Rules Checking,” http://priorartdatabase.com/IPCOM/000210483, Sep. 6, 2011. |
IBM, “A Mechanism for Defining Dynamic Event Sequencing Scope,” http://www.ip.com/pubview/IPCOM000167189D, Feb. 2, 2008. |
Office Action for U.S. Appl. No. 13/903,174 dated Apr. 8, 2016, pp. 1-31. |
Office Action for U.S. Appl. No. 13/903,174 dated Nov. 20, 2017, pp. 1-29. |
Office Action for U.S. Appl. No. 15/793,641 dated Feb. 26, 2018, pp. 1-21. |
Office Action for U.S. Appl. No. 15/793,488 dated Apr. 19, 2018, pp. 1-38. |
Number | Date | Country | |
---|---|---|---|
20140358988 A1 | Dec 2014 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 13903174 | May 2013 | US |
Child | 13904248 | US |