Abstract:
The invention relates to a method of checkpointing the working environment of a user ( 7 ) session on a server ( 1 ) comprising a first step ( 11 ) of checkpointing the working environment of a first application of said session, characterized in that it comprises at least one second step ( 12 ) of checkpointing the working environment of a second application of said session different from said first application, and in that said first checkpointing step ( 11 ) and said second checkpointing step ( 12 ) are synchronized with each other such that the checkpointed working environment of the first application and the checkpointed working environment of the second application are coherent with each other.

Description:
FIELD OF THE INVENTION 
       [0001]    The invention relates to the field of methods of checkpointing the working environment of a session of a user on a server, as well as the field of server networks using such checkpointing methods. 
       BACKGROUND OF THE INVENTION 
       [0002]    According to the prior art, a method of checkpointing the working environment of an application operating during a session of a user on a server is known. Checkpointing is performed at the level of this application by a checkpointing method integrated with this application. Then, the application can be restarted from this checkpoint following an incident when it then disappeared. This is a checkpoint/restart sequence. 
         [0003]    Ideally, to restore an entire user session on a server, each of the applications launched during the session should have such a checkpointing method. In this case, each checkpointing method checkpointed a state of the corresponding application, completely independently from other session applications. Each application is restarted separately on the basis of the state of the working environment that was checkpointed at its level. 
         [0004]    The need to implement several checkpointing methods respectively in different applications to restart the different applications separately makes this prior art complex. In addition, as checkpoints have been made for each application independently from the other applications, a risk of incoherence between checkpointed states exists. 
         [0005]    This incoherence may require the user to go back to one and/or the other of the applications to an earlier checkpointed state, and so on until only the checkpointed states presenting a certain coherence between each other are the initial application states; this is the domino effect that must be avoided. 
       SUMMARY OF THE INVENTION 
       [0006]    The aim of the present invention is to provide a checkpointing method at least partially mitigating the aforementioned disadvantages. 
         [0007]    More specifically, the invention aims to provide a checkpointing method that can checkpoint at least two applications launched during a session and can restart the two applications whose states were checkpointed without risking a domino effect. 
         [0008]    To restart a session in which at least two applications have been launched, each application should first have its checkpointing method, and then should be able to make the checkpointed states compatible with each other. As each checkpointing method changes independently from the others at the application level, this harmonization risks being difficult and tedious. 
         [0009]    The invention proposes using a checkpointing method that is common to both applications, performing synchronized checkpoints of the two applications, such that their respective checkpointed working environments are coherent with each other. Therefore, simultaneously starting the two session applications, or even preferentially all of the session applications, i.e., the entire session, is made easier and faster, thanks to the different checkpointed environments that are coherent with each other, corresponding to the different respective applications launched during the session. 
         [0010]    For this purpose, the present invention proposes a method of checkpointing the working environment of a user session on a server comprising a first step of checkpointing the working environment of a first application of said session, characterized in that it comprises at least one second step of checkpointing the working environment of a second application of said session different from said first application, and in that said first checkpointing step and said second checkpointing step are synchronized with each other such that the checkpointed working environment of the first application and the checkpointed working environment of the second application are coherent with each other. 
         [0011]    For this purpose, the present invention also proposes a network of servers characterized in that it stores and it is configured to carry out regularly, and preferably periodically, the checkpointing method according to the invention, at the level of several servers in said network, and preferably at the level of all of the servers in said network. 
         [0012]    The invention is inexpensive in terms of implementation. It is also inexpensive in machine resources such as, for example, disk space, memory requirements or processing requirements. 
         [0013]    According to preferred embodiments, the invention comprises one or more of the following characteristics that may be used separately or in partial or total combination between each other, with one or the other of the aforementioned objects of the invention. 
         [0014]    Preferably, the working environment of said first application and the working environment of said second application share common data between them, the state of the data is variable over time, and the state of said common checkpointed data is identical for the two checkpoint steps. Therefore, the identical character of the common checkpointed data ensures total coherence between the checkpointed states of the two applications. 
         [0015]    Preferably, all of the checkpoint steps of all of the applications of said session are synchronized with each other as said first and second checkpoint steps. Therefore, the entire session can be easily checkpointed and retrieved by the checkpointing method according to the invention, because all of the applications launched in this session will have been, first, checkpointed and, second, checkpointed coherently between each other. 
         [0016]    All of the sessions on said server are preferably checkpointed in the same manner. Therefore, all of the sessions can be easily checkpointed and retrieved by the checkpointing method according to the invention, because all of the sessions in progress will have been, first, checkpointed and, second, checkpointed coherently between each other. 
         [0017]    Preferably, all of the sessions of all of the servers in the same network are checkpointed in the same manner. Therefore, all of the sessions on the same network can be easily checkpointed and retrieved by the checkpointing method according to the invention, because all of the sessions in progress on the entire network will have been, first, checkpointed and, second, checkpointed coherently between each other. 
         [0018]    Preferably, the checkpointing method according to the invention comprises, following said checkpointing steps, a step of restarting said session or sessions with its or their checkpointed working environment. Therefore, up to the checkpointing time, all of the work performed will have been retained, and the user will not have to start again from the beginning. 
         [0019]    Preferably, said checkpointing steps are carried out regularly, and preferably periodically, and said restarting step is performed once an incident at the level of said server has ended, the incident preferably being a power outage of said server or a hardware or software failure of said server or a maintenance of said server. Therefore, the effect of the incident, which may be disastrous normally, is here limited to the loss of the short period of work performed between the last checkpoint and the incident. 
         [0020]    Preferably, said checkpoint steps are carried out on the initiative of the user, and said restart step is carried out on the initiative of the user. Therefore, the user can checkpoint the status of the entire session at will when this status is most convenient for him before modifying, possibly more uncertainly, this status, knowing that he can, in the event of failure, easily return to this interesting checkpointed status from which he can start again. 
         [0021]    Preferably, said checkpointing steps are carried out on said server, and said restart step is carried out on another server, different from said server when said server remains unavailable following an incident, for a time period exceeding a predetermined duration, said checkpointed working environment being sent to the other server, prior to said restart step. Therefore, even in the event of prolonged unavailability of the server on which the user is working, this user can immediately take advantage of the checkpoint performed by restarting the checkpointed session on another server which is, first, available and which has, second, the information necessary to enable the restart of this checkpointed session. 
         [0022]    Preferably, said working environments to be checkpointed are checkpointed in a storage structure common to several servers in the same network, and preferably common to all servers in the same network. Therefore, the level of communication on the network and, consequently, the level of noise on the network are significantly reduced compared to a system where the servers would store their working environment in their own memory to then send it to all the other servers needing it. On the contrary, all of the working environments are stored in the same location that the other servers can directly consult, but which they will only consult if needed. In this manner, only the server that will replace another unavailable server, and not all the servers in the network, will consult this location to obtain the checkpointed working environment. 
         [0023]    Preferably, said storage structure common to several servers in the same network is distributed on these same servers and uses part of the storage disk of several of these servers or all of these servers. Data are distributed between the servers, and each bit of data is duplicated, i.e., ultimately stored on at least two servers, but of course not on all the servers. Therefore, the functionally unique storage location reduces the communication and noise on the network, while the structurally distributed character of this functionally unique storage location enables available and unemployed resources, and thus inexpensive resources, on the various servers to be used, whereas to create a large centralized memory to store all of these checkpointed environments would cost an extra, relatively large resource. The distribution of storage, which involves the distribution of data with duplication at certain locations but not everywhere, simultaneously enables space to be saved and a degree of redundancy to be provided so as to not lose data in the event of localized corruption of this data. 
         [0024]    Preferably, each of the servers in the same network reports regularly, and preferably periodically, to several other servers of said network, and preferably to all other servers of said network, whether it is operational or not. Therefore, the unavailable character of a server in the network is immediately recognized. Admittedly, this causes a little data to circulate on the network, but only a very small amount, and immeasurably less than the volume of data that would be necessary for the regular communication of checkpointed environments. In addition, this avoids having to store this very sensitive data, i.e., the available or unavailable character of all of the servers, in a single location which would then become the weak link in the system because, in the event of failure at this level, the entire network would become paralyzed at the checkpoint level. Sending this availability information from one server to other servers (“heartbeating”) in the network ensures the proper, robust operation of the checkpoints. 
         [0025]    Preferably, when a server in a network becomes unavailable, a user having opened a session on this server reports this unavailability to a common address or to a resource scheduler, so as to be able to restart, on another server in this network, his checkpointed session which was open on the server that has now become unavailable. This specific element of the network will organize the succession and assign a suitable replacement server to this user, i.e., an available server that can be used by this user while only causing minimal disruption to the level of operation of the entire network. 
         [0026]    Preferably, the functionalities of said method are stored in the user space of said server but are managed by the core of said server. Therefore, this checkpointing method is to a large extent made independent from the operating system effectively used by the core server. 
         [0027]    Preferably, when checkpointing said working environment, at least the following are checkpointed: The session&#39;s environmental variables, the history of commands during the session, the functions used by the user but not defined during connection of the user at the start of the session and the applications running during the session. Therefore, the main elements of a session in progress will be checkpointed and this session can restart with an efficacy similar to that which it had without incident, in a number of cases greater than  95 % of potential cases. 
         [0028]    Preferably, the server network does not comprise a system of maintaining electrical power in the event of an incident, and preferably it does not comprise a converter. Therefore, in the event of an incident, there is no system that can prolong the availability of the server, possibly to the end of the incident, which incident would then be transparent to the server. On the contrary, in the event of an incident, the server immediately fails, which makes the presence of the checkpointing method according to the invention for mitigating the effects of this server failure even more interesting. The larger the server network, the more complex and expensive it becomes to associate this type of electrical power maintenance system, which is for example a converter, with it. 
         [0029]    Preferably, the server network comprises at least 2 servers, preferably at least 10 servers, still more preferably at least 100 servers, and still more preferably at least 1000 servers. The higher the number of servers, the more incidents likely to disrupt sessions in progress, and the more interesting the presence of the checkpointing method according to the invention becomes for mitigating the ever more numerous effects of this increasing number of incidents. 
         [0030]    Other characteristics and advantages of the invention will appear upon reading the following description of a preferred embodiment of the invention, given by way of example with reference to the appended drawings. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0031]      FIG. 1  schematically represents an example of a server network implementing the checkpointing method according to an embodiment of the invention. 
           [0032]      FIG. 2  schematically represents an example of the sequence of steps of the checkpointing method according to an embodiment of the invention. 
       
    
    
     DETAILED DESCRIPTION OF THE INVENTION 
       [0033]      FIG. 1  schematically represents an example of a server network implementing the checkpointing method according to an embodiment of the invention. The arrows indicate communications between elements of the network with the direction of communication. 
         [0034]    A network  6  comprises many servers. Here, for reasons of clarity, only servers  1 ,  2  and  3  are represented. Network  6  also comprises a storage structure  4  and a resource scheduler  5 . 
         [0035]    A user  7  opened a session on server  1 . User  7  is a client computer station of server  1 . Servers  1 ,  2  and  3  communicate with each other to say that they are operational, i.e. available. Servers  1 ,  2  and  3  periodically perform checkpoints of all their sessions on storage structure  4 . Daemons, i.e., software programs running in the background, managing the checkpoint and restart system synchronize with each other to ensure they have user session data, if needed. 
         [0036]    An incident occurs at the level of server  1  and the user  7  session suddenly crashes and is lost. A copy of this crashed session exists in storage structure  4 ; this copy corresponds to the state of this session when the last checkpoint is performed, generally a relatively short time before the incident occurs. Server  1  is unavailable; therefore it has stopped sending its availability signal to servers  2  and  3 , who thus know that server  1  has become unavailable. User  7  reports the suspension of its session to resource scheduler  5 . If during the end of the incident, and even for a certain period of time after the end of the incident, server  1  still remains unavailable, then according to predefined priority criteria including, for example, the volume of tasks in progress, available memory, etc., resource scheduler  5  chooses another available server from among remaining servers  2  and  3 , for example server  3 . 
         [0037]    Chosen server  3  downloads the checkpointed working environment of the user  7  session on server  1  from storage structure  4 . Server  3  reopens the session of user  7 , who will be connected to server  3  with his session reopened with the checkpointed working environment. This reopening of the user  7  session may have been reported previously by the resource scheduler  5 . User  7  can resume his session in the state it was in during the last checkpoint, but this time on server  3 . 
         [0038]    If server  1  becomes available again at the end of the incident, or within a predetermined period of time after the end of the incident, user  7  will resume his session under the same conditions, but this time by resuming the session on the same server  1 . If, instead of an incident, it&#39;s a checkpoint initiated by user  7  which took place, the session can be stopped, also at the initiative of user  7 , to resume from the last checkpoint performed at the initiative of user  7 , this time preferentially on the same server  1 . 
         [0039]      FIG. 2  schematically represents an example of the sequence of steps of the checkpointing method according to an embodiment of the invention. 
         [0040]    The method comprises a step  10  of checkpointing the working environment of a user session on a given server. In this step  10  of checkpointing the working environment of a user session on a given server, two sub-steps  11  and  12  are performed. These sub-steps include a sub-step  11  consisting of the first checkpoint of the working environment of a first application in this user session and a sub-step  12  consisting of the second checkpoint of the working environment of a second application in this user session. Synchronization  13  synchronizes between the two sub-steps  11  and  12 . A loop  14  enables this step  10  of checkpointing the working environment of this user session to be performed periodically. 
         [0041]    Data associated with the working environment of the user session on a server are tracked. These tracks are stored in a user-specific directory and are read at the start of a session, enabling the user to resume his work in progress. However, in the absence of a checkpoint, and in the event of an incident, all data risk being lost. 
         [0042]    In particular, the checkpointed working environment comprises, for example: environment variables, command history, aliases, i.e., command shortcuts or command end routines, for example, not defined during connection of the user, and specific running processes. In addition, a specific service is activated to checkpoint session data and make the data usable on several different servers, in the event of prolonged unavailability of the original server. This session information includes metadata, such as for example, the name of the user, identifier of the server, identifier of the session and connection and disconnection times of the user. In addition, a tool can be provided allowing the user to checkpoint the environment and restore it at will on the same server or of course on another distinct server in the event of prolonged unavailability of the original server. 
         [0043]    An incident lasts a certain amount of time during which this user session crashes and during which the original server on which this user session proceeded is unavailable. Step  15  is the duration of the incident. 
         [0044]    At the end of the incident, a timing step  16  is launched and at the end of this timing step  16 , i.e., after a predetermined period of time has elapsed after the incident has ended, the availability of the server on which the incident occurred (original server) is evaluated: Either this server is again available, or this server is still unavailable. 
         [0045]    If this server is again available, which corresponds to step  17 , then this user session is restarted on the basis of the checkpointed working environment on the server on which the incident occurred. 
         [0046]    If this server is still unavailable, which corresponds to step  19 , first the checkpointed working environment is sent to another available server, distinct from the server on which the incident occurred and which is still unavailable, during a communication step  20 , and then a step  21  of restarting this user session is carried out on the basis of the checkpointed working environment, but on this other available server distinct from the server on which the incident occurred. 
         [0047]    Here is the sequence of a simple example of use in an environment with a Linux Bash. The user is writing a program with a certain editor X. He is working on a remote Linux server from his Windows (registered trademark) work station. The remote server crashes following a power failure. The user is connected to another server that is present, the system detects that he is not on the same server, and proposes that he resume the work he began. The daemon of this new server detected that the daemon of the prior server is no longer there or has encountered a problem. Therefore, thanks to the checkpoint performed, the user was only slightly disrupted by the incident and could quickly resume his session under good conditions. 
         [0048]    Of course, the present invention is not limited to the examples and embodiment described and represented, but is suitable for many variations accessible to the person skilled in the art.