This application claims benefit of priority of European application no. EP 07 009 132.7 titled “Method and Server for Synchronizing a Plurality of Clients Accessing a Database”, filed May 7, 2007, and whose inventor is Heinz Kreuder.
European application no. 07 009 132.7 titled “Method and Server for Synchronizing a Plurality of Clients Accessing a Database”, filed May 7, 2007, and whose inventor is Heinz Kreuder, is hereby incorporated by reference in its entirety as though fully and completely set forth herein.
The present application relates to a method and a server for synchronizing a plurality of clients accessing a database, wherein each client executes a plurality of tasks on the database.
Databases are very important technical tools of modern information societies. Typically, databases are constantly accessed by a number of clients deleting, adding or changing the content of the database. For example, in case of a database of a financial institution, there is a continuous flow of transactions performed on the database, which require the correct technical processing of the corresponding data.
For security and performance reasons it is imperative that certain administrative tasks are regularly performed on a database. One example is a backup of the overall database system and all of its data. However, there might be other administrative tasks such as migrating the database to a new hard- and/or software system or tests concerning its performance. Some of the administrative tasks cannot be performed, while the various clients continue to access the database, if inconsistencies of the stored data are to be avoided. For example, if a backup of the database for a financial institution is performed during a transfer of some amount from one account to another, it is to be avoided that the saved data reflect the amount being deduced from the first account but not added to the second account, since the backup occurred in between. This is only one example which shows the need to synchronize for some administrative task all clients operating on the database or at least the clients, which could cause such inconsistencies.
In the prior art, it is known to perform such a synchronization as described in the following with respect to
If a client is performing a certain task at the time the synchronization request is issued and does not change the status to the requested one (for example from “open task” to “closed task”) within a given timeout period, the client is reset to the desired status so that it no longer blocks the synchronization and the subsequent execution of the administrative task.
However, in some situations a client may lose the connection to the database, when the synchronization request is issued. As a result, any other client trying to open a task during the timeout period will have to wait until this time limit is exceeded, even if the tasks of one or more of the other clients could be performed and finished before the timeout period has fully elapsed. The prior art approach for the processing of a synchronization request may therefore easily cause substantial waiting times for a large number of clients only for the reason that one client has lost the connection to the database. Reducing the timeout period would be the obvious way of reducing the waiting time for the other clients. However, a reduced timeout period will increase the number of cancelled tasks, which have to be restarted after the synchronization is achieved and the respective administrative task is performed.
In view of the above, it is the technical problem underlying a first aspect of the present invention to provide a more efficient method of synchronizing the plurality of clients, which can lead to reduced waiting times for the clients accessing the database without increasing the number of cancelled tasks.
Various embodiments presented herein address the problem described above. In one embodiment, the method may include (e.g., for each client) accumulating the time of one or more tasks performed by the client after the issuance of a synchronization request. The method may further include rejecting a request for the opening of a new task of the client, if the accumulated task time exceeds a maximum accumulated task time.
Accordingly, rather than rejecting any request to open a new task, the opening of new tasks may be allowed for those clients who do not exceed a given time limit for the sum of all of their task durations after the synchronization request was issued. Clients can therefore continue to work, if there is another client which does not close its task rapidly, e.g., a client which has lost connection to the database. As a result, the average waiting time for a client will be shorter.
In one embodiment, the method further comprises the step of defining a common maximum accumulated task time for all clients. In this embodiment, all clients are treated equally. Alternatively, the method may further comprise the step of individually defining a maximum accumulated task time for each client. An individual definition of the maximum accumulated task time allows for the ability to prioritize some clients by assigning greater values for the maximum accumulated task time, which reduces the likelihood of a rejection of a new task of such a client during the processing of a synchronization request.
In another embodiment, groups of clients are defined and all clients of a certain group have the same maximum accumulated task time, but the values differ from group to group.
The described method is in one embodiment combined with the above described prior art approach. Accordingly, a task performed after synchronization may be terminated, if the task is open for more than a timeout period. Also, the timeout period can be a general parameter for all clients or individually or group wise selected, if certain clients are to be given more time to execute their tasks. The values of the timeout period and the maximum accumulated task time will determine both, the average waiting time for each client as well as the average waiting time before the synchronization request can be fulfilled. In one embodiment, the value(s) for the timeout period and the value(s) for the maximum accumulated task time are related.
Further modifications of the described method are described below.
According to another aspect, embodiments herein may relate to a database server, which may be adapted to perform any of the above described methods. According to still another aspect, the present invention relates to a computer program comprising instructions for performing any of the above described methods.
In the following detailed description, presently preferred embodiments are described with reference to the following figures:
The clients c0-c5 may execute various tasks on the database 1, e.g., as shown in the exemplary timing diagram of
For certain administrative tasks, it is necessary to synchronize the various clients c0-c5. In other words, a synchronized state is needed, wherein all tasks are closed and wherein no new task is opened so that the administrative task, for example a backup of the data storage 2, can be performed and provides a consistent set of data.
The resulting effect on the timing of the tasks of the clients c0-c5 is shown in
The decision process for deciding, when the synchronized state is reached and a corresponding administrative task such as a backup can be performed, is shown in
Examples of the resulting timing diagrams are shown in
As can be seen, the average time between the issuance of the synchronization request and the point in time, when the synchronized state is reached, is longer using an embodiment of the invention compared to the above described prior art approach. Taking the diagram of
Generally, there is a relation between the overall waiting time and value of the maximum accumulated task time t1. If the value of the parameter t1 is greater, the overall waiting time may be further reduced as can be seen from a comparison of the diagrams in
As a result, the described parameter of the maximum accumulated task time t1 allows to prioritize the tasks of the clients versus the administrative task. For example a backup of the overall system should be regularly performed for security reasons. However, the precise point in time, when all clients are synchronized so that a consistent set of data can be stored, is less relevant and may have a lower priority than continuing to serve the various clients with as little delay as possible. As already mentioned above, it is further possible to refine the timing properties by selecting individual values for each client both for the maximum accumulated task time t1 and for the timeout period to. Note that the above times are exemplary only and that other times and methods pertaining thereto are envisioned.
The described method can be executed by one or more database servers, e.g., the database server 3, which controls the data storage 2 and serves the various clients c0-c5. To this end, the corresponding instructions can be implemented in the hard- and/or software of the one or more servers (e.g., the database server 3). In case of a software implementation, the respective computer program comprises instructions to perform the above described method steps. The program instructions may be stored on a memory medium and executed by a processor. In various embodiments, the memory medium may comprise one or more memory mediums, e.g., spread across one or more computer systems, such as, for example, the database server 3 and/or other computers.
Number | Date | Country | Kind |
---|---|---|---|
07009132 | May 2007 | EP | regional |
Number | Name | Date | Kind |
---|---|---|---|
5701457 | Fujiwara | Dec 1997 | A |
5903730 | Asai et al. | May 1999 | A |
6182109 | Sharma | Jan 2001 | B1 |
6477558 | Irving | Nov 2002 | B1 |
6658589 | Taylor | Dec 2003 | B1 |
6772244 | Nguyen | Aug 2004 | B2 |
6820085 | Nishizawa et al. | Nov 2004 | B2 |
6922729 | Cheung | Jul 2005 | B1 |
6999978 | Frank et al. | Feb 2006 | B2 |
7194556 | Rajagopal | Mar 2007 | B2 |
7711790 | Barrett | May 2010 | B1 |
8903730 | Zong | Dec 2014 | B2 |
20040061290 | Gray, Jr. | Apr 2004 | A1 |
20040064290 | Cabral et al. | Apr 2004 | A1 |
20050080898 | Block | Apr 2005 | A1 |
20050210079 | Edlund | Sep 2005 | A1 |
20080071947 | Fischer | Mar 2008 | A1 |
20090011830 | Wang et al. | Jan 2009 | A1 |
Number | Date | Country |
---|---|---|
1858759 | Nov 2006 | CN |
0735462 | Oct 1996 | EP |
0120446 | Mar 2001 | WO |
Entry |
---|
Chinese Office Action for Application No. CN 1858759A; dated Jan. 29, 2010, 19 pages. |
European search report for application No. EP 07009132.7, dated Nov. 12, 2007. |
Zilker, et al.; “High-speed data acquisition with the Solaris and Linus operating systems”; Fusion Engineering and Design; Elsevier Science Publishers; vol. 48, No. 1-2; Aug. 1, 2000; pp. 193-197. |
Leyva-Del-Foyo, et al.; “Predictable Interrupt Management for Real Time Kernels over Conventional PC Hardware”; Proceedings of the 12th IEEE Real-Time and Embedded Technology and Applications Symposium, San Jose, CA; Apr. 4-7, 2006; 10 pages. |
Maquelin, et al.; “Polling Watchdog: Combining Polling and Interrupts for Efficient Message Handling”; Institute of Electrical and Electronics Engineers Association for Computing Machinery; Proceedings of the 23rd Annual Symposium on Computer Architecture; New York; vol. 23, May 22, 1996; 10 pages. |
Number | Date | Country | |
---|---|---|---|
20080282247 A1 | Nov 2008 | US |