Title of Invention

A METHOD AND A SYSTEM FOR SYNCHRONIZING DATA BETWEEN MEMBERS OF A WEB FARM

Abstract Various methods and apparatus for synchronizing data between members of a web farm are disclosed. The web farm may include a primary member and at least one backup member. The web farm members may include modules for determining whether new data is available to the web farm (602); placing the web farm in a prepare state if new data is available (604); placing the web farm in a commit state if members of the web farm successfully receive the new data; and placing the web farm in an abort state if any of the members of the web farm do not successfully receive the new data (606).
Full Text

METHOD AND APPARATUS FOR TWO-PHASE COMMIT IN DATA
DISTRIBUTION TO A WEB FARM
BACKGROUND
/. Field
This disclosure relates.to data communication, and in particular, to a novel and improved web farm data synchronization system.
//. Background
Web farms are integral to high-volume web sites because they increase the availability of web sites by distributing processing tasks among several web farm "members."
Figure 1 is a schematic diagram of a prior art web farm 100 including members 1 ... n. Each member is configured to function as a web server as is known in the art and may include a processor 102 and a database 104 for the storage and retrieval of data.
One challenge in implementing a web farm is ensuring that data files are synchronized among all members of the web farm. Typically, new data is presented simultaneously to all members of the web farm 100 through a gateway 106. For the web site to function effectively, data that is presented to the web farm must be stored within the individual members such that data integrity is maintained from member to member. For example, if the new data presented to the web farm represents a new customer to be stored in customer database, all members of the web farm must store the new customer data prior to a new transaction occurring. If any member of the web farm fails to store the new data, the integrity of any future transactions may be compromised.
The prior art has recognized the importance of data synchronization and made attempts to ensure the integrity of distributed data. For example, prior art web farms may employ a time delay to allow all members of the web farm to catch up and store the new data. However, this approach has certain disadvantages. Such a time delay necessarily imposes a limitation on the availability of the individual members of the web farm, and thus the availability of the hosted web site as whole. Furthermore, during the time delay, the new data is being stored on some members of the web farm, while the other members are catching up. Thus, the web farm is not -synchronized during the time period. Should at least one of the members fail to synchronize the new data, the web farm may need to be rolled back, a process whereby the data is restored on the members to a previous known state. Rolling back a web farm is an undesirable procedure that is tedious and potentially error-prone.

SUMMARY
Methods and apparatus for synchronizing data between members of a web farm are disclosed. In one embodiment, a method includes determining whether new data is available to the web farm; placing the web farm in a prepare state if new data is.available; placing the web farm in a commit state if members of the web farm successfully receive the new data; and placing the web farm in.an abort state if any of the members of the web farm do not successfully receive the new data.
In a further aspect, a method for synchronizing data between members of a web farm is disclosed including instructing the members of the web farm to receive new data; determining whether any of the web farm members failed to receive the new data; instructing the web farm members to store the new data if all of the web farm members received the new data; and instructing the web farm members to revert to a previous set of data if any of the web farm members failed to receive the new data.
A synchronized web farm is also disclosed. In one aspect, the web farm may include a primary web farm member configured to receive data from an application download server; and at least one backup web farm member also configured to receive data from an application download server. The primary member may be configured to determine whether new data is available to the web farm; place the web farm in a prepare state if new data is available; place the web farm in a commit state if members of the web farm successfully receive the new data; and place the web farm in an abort state if any of the members of the web farm do not successfully receive the new data.
BRIEF DESCRIPTION OF THE DRAWINGS
The features, objects, and advantages of the present invention will become more apparent from the detailed description set forth below when taken in conjunction with the drawings in which like reference characters identify correspondingly throughout and wherein:
FIG. 1 is a schematic diagram of a prior art web farm;
FIG. 2 is a schematic diagram of one aspect of a web farm configured in accordance with the teachings of this disclosure;
FIG. 3 is a schematic diagram of one aspect of a primary member configured in accordance with the teachings of this disclosure;

