SYSTEM AND METHOD FOR SUPPORTING PERSISTENT STORE VERSIONING AND INTEGRITY IN A DISTRIBUTED DATA GRID
Copyright Notice:
[0001] A portion of the disclosure of this patent document contains material which is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure, as it appears in the Patent and Trademark Office patent file or records, but otherwise reserves all copyright rights whatsoever. Field of Invention:
[0002] The present invention is generally related to computer systems, and is particularly related to supporting persistence in a distributed data grid.
Background:
[0003] Modern computing systems, particularly those employed by larger organizations and enterprises, continue to increase in size and complexity. Particularly, in areas such as Internet applications, there is an expectation that millions of users should be able to simultaneously access that application, which effectively leads to an exponential increase in the amount of content generated and consumed by users, and transactions involving that content. Such activity also results in a corresponding increase in the number of transaction calls to databases and metadata stores, which have a limited capacity to accommodate that demand. This is the general area that embodiments of the invention are intended to address.
Summary:
[0004] Described herein are systems and methods that can support persistence in a distributed data grid, such as persistent store versioning and integrity. A resolver in the distributed data grid can receive a plurality of identifiers from one or more members of the distributed data grid, wherein each said identifier is associated with a persisted partition in a persistent storage for the distributed data grid. Then, the resolver can select an identifierforeach partition, wherein each selected identifier is associated with a most recent valid version of a partition. Furthermore, the resolver can determine a member in the distributed data grid that is responsible for recovering said partition from a persisted partition associated with the selected identifier. Brief Description of the Figures:
[0005] Figure 1 is an illustration of a data grid cluster in accordance with various embodiments of the invention.
[0006] Figure 2 shows an illustration of supporting persistence in a distributed data grid, in accordance with an embodiment of the invention.
[0007] Figure 3 shows an illustration of using a shared storage to support persistence in a distributed data grid, in accordance with an embodiment of the invention.
[0008] Figure 4 shows an illustration of using distributed local disks to support persistence in a distributed data grid, in accordance with an embodiment of the invention.
[0009] Figure 5 shows an illustration of supporting distributed persistent store recovery in a distributed data grid, in accordance with an embodiment of the invention.
[0010] Figure 6 shows an illustration of coordinating persistent store recovery in a distributed data grid, in accordance with an embodiment of the invention.
[0011] Figure 7 shows an illustration of supporting consistent partition recovery in a distributed data grid, in accordance with an embodiment of the invention.
[0012] Figure 8 illustrates an exemplary flow chart for supporting distributed persistent store recovery in a distributed data grid in accordance with an embodiment of the invention.
[0013] Figure 9 shows an illustration of supporting persistent store versioning in a distributed data grid, in accordance with an embodiment of the invention.
[0014] Figure 10 shows an illustration of supporting persistent store integrity in a distributed data grid, in accordance with an embodiment of the invention.
[0015] Figure 11 shows an illustration of restoring the persisted partitions in a distributed data grid, in accordance with an embodiment of the invention.
[0016] Figure 12 illustrates an exemplary flow chart for supporting persistent store versioning and integrity and in a distributed data grid, in accordance with an embodiment of the invention.
[0017] Figure 13 shows an illustration of providing a persistent snapshot of a running system in a distributed data grid, in accordance with an embodiment of the invention.
[0018] Figure 14 illustrates an exemplary flow chart for providing a persistent snapshot of a running system in a distributed data grid in accordance with an embodiment of the invention.
[0019] Figure 15 shows an exemplary block graph illustrating the resolver in accordance with an embodiment of the invention.
[0020] Figure 16 is an illustration of a functional configuration of an embodiment of the invention.
[0021 ] Figure 17 is an illustration of a computer system for implementing an embodiment of the invention.
Detailed Description:
[0022] Described herein are systems and methods that can support persistence in a distributed data grid.
Distributed Data Grid
[0023] In accordance with an embodiment, as referred to herein a "data grid cluster", or "data grid", is a system comprising a plurality of computer servers which work together to manage information and related operations, such as computations, within a distributed or clustered environment. The data grid cluster can be used to manage application objects and data that are shared across the servers. Preferably, a data grid cluster should have low response time, high throughput, predictable scalability, continuous availability and information reliability. As a result of these capabilities, data grid clusters are well suited for use in computational intensive, stateful middle-tier applications. Some examples of data grid clusters, e.g., the Oracle Coherence data grid cluster, can store the information in-memoryto achieve higher performance, and can employ redundancy in keeping copies of that information synchronized across multiple servers, thus ensuring resiliency of the system and the availability of the data in the event of server failure. For example, Coherence provides replicated and distributed (partitioned) data management and caching services on top of a reliable, highly scalable peer-to-peer clustering protocol.
[0024] An in-memory data grid can provide the data storage and management capabilities by distributing data over a number of servers working together. The data grid can be middleware that runs in the same tier as an application server or within an application server. It can provide management and processing of data and can also push the processing to where the data is located in the grid. In addition, the in-memory data grid can eliminate single points of failure by automatically and transparently failing over and redistributing its clustered data management services when a server becomes inoperative or is disconnected from the network. When a new server is added, or when a failed server is restarted, it can automatically join the cluster and services can be failed back over to it, transparently redistributing the cluster load. The data grid can also include network-level fault tolerance features and transparent soft re-start capability.
[0025] In accordance with an embodiment, the functionality of a data grid cluster is based on using different cluster services. The cluster services can include root cluster services, partitioned cache services, and proxy services. Within the data grid cluster, each cluster node can participate in a number of cluster services, both in terms of providing and consuming the cluster services. Each cluster service has a service name that uniquely identifies the service within the data grid cluster, and a service type, which defines what the cluster service can do. Other than the root cluster service running on each cluster node in the data grid cluster, there may be multiple named instances of each service type. The services can be either configured by the user, or provided by the data grid cluster as a default set of services.
[0026] Figure 1 is an illustration of a data grid cluster in accordance with various embodiments of the invention. As shown in Figure 1 , a data grid cluster 100, e.g. an Oracle Coherence data grid, includes a plurality of cluster members (or server nodes) such as cluster
nodes 101-106, having various cluster services 1 1 1-1 16 running thereon. Additionally, a cache configuration file 1 10 can be used to configure the data grid cluster 100.
Persistent Storage of Cache Contents
[0027] In accordance with an embodiment of the invention, the distributed data grid can provide recoverable persistent storage for different types of cache content and can prevent data loss after the distributed data grid is shut down.
[0028] Figure 2 shows an illustration of supporting persistence in a distributed data grid, in accordance with an embodiment of the invention. As shown in Figure 2, a distributed data grid 200 can include various types of cache content 21 1 -213 in an in-memory data store 202. Furthermore, the distributed data grid 200 can use a persistence layer 201 to persist the cache content 21 1 -213 in a persistent storage 203.
[0029] The persistence layer 201 allows the persistent storage 203 to use different physical topologies. For example, the persistence layer 201 can store the cache content in a central location, such as a storage area network (SAN) 221 , where all members in the distributed data grid 200 can share the same visibility. Alternatively, the persistence Iayer201 can store the cache content into different local disks 222, where members of the distributed data grid 200 may have only local visibility.
[0030] Furthermore, the persistence layer 201 can be agnostic to the choice of the physical topology (e.g. a SAN 221 or distributed local disks 222). For example, the distributed data grid 200 can take advantage of multiple SANs or multiple SAN mount points. Also, the distributed data grid 200 can take advantage of a physical topology that includes multiple SANs that are not shared by the plurality of members. Alternatively, the physical topology may include multiple SANs exporting storage locations, or may include hybrid deployments of local disks and SANs.
[0031] Additionally, the persistence layer 201 can support partition-wide atomicity of persisted data/metadata, and can provide transaction guarantee after a restart of the distributed data grid 200. Also, the persistence layer 201 can minimize performance impact and reduce recovery time needed to restart the distributed data grid 200.
[0032] Figure 3 shows an illustration of using a shared storage to support persistence in a distributed data grid, in accordance with an embodiment of the invention. As shown in Figure 3, a distributed data grid 300, which includes a plurality of members (e.g. the members 301-305 on the machines A-C 31 1 -313), can support various cache services 320.
[0033] Furthermore, the distributed data grid 300 can use a shared persistent storage, such as a storage area network (SAN) 310, to store the cache content for the cache services 320 in a central location. As shown in Figure 3, the different members 301 -305 on the machines A-C 31 1- 313 can share the same visibility, and can all have access to the persisted partitions 322 in the
SAN 310.
[0034] Thus, the system can recover the persisted cache content and prevent data loss, when the distributed data grid 300 is restarted after a shutdown.
[0035] Figure 4 shows an illustration of using distributed local disks to support persistence in a distributed data grid, in accordance with an embodiment of the invention. As shown in Figure 4, a distributed data grid 400, which includes a plurality of members (e.g. the members 401-405 on the machines A-C 41 1 -413), can support various cache services 420.
[0036] Furthermore, the distributed data grid 400 can store the cache content for the cache services 420 into the local disks on different machines. For example, the members 401-402 can store the related cache content into the local disk A 431 on machine A 41 1 (e.g. the persisted partitions 421 ). Also, the members 403-404 can store the related cache content into the local disk B 432 on the machine B 412 (e.g. the persisted partitions 422), and the machine C 413 can store the related cache content into the local disk C 433 on the machine C 413 (e.g. the persisted partitions 423).
[0037] Thus, the distributed data grid 400 can support the automatic recovery of various types of cache content in a distributed fashion, and prevent data loss during the restart of the distributed data grid 400.
Distributed Persistent Store Recovery
[0038] In accordance with an embodiment of the invention, the distributed data grid can support persistent store recovery in a distributed fashion.
[0039] Figure 5 shows an illustration of supporting distributed persistent store recovery in a distributed data grid, in accordance with an embodiment of the invention. As shown in Figure 5, a distributed data grid 500 can include a plurality of members, e.g. members 501-505, and can persist the cache content using the distributed local disks, e.g. local disks A-C 51 1-513.
[0040] Furthermore, each member in the distributed data grid 500 may only have visibility to the partitions persisted in the local disk. For example, the member 501 and the member 502 may only be aware of the persisted partitions 521 in the local disk A 511 , while the member 503 and the member 504 may only be aware of the persisted partitions 522 in the local disk B 512 and the member 505 may only be aware of the persisted partitions 523 in the local disk C 513.
[0041] In accordance with an embodiment of the invention, the distributed data grid 500 can use an internal protocol to discover the persisted partitions 521 -523 on different local disks A-C 51 1-513. For example, the discovery protocol supports the persistent store recovery during both the cluster cold-start/restart scenario and the multiple-node failure scenario (e.g. with a loss of a primary owner of a partition and/or one or more backup owners of the partition).
[0042] As shown in Figure 5, the distributed data grid 500 can use, a coordinator such as a
coordinator member 510, to coordinate the recovery of various persisted partitions 521-523 in the distributed data grid 500. The coordinator member 510 can send a distributed query to other members 501 -505 in the distributed data grid 500 in order to obtain a complete list of persisted partitions 521 -523.
[0043] Thus, in accordance with the embodiment of the present disclosure, a member (501 - 505, 510) is an element of a distributed data grid. One member 510 of a plurality of members of the distributed data grid can work as a coordinator, which handles information for a recovery of various persisted partitions in a distributed data grid. The handling of information may include synchronizing a view of partition ownership among the plurality of members in the distributed data grid, and receiving information on the plurality of persisted partitions from the plurality of members in the distributed data grid. In an aspect, the coordinator may be referred to as a "coordinator member 510".
[0044] In accordance with an embodiment of the invention, the coordinator member 510 can use a pluggable partition assignment strategy component 520 to determine the partition recovery assignment 540. For example, the system can go down the list of the partitions to examine which member can see a version of the partition. Then, the system can determine which member should be used to recover which partition based on a synchronized partition ownership view 530.
[0045] Furthermore, the system can minimize the performance impact caused by adding persistence support to the distributed data grid 500. For example, the system can use an asynchronous messaging process in the distributed data grid 500 for implementing the write operation to a persistent store. Also, the system allows the performing of multiple input/output (I/O) operations concurrently.
[0046] Additionally, the coordinator member 510 can avoid using only one or a few members in the distributed data grid 500 for performing the recovery, which may be prone to create performance bottleneck.
[0047] Also, the system can use a recovery quorum to ensure that all persisted partitions are visible prior to the recovery in order to prevent data loss due to recovery.
[0048] Additional descriptions of various embodiments of supporting service level quorum in a distributed data grid 500 are provided in U.S. Patent Application titled "SYSTEM AND METHOD FOR SUPPORTING SERVICE LEVEL QUORUM IN A DATA GRID CLUSTER", Application No. 13/352,203, filed on January 17, 2012 (Attorney Docket No. ORACL-05131 US2), which application is herein incorporated by reference.
[0049] Thus, the distributed data grid 500 can automatically carry out a recovery of persisted cache contents in a distributed fashion during a restart of the distributed data grid 500.
[0050] Figure 6 shows an illustration of coordinating persistent store recovery in a distributed data grid, in accordance with an embodiment of the invention. As shown in Figure 6, a
coordinator member 610 in a distributed data grid 600 can coordinate the recovery of the persisted partitions from the distributed local disks. For example, the coordinator member 610 can direct a member 620 to recover persisted partitions from a local disk 630.
[0051] At step 601 , the coordinator 610 can instruct the member 620 (and all other members in the distributed data grid 600 concurrently) to prepare for restoring persisted partitions. Then, at step 602, the member 620 (possibly along with each other member in the distributed data grid 600) can provide a local partition ownership back to the coordinator member 610.
[0052] At step 603, the coordinator member 610 can synchronize a view of the overall partition ownership, after obtaining the partition ownership information from the different members in the distributed data grid 600.
[0053] Furthermore, at step 604, the coordinator 610 can instruct the member 620 to prepare for recovering the persisted partitions based on the view of the overall partition ownership. At step 605, the member 620 can check for the persisted partitions in the local disk 630. Then, at step 606, the member 620 can report the persisted partitions (e.g. the persisted partition IDs) in the local disk 630 to the coordinator member 610.
[0054] At step 607, after obtaining information about the persisted partitions from the different members in the distributed data grid 600, the coordinator member 610 can make decision on how to configure a recovery process, such as determining a recovery assignment.
[0055] Then, at step 608, the coordinator 610 can provide the partition recovery assignment (e.g. the recover partition IDs) to each member in the distributed data grid 600. Finally, at step 609, the different members in the distributed data grid 600 (including the member 620) can carry out the recovery of the persisted partitions based on the received partition recovery assignment.
[0056] Figure 7 shows an illustration of supporting consistent partition recovery in a distributed data grid, in accordance with an embodiment of the invention. As shown in Figure 7, a distributed data grid 700 can include a plurality of members, e.g. members 701-705, each of which may only have visibility to the partitions persisted in the local disk.
[0057] Furthermore, a coordinator member 710 can coordinate the recovery of various persisted partitions 721 -723 from the distributed local disks A-C 711 -713. Also, the coordinator member 710 can use a pluggable partition assignment strategy component 720 to determine which member should be used to recover which partition.
[0058] In accordance with an embodiment of the invention, when a machine in the distributed data grid 700 is lost, the system can promote in-memory backups to in-memory primaries. As part of this process, the system can create a new persisted partition on disk and can also create one or more in-memory backups on other members from the data in memory.
[0059] Additionally, when in-memory data loss occurs due to two or more (depending on the backup count) member processes dying simultaneously, the system can recover a new in-
memory primary from the persisted version on disk, when there is a member having visibility to the disk.
[0060] As shown in Figure 7, when a machine that is associated with the local disk A 71 1 is lost, the persisted partitions 721 may become unavailable. In such a case, the distributed data grid 700 can rebalance itself. For example, the distributed data grid 700 can promote a back-up partition which is persisted in either the local disk B 712 or the local disk C 713 as the primary partition.
[0061] In accordance with an embodiment of the invention, the distributed data grid 700 can ensure that the system always restores the most recent valid partition. For example, the persisted partitions 722 in the local disk B 712 may contain a newer version of the partition, since the persisted partitions 721 in the local disk A 71 1 may not be updated correctly or an older version of the partition exists due to the death of the prior owner of the partition.
[0062] In accordance with an embodiment of the invention, the distributed data grid 700 can use a recovery quorum for supporting the discovery and/or the recovery of the persisted partitions 721-723. By using the recovery quorum, the recovery from persistence can be gated or protected. Thus, the distributed data grid 700 can ensure that no data is lost, even when the number of members that are lost exceeds the in-memory redundancy target.
[0063] Also, the distributed data grid 700 can ensure that all persisted partitions are visible prior to recovery. For example, the recovery quorum can be configured such that it guarantees visibility to all of the possible storage locations (such as local disks and/or SANs within the cluster). Additionally, the distributed data grid 700 can recover orphaned partitions from the persistent store and assign them as empty partitions
[0064] Furthermore, the distributed data grid 700 can establish different recovery policies based on the recovery quorum. For example, the distributed data grid 700 can establish SAN/shared-storage policies that focus on capacity. Also, the distributed data grid 700 can establish distributed/shared-nothing storage policies that ensure all storage locations are reachable. Also, the distributed data grid 700 can establish various policies based on the configured membership size and the host-list.
[0065] In accordance with an embodiment of the invention, the system allows various members 701-705 in the distributed data grid 700 to be shut down (and/or restarted) in an orderly fashion, and allows for a graceful suspend/resume of an service or the entire cluster. Additionally, the system can prevent partition transfers and persistent store movements, during the shutdown of the distributed data grid. For example, a quiesced service/cluster may not join new members, may not restore partitions from backup, may not recover orphaned partitions from persistent store, may not assign empty orphaned partitions, and may not perform partition distribution.
[0066] Figure 8 illustrates an exemplary flow chart for supporting distributed persistent store
recovery in a distributed data grid in accordance with an embodiment of the invention. As shown in Figure 8, at step 801 , the system allowing a plurality of members in the distributed data grid to persist a plurality of partitions associated with one or more cache services in a persistent storage. Then, at step 802, a coordinator can synchronize a view of partition ownership among the plurality of members in the distributed data grid. Furthermore, at step 803, the distributed data grid can form, based on the synchronized view, a distributed consensus on which partition can be recovered from which member in the distributed data grid. The distributed consensus is an agreement reached among a plurality of cluster members (or server nodes) such as cluster nodes 101 -106, which cooperate to solve a problem.
Persistent Store Versioning and Integrity
[0067] Figure 9 shows an illustration of supporting persistent store versioning in a distributed data grid, in accordance with an embodiment of the invention. As shown in Figure 9, a distributed data grid 900 can use various partitions (e.g. a partition 901 ) in an in-memory data store 920 to support different cache services.
[0068] Furthermore, the distributed data grid 900 can use a persistent store (e.g. a persisted partition 91 1 ) to persist the partition 901 in the distributed local disks 910.
[0069] The system can provide a unique identifier (ID), or a unique version number 906, for each persisted partition in the distributed local disks 910. As shown in Figure 9, a member 902 in the distributed data grid 900 can generate a globally unique identifier (GUID) 921 for the persistent partition 91 1. The GUID 921 can contain various types of information using a special naming format.
[0070] For example, the GUID 921 can include at least a partition number (or a partition ID 903) and a partition version number 91 1 associated with the partition 901. Additionally, the GUID 921 can contain a member ID 904, which indicates that the member 902 generates the GUID 921.
[0071] Additionally, the GUID 921 can include other information, such as a time stamp 905 that indicates the time when the partition 901 is first persisted. The time stamp 905 is a stamp of logical time (e.g. a stamp of a vector clock per partition), instead of a global wall clock. Thus, the system can guarantee that the GUID stamps move monotonically forward in the face of any kind of failure or transfer scenario.
[0072] In accordance with an embodiment of the invention, the distributed data grid 900 can maintain the version number 910 for each persisted partition in a monotonically increasing order. Thus, the system can account for the data mutation at any member or ownership changes in the distributed data grid 900.
[0073] Figure 10 shows an illustration of supporting persistent store integrity in a distributed
data grid, in accordance with an embodiment of the invention. As shown in Figure 10, a persistent store 1001 in a distributed data grid 1000 can contain cache content from different caches A-C 101 1 -1013, each of which is associated with a cache ID 1021 -1 123.
[0074] Furthermore, the system can apply a seal operation 1002 on the persistent store 1001 . The seal operation 1002 can ensure that the persistent store 1001 is fully initialized and is eligible to be recovered.
[0075] Additionally, the system can apply a validation operation 1003 on the persistent store 1001 . The validation operation 1003 can check whether the persistent store 1001 has been sealed. For example, the system may decide that the cache content in the persistent store 1001 is not valid if the persistent store 1001 is not sealed.
[0076] Thus, the system can ensure that the distributed data grid 1000 always restores a valid persisted partition and avoids recovering a partial copy that may be caused by cascading cluster failures.
[0077] Figure 11 shows an illustration of restoring the persisted partitions in a distributed data grid, in accordance with an embodiment of the invention. As shown in Figure 1 1 , a distributed data grid 1 100 can store various persisted partitions 1 1 1 1-1 1 13 in distributed local disks 1 1 10.
[0078] Each persisted partition 1 1 1 1 -1 1 13 stored in the distributed local disks 1 1 10 can be associated with a globally unique identifier (GUID), e.g. GUID 1 141-1 143. The GUIDs 1 141-1 143 can contain different types of information that includes at least a partition number (i.e. a partition - id) and a version number.
[0079] In accordance with an embodiment of the invention, the members 1 101-1 102 in the distributed data grid 1 100 may have different visibility to the persisted partitions 101 1 -1013 in the distributed local disks 1 1 10. The system can configure the GUIDs 1 141-1 143 to contain information on which member may have visibility to a particular persisted partition 1 1 1 1 -1 1 13.
[0080] Additionally, as a result of a cascading failure in the distributed local disks 1 1 10, multiple versions of the same persisted partitions 101 1-1013 may present on the different members 1 101 -1 102 of the distributed data grid 1 100. In order to disambiguate these different versions, each of the members 1 101 -1 102 in the distributed data grid 1 100 can report the GUIDs 1 141 -1 143 (which can include the partition numbers and other information) for each of the persisted partitions that are found. In accordance with an embodiment of the invention, only members reporting the presence of the most recent GUID for a partition can be considered for recovery.
[0081] As shown in Figure 1 1 , each member 1 101-1 102 in the distributed data grid 1 100 can collect a list of available GUIDs 1 121 -1 122 from the distributed local disks 1 1 10 based on local visibility. Then, each member 1 101 -1 102 can provide (or register) the list of available GUIDs
1 121 -1 122 to a resolver 1 103 in the distributed data grid 1 100, and the resolver 1 103 can determine the newest GUIDs 1 130 for different partitions based on the partition number and version number information encoded in the GUIDs 1 141 -1 143.
[0082] Furthermore, due to the distributed nature of the system, the distributed local disks 1 1 10 may contain multiple different versions of the same partition. In other words, the resolver 1 103 may receive multiple GUIDs that contain the same partition number and different version numbers.
[0083] In such a case, the resolver 1 103 can obtain the version number from each GUID associated with the same partition, and determine which GUID has the most recent version number. Also, the distributed data grid 1 100 can ensure that the persisted partition with the most recent version number is valid based on performing the seal operation and validation operation.
[0084] Additionally, the resolver 1 103 can determine which member 1 101-1 102 in the distributed data grid 1 100 is responsible for recovering a particular persisted partition 1 1 1 1-1 1 13, based on the member ID information encoded in the GUIDs 1 141 -1 143.
[0085] Then, the resolver 1 103 can provide the partition recovery assignment, which may include a list of the newest GUIDs 1 131 -1 132, to each different member 1 101-1 102. Accordingly, the members 1 101 -1 102 can carry out the actual operation that restores the persisted partitions 1 1 1 1 -1 1 13.
[0086] Thus, the system can ensure that the distributed data grid 1 100 always restores the newest valid version of any persisted partition, and can avoid recovering a partial copy that may be caused by cascading cluster failures.
[0087] Figure 12 illustrates an exemplary flow chart for supporting persistent store versioning and integrity and in a distributed data grid, in accordance with an embodiment of the invention. As shown in Figure 12, at step 1201 , the system can receive a plurality of identifiers (e.g. the GUIDs) from one or more members of the distributed data grid, wherein each said identifier is associated with a persisted partition in a persistent storage for the distributed data grid. Then, at step 1202, the system can select an identifier for each partition, wherein each selected identifier is associated with a most recent valid version of a partition. Furthermore, at step 1203, the system can determine a member in the distributed data grid that is responsible for recovering said partition from a persisted partition associated with the selected identifier.
Persistent Snapshot of a Running System
[0088] Figure 13 shows an illustration of providing a persistent snapshot of a running system in a distributed data grid, in accordance with an embodiment of the invention. As shown in Figure 13, a distributed data grid 1300 can support various cache services 1320 using an in-memory data store 1302.
[0089] Furthermore, the system allows a user to use a management tool 1310 to take a snapshot 1301 of the running system on the in-memory data store 1302 that supports the cache services 1320 on-demand, at any particular time. For example, the snapshot 1301 can be used to make a backup of the running system overnight.
[0090] In accordance with an embodiment of the invention, the system can suspend the cache services 1320, prior to taking the snapshot 1301. Thus, the system can provide a consistent point in time for taking the snapshot 1301. Then, the cache service 1320 can be resumed after the snapshot 1301 is taken.
[0091] Additionally, the snapshot 1301 can provide a consistent view of each partitioned cache service 1320. For example, the snapshot 1301 can provide a catalogue of state information of the running system, including metadata 1311 and cache data 1312 for the partitioned cache services 1320. Additionally, the system can store the snapshot 1301 either in a central location (e.g. a SAN 1321 ) or in distributed local disks 1322.
[0092] Furthermore, when various artifacts in a snapshot 1301 are created and stored in the distributed local disks 1322, the system can use a pluggable (or portable) archiver 1303 to retrieve the persisted state information of the snapshot 1301 from the distributed local disks 1322, and can create a single archive unit 1330, which can be used for auditing or other purposes.
[0093] Thus, the system allows a user to take a snapshot on the state of a partitioned cache service in a distributed data grid 1300, instead of persisting the cache content in the distributed data grid 1300 in a continuing fashion.
[0094] Figure 14 illustrates an exemplary flow chart for providing a persistent snapshot of a running system in a distributed data grid in accordance with an embodiment of the invention. As shown in Figure 14, at step 1401 , the system allows one or more cache services to run on a plurality of cluster members in the distributed data grid. Then, at step 1402, the system can collect a catalogue of state information associated with said one or more cache services from the plurality of cluster members in the distributed data grid. Furthermore, at step 1403, the system can create a snapshot for said one or more cache services running on the distributed data grid. Resolver
[0095] Figure 15 shows an exemplary block graph illustrating the resolver in accordance with an embodiment of the invention.
[0096] The blocks of the resolver 1500 may be implemented by hardware, software, or a combination of hardware and software to carry out the principles of the invention. It is understood by persons of skill in the art that the blocks described in Figure 15 may be combined or separated into sub-blocks to implement the principles of the invention as described above. Therefore, the
description herein may support any possible combination or separation orfurther definition of the functional blocks described herein.
[0097] In Figure 15, there is shown a resolver (1500) that may be used for a distributed data grid, such as any distributed data grid described previously, in particular, distributed data grid shown in Figure 1 1. Therefore, the resolver 1500 may be any resolver mentioned in the embodiments described previously. Moreover, the resolver 1500 and the component therein described below may perform various operations described previously according to the principle of the invention, but not limited to the operations and functions described below.
[0098] As shown, the resolver 1500 may comprise a receiving unit 1501 which may be configured to receive a plurality of identifiers from one or more members of the distributed data grid, wherein each said identifier is associated with a persisted partition in a persistent storage for the distributed data grid. The resolver 1500 may further comprise a selecting unit 1502 which may be configured to select an identifier for each partition, wherein each selected identifier is associated with a most recent valid version of a partition. The resolver 1500 may further comprise a determining unit 1503 which may be configured to determine a member in the distributed data grid that is responsible for recovering said partition from a persisted partition associated with the selected identifier.
[0099] The resolver 1500 may further comprise a resolving unit 1504 which may be configured to resolve each received identifier to obtain a partition number and a version number associated with each persisted partition in the persistent storage.
[00100] As described previously, the system for supporting persistence in a distributed data grid according to the present invention may comprise a persistent storage, configured to store one or more persisted partitions, each of which is associated with an identifier; one or more members, configured to collect a list of available identifiers from the persistent storage; and a resolver, configured to receive the list of available identifiers from one or more members, select an identifier for each partition, wherein each selected identifier is associated with a most recent valid version of a partition, and determine a member in the distributed data grid that is responsible for recovering said partition from a persisted partition associated with the selected identifier. The resolver herein may be embodied as the resolver 1500 as shown in Figure 15.
[00101] In one embodiment, the persistent storage may comprise a plurality of distributed local disk, wherein each member in the distributed data grid only has visibility to one or more distribute local disks.
[00102] In one embodiment, an identifier is assigned to each persisted partition stored in the persistent storage, wherein each said identifier is associated with a partition number and a version number of a partition.
[00103] In one embodiment, the resolver may be further configured to resolve each
received identifier to obtain a partition number and a version number associated with each persisted partition in the persistent storage.
[00104] In one embodiment, the persistent storage conprises a storage area network (SAN), wherein the SAN is visible to a plurality of members in the distributed data grid.
[00105] In one embodiment, different members in the distributed data grid operate to persist multiple versions of a partition in the persistent storage.
[00106] In one embodiment, the distributed data grid operates to seal a persistent store in the persistent storage, and indicate that the sealed persistent store is fully initialized and eligible to be recovered, and validate a persistent store in the persistent storage to determine whether said persistent store is sealed.
[00107] In one embodiment, said determined member operate to recover said partition using a persisted partition with a selected identifier.
[00108] Referring to Figure 16, a system 1600 is illustrated in accordance with an embodiment of the invention. Figure 16 shows an illustration of a functional configuration realized by system 1600. In accordance with an embodiment of the disclosure, system 1600 includes a persistent storage 1610, one or more members 1620, a receiver module 1630, a selector 1640, and a determination module 1650.
[00109] Receiver module receives a plurality of identifiers from one or more members 1620 of a distributed data grid. Each identifier is associated with a persisted partition in persistent storage 1610 for the distributed data grid. Selector 1640 selects an identifier for each partition. Each selected identifier is associated with a most recent valid version of a partition. Determination module 1650 determines a member in the distributed data grid that is responsible for recovering the partition from a persisted partition associated with the selected identifier.
[00110] Figure 17 shows an illustration of a computer system 1700 which includes well- known hardware elements. Namely, computer system 1700 includes a central processing unit (CPU) 1710, a mouse 1720, a key board 1730, a random access memory (RAM) 1740, a hard disc 1750, a disc drive 1760, a communication interface (l/F) 1770, and a monitor 1780. Computer system 1700 may function as a server node constituting system 1600.
[00111] In accordance with an embodiment of the invention, persistent storage 1610, one or more members 1620, receiver module 1630, selector 1640 and determination module 1650 are provided by one or more computer systems 1700. Persistent storage 1610, one or more members 1620, receiver module 1630, selector 1640 and determination module 1650 are implemented by CPU 1710. In a further aspect, more than one processors can be used so that persistent storage 1610, one or more members 1620, receiver module 1630, selector 1640 and determination module 1650 are implemented. Namely, any of persistent storage 1610, one or more members 1620, receiver module 1630, selector 1640 and determination module 1650 can
be physically remote from each other.
[00112] In yet another aspect, system 1600 can be realized by using a plurality of hardwired circuits which function as persistent storage 1610, one or more members 1620, receiver module 1630, selector 1640 and determination module 1650.
[00113] The present invention may be conveniently implemented using one or more conventional general purpose or specialized digital computer, computing device, machine, or microprocessor, including one or more processors, memory and/or computer readable storage media programmed according to the teachings of the present disclosure. Appropriate software coding can readily be prepared by skilled programmers based on the teachings of the present disclosure, as will be apparent to those skilled in the software art.
[00114] In some embodiments, the present invention includes a computer program product which is a storage medium or computer readable medium (media) having instructions stored thereon/in which can be used to program a computer to perform any of the processes of the present invention. The storage medium can include, but is not limited to, any type of disk including floppy disks, optical discs, DVD, CD-ROMs, microdrive, and magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic or optical cards, nanosystems (including molecular memory ICs), or any type of media or device suitable for storing instructions and/or data.
[00115] The foregoing description of the present invention has been provided for the purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise forms disclosed. Many modifications and variations will be apparent to the practitioner skilled in the art. The modification and variation include any relevant combination of the described features. The embodiments were chosen and described in order to best explain the principles of the invention and its practical application, thereby enabling others skilled in the art to understand the invention for various embodiments and with various modifications that are suited to the particular use contemplated. It is intended that the scope of the invention be defined by the following claims and their equivalence.