FIG. 4 is a schematic diagram of one aspect of a backup member configured in accordance with the teachings of this disclosure;
FIG. 5 is a schematic diagram of one aspect of a storage member configured in accordance with the teachings of this disclosure;
FIG. 6 is a flow diagram of one aspect of a web farm synchronization in accordance

•* ...
vith the teachings of this disclosure;
FIG. 7 is a state diagram of one aspect of a web farm synchronization in accordance with the teachings of this disclosure; and
FIG. 8 is a schematic diagram of one aspect of a web farm featuring fail-over support in accordance with the teachings of this disclosure.
DETAILED DESCRIPTION
Persons of ordinary skill in the art will realize that the following description of the present invention is illustrative only and not in any way limiting. Other embodiments of the invention will readily suggest themselves to such skilled persons having the benefit of this disclosure.
It is contemplated that the present invention may be embodied in various computer and machine readable data structures. Furthermore, it is contemplated that data structures embodying the present invention will be transmitted across computer and machine-readable media, and through communications systems by use of standard protocols known in the art.
The invention further relates to machine-readable media on which are stored embodiments of the present invention. It is contemplated that any media suitable for storing instructions related to the present invention is within the scope of the present invention. By way of example, such media may take the form of magnetic, optical, or semiconductor media.
The present invention may be described through the use of flowcharts. Often, a single instance of an embodiment of the present invention will be shown. As is appreciated by those of ordinary skill in the art, however, the protocols, processes, and procedures described herein may be repeated continuously or as often as necessary to satisfy the needs described herein. Accordingly, the representation of the present invention through the use of flowcharts should not be used to limit the scope of the present invention.
Exemplary embodiments of disclosed apparatus and methods may be disclosed herein. The word "exemplary" is used exclusively herein to mean "serving as an example, instance, or

illustration." Any embodiment described as an "exemplary embodiment" is not to be construed as necessarily preferred or advantageous over other embodiments described herein.
Exemplary Structure
Figure 2 is a schematic diagram of a web farm 200 configured in accordance with the teachings of this disclosure. The web farm 200 may include a primary member 202 and at least one backup member 204, each configured as will be described in more detail below. The web farm may also include at least one storage member 206.
It is contemplated that the various members of the web farm may include hardware and software known in the art for running an operating system such as Microsoft Windows®, UNIX, LINUX, or any other desired operating system, and are preferably configured to run applications written in the Java language. A member machine may comprise may comprise a stand-alone computer, a multi-CPU machine, or a rack-mounted server housed together with other servers on a rack.
The members of the web farm 200 may also be configured to administrate a database such as Oracle® using hardware and software as is known in the art. In a exemplary embodiment, the members of the web farm 200 may be configured to store and retrieve data received in the Extended Markup Language (XML) format.
The members of the web farm 200 are preferably configured to receive data from a Distribution Server 300. The DS 300 may be configured to function as a transaction gateway between the web farm 200 and the internal network of the enterprise hosting the web farm. To provide secure transaction capability, the web farm 200 and the DS 300 may communicate through a firewall 302 using secure protocols known in the art, such as SSL over VPN.
Each member of the web farm 200 will now be disclosed in more detail.
Primary Member
In the web farm 200 of the present disclosure, it is contemplated that there will be one primary member 202 that is responsible for the synchronization of the various members of the web farm. As every farm member in the web farm should represent the data state, the primary member 202 functions as a distribution manager and ensures that all members of the web farm have the data set. In an exemplary embodiment, the primary member 202 ensures that all members have the same XML and application package files at any given time.

Figure 3 shows a functional block diagram of a primary member 202 configured in accordance with the teachings of this disclosure. The primary member 202 includes a primary synchronization manager (SyncMgr) module 302 for controlling the scheduling and the synchronization of all data, such as XML and package files, in each web farm member. The SyncMgr module 302 may be programmed as a Java application. The SyncMgr module may run on each of the web farm machines using separate Java Virtual Machines for reliability. The primary SyncMgr 302 may also be operatively coupled to other members of the web farm 200 to provide primary synchronization control as will be described in more detail below.
The primary manager 202 may also include an Application Download Client (AdaClt) module 304 for downloading data from the DS 300 of FIG. 2. The AdaClt module 304 preferably communicates with the DS 300 through the firewall 302 via HTTPS to receive data, such as XML and package files. The AdaClt module 304 may be programmed as a Java application.
The primary manager 202 may also include a Distribution Client (DistClt) servlet 306 for interfacing with the AdaClt module 304. The DistClt servlet 306 may used by the web farm members to activate the AdaClt 304 to initiate the download process and download data to a database 308. The DistClt servlet 306 may comprise a Java servlet engine configured to start up at boot time.
Figure 4 shows a functional block diagram of a backup member 204 configured in accordance with the teachings of this disclosure. The backup member 204 also includes a SyncMgr module 402 as described above. However, the backup SyncMgr 402 is preferably operatively coupled to other members of the web farm 200 to provide backup synchronization control as will be described in more detail below.
The backup member 204 may also include an AdaClt module 304 and a DistClt servlet 306 as described above for receiving data from the DS 300. The backup module 204 also includes a database 308 for the storage and retrieval of data received from the DS 300, and is preferably configured to store data received from the DS 300 under the control of the primary member 202.
Figure 5 shows a functional block diagram of a storage member 206 configured in accordance with the teachings of this disclosure. The storage member 206 is preferably configured to store data received from the DS 300 under the control of the primary member 202.

The storage member 206 may include an AdaClt module 304, a DistClt servlet 306, and a database 308 as described above.
Various aspects of operation for a web farm of this disclosure will now be disclosed.
Operation
The SyncMgr module is configured to implement a two-phase commit algorithm to ensure members of the web farm receive new data from the distribution center at the same time.
Figure 6 is a flowchart of one aspect of data synchronization in accordance with the » teachings of this disclosure. The process of FIG. 6 begins in act 600, where the members of the web farm are instructed to get new data. In one aspect of this disclosure, this act may be accomplished by a primary member instructing the other members of the web farm to fetch data from an distribution server.
The process continues in query 602, where it is determined whether any web farm members failed in their attempt to receive the new data. If none of the web farm members failed to receive the new data, the web farm members may be instructed to store the new data in act 604.
However, if any of the web farm members failed to properly receive the new data, all members of the web farm may be instructed to revert back to the previous data set in act 606. Thus, if any member of the web farm is unable to properly receive the new data, all web farm members may revert back to the existing data set.
Hence, the process of FIG. 6 ensures that either all of the web farm members receive the new data, or, if any one of the web farm members fails to receive the new data, none of the web farm members use the new data. Thus, the process of FIG. 6 may eliminate any data inconsistencies between web farm members.
Figure 7 is a state diagram of a further aspect of data synchronization in accordance with the present disclosure. The process of FIG. 7 begins when the web farm is placed in a prepare state. In one aspect, the primary member as disclosed above may function as a distribution manager by requesting each web farm member to download or receive data from a distribution center. It is contemplated that the distribution manager may periodically check for new data. When new data is available, the distribution manager may then place the web farm in a prepare state.

During the prepare state, it is contemplated that each web farm member may store newly received data in a temporary repository, such as a new database file.
While still in the prepare state, each web farm member may notify the distribution manager of the storage state of the new data, i.e., whether their respective receive process was successful or not. It is contemplated that the distribution manager may wait a predetermined time for all web farm members to respond during the prepare state.
If all web farm members respond with an indication that new data has been successfully stored, the web farm may then move to a commit state. In the commit state, the distribution manager may request the web farm members to make the new data their permanent data. This may be accomplished by the distribution manager requesting that newly-stored data in a temporary repository be made the current data.
If any of the web farm members indicate that the new data was not stored successfully, the web farm may be placed in an abort state. In the abort state, the distribution manager may implement a rollback action in which the prepare state is aborted and the temporary data is not made the current data. Additionally, if any of the web farm members fail to respond in a predetermined amount of time, the distribution manager may determine that the prepare state has timed out, and place the web farm in the abort state.
The web farm of the present disclosure may also provide fail-over support in case the primary member fails. Figure 8 is a block diagram of a web farm 800 configured to provide fail-over support in accordance with the teachings of this disclosure. FIG. 8 includes a primary member 202 and one or more backup members 204, each configured substantially as shown and described above.
FIG. 8 further shows that the SyncMgrs of the primary and backup members may be operatively coupled to provide fail-over support. As disclosed above, there is only one primary SyncMgr 202 in the web farm, but there may be one or more backup SyncMgrs 204. The identity of the primary SyncMgr may be predetermined through methods such as hardwiring or preprogramming, thereby ensuring that a primary web fami member exists at start-up.
One of the backup members 204 may be configured to watch over the primary member 202. In an exemplary embodiment, the SyncMgr module of the backup member 204 may periodically check to ensure the primary manager 202 is available. If the backup member 204 determines that the primary member 202 is not available, the backup manager 204 may conclude that the primary manager 202 has failed. In a further exemplary embodiment, a

backup manager may make a predetermined number of consecutive unsuccessful attempts before concluding that the primary manager has failed.
In the event of the failure of the primary member, a backup manager may assume control of the web farm by becoming the primary member.
FIG. 8 further shows that in Jhe case where .there is a plurality of backup members* the backup members may be configured to watch over each other in a chain of N members, where N is the number of backup members present in the web farm. In the event of multiple failures, the next backup member in line will assume the role of the primary member. Thus, the web farm of the present disclosure provides N + 1 levels of redundancy, including the initial primary manager.
In an exemplary embodiment, the order of the hostnames recorded in a configuration file may determine which backup SyncMgr will take over the primary duty.
Additionally, various site-specific information may be contained in configuration files for use by the modules of the disclosed web farm.
The previous description of various embodiments, which include preferred embodiments, is provided to enable any person skilled in the art to make or use the embodiment of the present disclosure. The various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without the use of the inventive faculty. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
WHAT IS CLAIMED IS:


CLAIMS
1. A method for synchronizing data between members of a web farm comprising:
determining whether new data is available to the web farm;
placing the web farm in a prepare state if new data is available;
placing the web farm in a commit state if all members of the web farm successfully receive said new data; and
placing the web farm in an abort state if any of said members of said web farm do not successfully receive said new data.
2. The method of claim 1, wherein said act of determining whether new data is available to the web farm is performed periodically.
3. The method of claim 1, wherein said act of placing the web farm in a prepare state further includes the act of placing, by said web farm members, said new data in a temporary repository.
4. The method of claim 1, wherein said act of placing the web farm in a prepare state further includes the act of notifying, by said web farm members, a distribution manager of the storage state of said new data.
5. The method of claim 4, wherein said act of placing the web farm in a prepare state further includes the act of waiting, by said distribution manager, a predetermined time to received said storage state notifications.
6. The method of claim 3, wherein said act of placing the web farm in a commit state further includes the act of making said temporary repository data said web farm's current data.
7. The method of claim 1, wherein said act of placing the web farm in an abort state further includes the act of implementing a rollback action.

8. The method of claim 1, further including the act of providing, by said web farm members, fail-over support for a primary member.
9. The method of claim 8, further including the act of periodically checking, by said web farm members, the ayailability of said primary member.
10. The method of claim 9, further including the act of assuming control, by a predetermined web farm member, of said web farm if said primary member is not available.
11. The method of claim 9, wherein said predetermined web farm member checks the availability of said primary member a predetermined number of times before assuming control.
12. The method of claim 10, wherein said web farm members assume control in a predetermined order.
13. A method for synchronizing data between members of a web farm comprising:
providing a primary member and at least one backup member;
instructing the members of the web farm to receive new data;
determining whether any of said web farm members failed to receive said new data;
instructing said web farm members to store said new data if all of said web farm members received said new data; and
instructing said web farm members to revert to a previous set of data if any of said web farm members failed to receive said new data.
14. The method of claim 13, wherein said act of instructing the members of the web farm to receive new data further includes the act of placing said new data in a temporary repository.
15. The method of claim 13, wherein said act of instructing the members of the web farm to receive new data further includes the act of notifying, by said at least one backup member, said primary member of the storage state of said new data.

16. The method of claim 15, wherein said act of instructing the members of the web farm -to receive new data further includes the act of waiting, by said primary member, a predetermined time to received said storage state notifications.
17. The method of claim 14, wherein said act of instructing said web farm members to store said new data further includes the .act of making said temporary repository data said web farm's current data.
18. The method of claim 13, further including the act of providing, by said at least one backup member, fail-over support for a primary member.
19. The method of claim 18, further including the act of periodically checking, by said at least one backup member, the availability of said primary member.
20. The method of claim 9, further including the act of assuming control, by a predetermined backup member, control of said web farm if said primary member is not available.
21. The method of claim 9, wherein said predetermined backup member checks the availability of said primary member a predetermined number of times before assuming control.
22. The method of claim 10, wherein said at least one backup members assume control in a predetermined order.
23. A synchronized web farm comprising:
a primary web farm member configured to receive data from an distribution server at least one backup member configured to receive data from a distribution server; and wherein said primary member is configured to: determine whether new data is available to the web farm; place the web farm in a prepare state if new data is available;
place the web farm in a commit state if members of the web farm successfully receive said new data; and

place the web farm in an abort state if any of said members of said web farm do not successfully receive said new data.
24. The web farm of claim 23, wherein said primary member is further configured to determine whether new date*i&available-to the web farm is performed periodically.
25. The web farm of claim 23, wherein said web farm members are further configured to store said new data in a temporary repository.
26. The web farm of claim 23, wherein said at least one backup member is further configured to notify said primary member of the storage state of said new data.
27. The web farm of claim 26, wherein said primary member is further configured to wait a predetermined time to received said storage state notifications.
28. The web farm of claim 23, wherein said web farm is further configured to implement a rollback action in the event of said abort state.
29. The web farm of claim 23, wherein said web farm is further configured to provide fail-over support for said primary member.
30. The web farm of claim 29, wherein said web farm is further configured to periodically check the availability of said primary member.
31. The web farm of claim 30, wherein said web farm is further configured to assuming control, by a predetermined web farm member, of said web farm if said primary member is not available.
32. The web farm of claim 31, wherein said predetermined web farm member is further configured to check the availability of said primary member a predetermined number of times before assuming control.

33. The web farm of claim 31, wherein said web farm members are further
configured to assume control in a predetermined order.
34. A system for synchronizing data between members of a web farm comprising:
means for determining whether new data is available to the web farm;
means for placing the web farm in a prepare state if new data is available;
means for placing the web farm in a commit state if all members of the web farm successfully receive said new data; and
means for placing the web farm in an abort state if any of said members of said web farm do not successfully receive said new data.
35. The system of claim 34, further including means for determining whether new data is available to the web farm is performed periodically.
36. The system of claim 34, further including means for placing the web farm in a prepare state further includes the act of placing, by said web farm members, said new data in a temporary repository.
37. The system of claim 34, further including means for notifying, by said web farm members, a distribution manager of the storage state of said new data.
38. The system of claim 37, f further including means for waiting, by said distribution manager, a predetermined time to received said storage state notifications.
39. The system of claim 36, further including means for making said temporary repository data said web farm's current data.
40. The system of claim 34, further including means for implementing a rollback action.
41. The system of claim 34, further including means for providing, by said web farm members, fail-over support for a primary member.

42. The system of claim 41, further including means for periodically checking, by said web farm members, the availability of said primary member.
43. The system of claim 42,'further including means for assuming control, by a predetermined web farm member, of said web farm if said primary member is not available.
44. The system of claim 43, further including means for checking the availability of said primary member a predetermined number of times before assuming control.
45. The system of claim 43, further including means for assuming control in a predetermined order.
46. A program storage device readable by a machine, tangibly embodying a program of instructions executable by the machine to perform a method for synchronizing data between members of a web farm, said method comprising:
determining whether new data is available to the web farm;
placing the web farm in a prepare state if new data is available;
placing the web farm in a commit state if all members of the web farm successfully receive said new data; and
placing the web farm in an abort state if any of said members of said web farm do not successfully receive said new data.
47. The program storage device of claim 46, wherein said act of determining whether new data is available to the web farm is performed periodically.
48. The program storage device of claim 46, wherein said act of placing the web farm in a prepare state further includes the act of placing, by said web farm members, said new data in a temporary repository.
49. The program storage device of claim 46, wherein said act of placing the web
farm in a prepare state further includes the act of notifying, by said web farm members, a
distribution manager of the storage state of said new data.

50. The program storage device of claim 49, wherein said act of placing the web farm in a prepare state further includes the act of waiting, by said distribution manager, a predetermined time to received said storage state notifications.
51. The program storage device of claim 48, wherein said act of placing the web farm in a commit state further includes the act of making said temporary repository data said web farm's current data.
52. The program storage device of claim 46, wherein said act of placing the web farm in an abort state further includes the act of implementing a rollback action.
53. The program storage device of claim 46, further including the act of providing, by said web farm members, fail-over support for a primary member.
54. The program storage device of claim 53, further including the act of
eriodically checking, by said web farm members, the availability of said primary member.
55. The program storage device of claim 54, further including the act of assuming control, by a predetermined web farm member, of said web farm if said primary member is not available.
56. The program storage device of claim 54, wherein said predetermined web farm member checks the availability of said primary member a predetermined number of times before assuming control.
57. The program storage device of claim 56, wherein said web farm members assume control in a predetermined order.

58. A method for synchronizing data between members of a web farm, substantially
as herein described with reference to the accomnanving drawings.
59. A synchronized web farm substantially as herein described with reference to the
accompanying drawings.


Documents:

1825-chenp-2004 amended claims 22-03-2011.pdf

1825-chenp-2004 correspondence others 22-03-2011.pdf

1825-CHENP-2004 AMANDED CLAIMS 05-03-2010.pdf

1825-CHENP-2004 AMANDED PAGES OF SPECIFICATION 05-03-2010.pdf

1825-CHENP-2004 DRAWINGS 05-03-2010.pdf

1825-CHENP-2004 EXAMINATION REPORT REPLY RECIEVED 05-03-2010.pdf

1825-CHENP-2004 FORM-3 05-03-2010.pdf

1825-CHENP-2004 OTHER PATENT DOCUMENT 05-03-2010.pdf

1825-CHENP-2004 POWER OF ATTORNEY 05-03-2010.pdf

1825-chenp-2004 correspondence others-03-07-2009.pdf

1825-chenp-2004 pct search report-03-07-2009.pdf

1825-chenp-2004-claims.pdf

1825-chenp-2004-correspondnece-others.pdf

1825-chenp-2004-correspondnece-po.pdf

1825-chenp-2004-description(complete).pdf

1825-chenp-2004-drawings.pdf

1825-chenp-2004-form 1.pdf

1825-chenp-2004-form 26.pdf

1825-chenp-2004-form 3.pdf

1825-chenp-2004-form 5.pdf

1825-chenp-2004-pct.pdf


Patent Number 247369
Indian Patent Application Number 1825/CHENP/2004
PG Journal Number 14/2011
Publication Date 08-Apr-2011
Grant Date 01-Apr-2011
Date of Filing 16-Aug-2004
Name of Patentee QUALCOMM INCORPORATED
Applicant Address 5775 MOREHOUSE DRIVE, SAN DIEGO, CALIFORNIA 92121, USA.
Inventors:
# Inventor's Name Inventor's Address
1 NGUYEN,PHIL., 12676 VIA COLMENAR, SAN DIEGO, CALIFORNIA 92129, USA.
PCT International Classification Number G01R31/08
PCT International Application Number PCT/US03/05363
PCT International Filing date 2003-02-19
PCT Conventions:
# PCT Application Number Date of Convention Priority Country
1 10/079,772 2002-02-19 U.S.A.