Patent Description:
Methods for synchronizing a distributed application are known in the state of the art and widely used for enabling an application frontend of the distributed application and an application backend of the distributed application to be executed synchronously or in a synchronicity, i.e. with a constant or a substantially constant time offset. The distributed application may comprise, e.g., a business application, a scientific application, a streaming application or a gaming application.

Usually, the application backend is executed by a server while the application frontend is executed by a terminal device being arranged remote from the server. For instance, the terms 'server' and 'terminal device' may refer to hardware entities and the terms 'backend' and 'frontend' may refer to software entities. The server and the terminal device are connected to each other by a communication network, more precisely by a communication connection provided by a communication network, while the distributed application is being executed. During the execution of the distributed application the application backend continuously transmits a plurality of application data packets via the communication network to the application frontend.

Each of the server and the terminal device usually comprises a clock, i.e. a local time reference. Of course, a time indicated by the clock of the server may and generally will differ from a time indicated by the clock of the terminal device at a given time. In other words, different timestamps may and generally will be retrieved from the clock of the server and the clock of the terminal device when the respective clocks are read simultaneously.

Exemplarily, <CIT>, <CIT> and the article "<NPL>, respectively disclose methods for synchronizing a clock of a slave node with a clock of a master node via a communication network.

It is noted just for excluding any misunderstanding that synchronizing the distributed application neither implies nor requires setting a clock of the server or a clock of the terminal device synchronous to each other resulting in that timestamps being retrieved simultaneously from the clocks are identical. Rather is the distributed application considered to be synchronized when the application backend and the application frontend are continuously executed synchronously, i.e. with a constant or substantially constant time offset.

For achieving a synchronous execution of the distributed application, the application backend repeatedly retrieves a backend timestamp by reading the clock of the server and transmits a synchronization request packet via the communication network to the application frontend. The synchronization request packet causes the application frontend, upon receipt of the transmitted synchronization request packet, to retrieve a frontend timestamp by reading the clock of the terminal device and transmit the retrieved frontend timestamp to the application backend. The application backend, upon receipt of the transmitted frontend timestamp, calculates a time offset of the frontend timestamp from the retrieved backend timestamp. The calculated time offset is used by the application frontend as a synchronizing means.

Thus, a data stream from the server to the terminal device necessarily comprises both the application data packets and the synchronization request packets transmitted by the application backend wherein the synchronization request packets are distributed within the data stream, each synchronization request packet being positioned between two successive application data packets in the data stream.

The communication network is, however, not exclusively used by said distributed application but may and generally will, at the same time, also be used by a plurality of further distributed applications all together eventually generating a heavy load of the communication network. Apart from that, a state of the communication connection used by the distributed application may and generally will vary over time and, hence, possibly be actually insufficient for the distributed application.

When there is a heavy load of the communication network or an insufficient state of the communication connection the data stream as a whole may temporarily slow down or even halt, i.e. temporarily stagnate. A temporary stagnation of the data stream is the more probable and occurs the more frequently the higher a data rate of the data stream, i.e. a transmission rate of the application backend, and/or the less sufficient the state of the communication connection, i.e. the lower a bitrate and/or the higher a latency of the communication connection, is.

The data rate of the data stream is substantially determined by a number and/or a packet size of the application data packets to be transmitted within a time unit. Modern distributed applications transmit very large data streams and, thus, may easily cause the data stream to temporarily stagnate. An insufficient state of the communication connection is substantially determined by technical conditions of the communication connection. Wireless communication connections, e.g., may suffer from a marginal or shaded position of the terminal device within a radio cell and/or from a handover condition concerning the terminal device and/or from radio signals being damped or interfering due to topographical conditions within a radio cell.

Any temporary stagnation of the data stream necessarily also concerns the synchronization request packets preventing them from arriving at the terminal device in time, i.e. forcing them to arrive late at the terminal device. Sporadic late arrivals of synchronization request packets at the terminal device are commonly referred to as a jitter of the synchronization request packets. The jitter inevitably causes the time offset calculated by the application backend to vary. The stronger the jitter is the worse a synchronicity of the distributed application is. Accordingly, reducing the jitter is very desirable for a synchronous execution of the distributed application.

It is, therefore, an object of the invention to suggest a method for synchronizing a distributed application which allows for reducing a jitter caused by a communication connection of a communication network. Further objects of the invention are providing a distributed application and a computer program product.

The invention is specified by the independent claims and the dependent associate claims. The subclaims specify favorable embodiments of the invention.

A first aspect of the invention is a method for synchronizing a distributed application, comprising the steps: an application backend of a distributed application executed by a server transmits application data packets to an application frontend of the distributed application executed by a terminal device via a communication connection provided by a communication network; the application backend transmits a synchronization request packet to the application frontend via the communication connection; the application backend retrieves a backend timestamp from a clock of the server; the application frontend, upon receipt of the synchronization request packet, retrieves a frontend timestamp from a clock of the terminal device and transmits the retrieved frontend timestamp to the application backend via the communication connection; and the application backend, upon receipt of the transmitted frontend timestamp calculates a time offset of the frontend timestamp from the retrieved backend timestamp and uses the calculated time offset as a synchronizing means.

The application backend is executed by the server and generates a data stream comprising the application data packets and the synchronization request packets to be transmitted via the communication network. The communication network forwards the data stream to the terminal device via a communication connection provided by the communication network. Of course, the generated data stream may be readily forwarded to a plurality of terminal devices in case the distributed application comprises a plurality of application frontends each being executed by a different terminal device.

The application frontend is executed by the terminal device and receives the application data packets and the synchronization request packets. For instance, the terminal device may display the application data packets on a screen and/or with a loudspeaker of the terminal device. Each synchronization request packet may be considered as a time measurement request directed to the application frontend to measure a local time of the terminal device by retrieving a timestamp from the clock of the terminal device.

The server may be a server connected to and being accessible via the communication network. The terminal device may be configured as a smartphone, a tablet, a notebook, a desktop computer, a drone or the like.

According to the invention a scheduler of the communication network, on forwarding the application data packets and the synchronization request packets, detects an actual state of the communication connection and transmits control data depending on the detected actual state to the application backend, and the application backend, upon receipt of the transmitted control data, adapts a transmission of the synchronization request packets when the control data indicate a jitter of the synchronization request packets preventing the distributed application from being executed synchronously.

Preferably, adapting the transmission of the synchronization request packets comprises transmitting the synchronization request packets at varying time intervals. The application backend deviates from a common periodic transmission of the synchronization request packets and optimizes the corresponding transmission events with respect to the respective actual state of the communication connection. The application backend may intentionally delay or even omit a transmission of a synchronization request packet in case the actual state of the communication connection would force the synchronization request packet to arrive late at the terminal device and, hence, to increase the jitter of the synchronization request packets. As a result, the jitter of the synchronization request packets is reduced.

Adapting the transmission of the synchronization request packets particularly comprises transmitting a synchronization request packet when a latency of the communication connection detected by the scheduler is equal to or lower than a predetermined latency for a predetermined minimum time and/or when a bitrate of the communication connection detected by the scheduler is equal to or higher than a predetermined bitrate for a predetermined minimum time.

In other words, synchronization request packets are transmitted when a bitrate of the communication connection continuously exceeds the predetermined minimum bitrate, i.e. when the bitrate does not even short-term decrease substantially. Accordingly, the application backend prefers transmitting a synchronization request packet when there is little risk of stagnation of the data stream. As a result, a risk of synchronization request packets arriving late is reduced resulting in a reduced jitter and a more synchronous execution of the distributed application.

Analogously, synchronization request packets are transmitted when a latency of the communication connection continuously does not exceed the predetermined maximum latency, i.e. when the latency does not even short-term increase substantially. Accordingly, the application backend prefers transmitting a synchronization request packet when there is little risk of stagnation of the data stream. As a result, a risk of synchronization request packets arriving late is reduced resulting in a more synchronous execution of the distributed application.

In further embodiments, adapting the transmission of the synchronization request packets comprises transmitting a synchronization request packet at a maximum possible time distance to a key frame packet when the application data packets form a video stream and/or splitting a large application data packet into at least two small application data packets and transmitting a synchronization request packet at a minimum possible time distance to the first small application data packet.

Transmitting the synchronization request packets at a time distance from the large key frame packets of the video stream reduces a risk of the synchronization request packets arriving late. Splitting the large application data packets results in a more granular data stream without excessively large application data packets, thus, reduces a risk of the synchronization request packets arriving late. Splitting large application data packets and transmitting the synchronization request packets at a time distance from the large key frame packets result in a more synchronous execution of the distributed application, respectively.

In favorable embodiments, adapting the transmission of the synchronization request packets comprises transmitting the synchronization request packets via a communication channel of the communication connection being scheduled at a higher priority than a communication channel of the communication connection the application data packets are transmitted via. In other words, the synchronization request packets are transmitted separately from the application data packets, e.g. use a communication channel, i.e. a queue, separate from a communication channel used by the application data packets. Thus, the synchronization request packets are not affected by a stagnation of the application data packets. As a result, a risk of the synchronization request packets arriving late is reduced resulting in a more synchronous execution of the distributed application.

In very preferred embodiments, the application backend, upon receipt of the transmitted control data, adapts a transmission of the application data packets when the control data indicate a jitter of the synchronization request packets preventing the distributed application from being executed synchronously.

Particularly, adapting the transmission of the application data packets comprises adapting a transmission rate and/or a packet size of the application data packets and/or transmitting the application data packets via a communication channel of the communication connection being scheduled at a higher priority than a default communication channel of the communication connection.

Adapting the transmission rate of the application data packets preferably comprises transmitting the application data packets at a transmission rate and/or with a packet size requiring at most a bitrate of the communication connection detected by the scheduler. Accordingly, the application backend strictly avoids overloading the communication connection and causing queues of the communication connection to extend. As a result, the data stream is prevented from stagnation and the synchronization request packets do not arrive late resulting in a more synchronous execution of the distributed application.

It is noted just for avoiding any misunderstanding that the term 'transmission rate' refers to the rate the application backend actually applies while the term 'bitrate' refers to the rate the communication connection actually supports. When the transmission rate exceeds the bitrate a queue of the communication connection extends. When, however, the transmission rate is below the bitrate the queue shortens.

More preferably, adapting the transmission of the application data packets comprises transmitting the application data packets at a transmission rate lower than the bitrate detected by the scheduler. The lower transmission rate tolerates a moderate temporary deterioration of the state of the communication connection without adversely affecting the data stream. As a result, the data stream is even better prevented from stagnation and the synchronization request packets are not delayed by the communication connection resulting in a more synchronous execution of the distributed application.

In other embodiments, the application backend at least acknowledges an inaccuracy of the synchronicity of the distributed application when adapting the transmission of the application data packets does not cause the control data to stop indicating a jitter of the synchronization request packets. Acknowledging, i.e. being aware of, the possible inaccuracy may be beneficial for the application backend even when the application backend is at least temporarily unable to reduce a jitter of the synchronization request packets. Due to the awareness, the application backend may take into account the possible inaccuracy of the synchronicity in a favorable way depending on the type of application.

Detecting the actual state of the communication connection particularly comprises detecting a scheduling delay, a queuing delay, a transmission time and/or a re-transmission rate of the communication connection and/or a handover condition concerning the terminal device. Said delays, times, rates or conditions are readily accessible for being measured or observed by the scheduler in order to detect the actual state of the communication connection.

In advantageous embodiments, a radio access network provides the communication connection as the communication network and/or a server of an edge computing data center executes the application backend as the server and/or NTP packets or PTP packets are transmitted as the synchronization request packets.

The radio access network (RAN), i.e. a mobile telecommunication network, e.g. a cellular network or a wireless local area network (WLAN), may be connected to by a plurality of different terminal devices, e.g. a smartphone, a tablet, a notebook, a desktop computer, a drone and the like being arranged or moving within a radio cell of the radio access network.

The edge computing data centers forms part of the radio access network. Round trip times (RTT) are very low for edge computing data centers as compared with internet servers connected to and accessible via the radio access network. Thus, edge computing data centers allow for, e.g., a distributed real time video application, an augmented reality (AR) application or a distributed gaming application wherein a video stream or a game scenery generated by the application backend is transmitted to the terminal device which just displays the video stream or the game scenery and records and transmits corresponding user actions to the server.

The network time protocol (NTP) and the precision time protocol (PTP) are commonly used and well-established protocols for synchronization.

In preferred embodiments, transmitting the control data comprises transmitting a maximum latency and/or a minimum bitrate and/or a predetermined combination of a maximum latency and a minimum bitrate and/or marking an application data packet.

The scheduler sets the maximum latency and/or the minimum bitrate according to the detected latency and/or bitrate, thus, allowing the application backend for adapting the transmission rate of the application data packets to the set maximum latency and/or the minimum bitrate. The scheduler may determine the maximum latency and/or the minimum bitrate from a plurality of predefined combinations of different maximum latencies and/or different minimum bitrates.

Each predetermined combination of the maximum latency and/or the minimum bitrate may correspond to a defined quality of service (QoS). The distributed application may require predetermined combinations for being executed properly.

The scheduler, taking into account the detected state of the communication connection, determines and sets the maximum latency and/or the minimum bitrate in order to allow for a quality of service (QoS) required by the distributed application. This configuration is very common configuration in modern communication networks.

The maximum latency and/or the minimum bitrate and/or the predetermined combination of a maximum latency and a minimum bitrate may be directly transmitted to the application backend as the control data. The application backend may set the transmission rate and/or the packet size of the application data packets to, according to the control data, optimally match the maximum latency and/or the minimum bitrate of the communication connection. Alternatively, the control data may be indirectly transmitted to the application backend. The scheduler may mark the application data packets by setting bits in the packet headers, the bits indicating the state of the communication connection. The application frontend, upon receipt of the marked application data packets, reads the set bits of the application data packets and transmits control data to the application backend according to the read bits.

Adapting, thus, may comprise increasing or decreasing the transmission rate and/or the packet size of the application data packets when the latency decreases or increases, respectively, or when the bitrate increases or decreases, respectively. As a result, a risk of a stagnation of the data stream and the synchronization request packets arriving late is reduced resulting in a more synchronous execution of the distributed application.

A second aspect of the invention is a distributed application, comprising an application backend to be executed by a server and an application frontend to be executed by a terminal device in synchronicity with the application backend. The distributed application may, for instance, comprise a business application, a scientific application, a streaming application or a gaming application.

According to the invention the distributed application is configured for participating in a method according to the invention for synchronizing the application frontend with the application backend. The distributed application is configured for adequately reacting to control data received from a scheduler of communication network as described above. The distributed application benefits from a very precise synchronicity which is not affected by a heavy load of the communication network.

A third aspect of the invention is a computer program product, comprising a storage medium with a program code implementing a distributed application. The storage medium may be a CD, a DVD, a USB stick, a memory chip, a hard disk and the like. The program code comprised by the computer program product may be executable by the server and the terminal device, respectively, immediately or after having been installed thereon.

According to the invention the program code causes an application backend of the distributed application and an application frontend of the distributed application to participate in a method according to invention when being executed by a processor of a server and a terminal device, respectively. The computer program product creates a distributed application being configured for adequately reacting to control data received from a scheduler of a communication network as described above. The distributed application benefits from a very precise synchronicity which is not affected by a heavy load of the communication network.

It is an essential advantage of the inventive method that a distributed application comprising an application backend and an application frontend being connected to each other via a communication connection of a communication network is executed very synchronously even with a heavy load of the communication network or an insufficient actual state of the communication connection. Due to the method, a precision of the synchronization is not or not substantially affected by a bottleneck condition occurring in the communication network.

Further advantages and configurations of the invention become apparent from the following description and the enclosed drawings.

It shall be understood that the features described previously and to be described subsequently may be used not only in the indicated combinations but also in different combinations or on their own without leaving the scope of the present invention.

The invention is described in detail by means of two exemplary embodiments and with reference to the drawings. Like components are indicated by like reference numerals throughout the drawings.

<FIG> schematically shows a block diagram of a system carrying out a method according to the invention for synchronizing a distributed application.

<FIG> schematically shows a block diagram of a system carrying out a method according to the invention for synchronizing a distributed application <NUM>, <NUM>. The system comprises a communication network <NUM>, which is exemplarily configured as a radio access network (RAN), more precisely as a wireless telecommunication network, e.g. a cellular network, with an antenna <NUM> creating a radio cell of the communication network <NUM>.

Furthermore, the system comprises a plurality of servers <NUM> each having a clock <NUM>. The servers <NUM> are preferably arranged close to the antenna <NUM>, i.e. the servers <NUM> form an edge computing data center. Of course, the invention is as well applicable to different communication networks, e.g., wired communication networks. The system also comprises a terminal device <NUM> with a clock <NUM>. The terminal device <NUM> is exemplarily configured as a user equipment (UE), more precisely as a smartphone, a tablet, a notebook, a desktop computer, a drone or the like, being arranged and/or moving within the radio cell.

The communication network <NUM> defines a plurality of communication channels <NUM> which are configured as queues. Furthermore, the communication network <NUM> comprises a scheduler <NUM> for selecting packets <NUM>, <NUM> from the communication channels <NUM> and forwarding each selected packet <NUM>, <NUM> to the antenna <NUM>.

The system comprises a distributed application <NUM>, <NUM> with an application backend <NUM> to be executed by the server <NUM> and an application frontend <NUM> to be executed by the terminal device <NUM>. The application backend <NUM> is configured for generating and transmitting a data stream comprising a plurality of application data packets <NUM> and synchronization request packets <NUM> to the application frontend <NUM>. The application frontend <NUM> is configured for receiving the data stream <NUM> from the application backend <NUM>. The distributed application <NUM>, <NUM> is further configured for participating in a method described below for synchronizing the application frontend <NUM> with the application backend <NUM>.

For instance, the distributed application <NUM>, <NUM> is an edge cloud gaming application and the application data packets <NUM> form a video stream comprising the continuously changing game scenery to be displayed by the terminal device <NUM>, particularly on a screen and/or with a loudspeaker of terminal device <NUM>.

A computer program product may be used for setting up the distributed application <NUM>, <NUM>. The computer program product comprises a storage medium with a program code implementing the application backend <NUM>. The program code causes the application backend <NUM> and the application frontend <NUM> to participate in the following method when being executed by a processor of a server <NUM> and a terminal device <NUM>, respectively.

The system carries out the following method for synchronizing the distributed application <NUM>, <NUM>.

The application backend <NUM> which is executed by the server <NUM> of the edge computing data center transmits application data packets <NUM> to the application frontend <NUM> which is executed by the terminal device <NUM> via a communication connection <NUM> provided by the communication network <NUM>. Exemplarily, a radio access network, i.e. a wireless communication network, e.g. a cellular network, provides the communication connection <NUM> as the communication network <NUM>.

The application backend <NUM> retrieves a backend timestamp from the clock <NUM> of the server <NUM> and transmits synchronization request packets <NUM> to the application frontend <NUM> via the communication connection <NUM>. NTP packets or a PTP packets may be transmitted as the synchronization request packets <NUM>.

Upon receipt of the synchronization request packet <NUM>, the application frontend <NUM> retrieves a frontend timestamp from the clock <NUM> of the terminal device <NUM> and transmits the retrieved frontend timestamp to the application backend <NUM> via the communication connection <NUM>. The application backend <NUM>, upon receipt of the transmitted frontend timestamp, calculates a time offset of the frontend timestamp from the retrieved backend timestamp and uses the calculated time offset as a synchronizing means.

The scheduler <NUM> of the communication network <NUM>, on forwarding the application data packets <NUM> and the synchronization request packets <NUM>, detects an actual state of the communication connection <NUM>. Detecting the actual state of the communication connection <NUM> may comprise detecting a scheduling delay, a queuing delay, a transmission time, a re-transmission rate of the communication connection <NUM> and/or a handover condition concerning the terminal device <NUM>.

The scheduler <NUM> transmits control data <NUM> indicating the actual state of the communication connection <NUM>. Transmitting the control data <NUM> comprises transmitting a maximum latency and/or a minimum bitrate and/or a predetermined combination of a maximum latency and a minimum bitrate and/or marking an application data packet <NUM>.

The application backend <NUM>, upon receipt of the transmitted control data <NUM>, adapts a transmission of the synchronization request packets <NUM> when the control data <NUM> indicate a jitter of the synchronization request packets <NUM> preventing the distributed application <NUM>, <NUM> from being executed synchronously. Adapting the transmission of the synchronization request packets <NUM> may comprise transmitting the synchronization request packets <NUM> at varying time intervals.

Adapting the transmission of the synchronization request packets <NUM> may comprise transmitting a synchronization request packet <NUM> when a latency of the communication connection <NUM> detected by the scheduler <NUM> is equal to or lower than a predetermined latency for a predetermined minimum time and/or when a bitrate of the communication connection <NUM> detected by the scheduler <NUM> is equal to or higher than a predetermined bitrate for a predetermined minimum time.

Adapting the transmission of the synchronization request packets <NUM> particularly comprises transmitting a synchronization request packet <NUM> at a maximum possible time distance to a key frame packet when the application data packets <NUM> form a video stream and/or splitting a large application data packet <NUM> into at least two small application data packets and transmitting a synchronization request packet <NUM> at a minimum possible time distance to the first small application data packet.

Adapting the transmission of the synchronization request packets <NUM> may additionally or alternatively comprise transmitting the synchronization request packets <NUM> via a communication channel <NUM> of the communication connection <NUM> being scheduled at a higher priority than a communication channel <NUM> of the communication connection <NUM> the application data packets <NUM> are transmitted via.

Preferably, the application backend <NUM>, upon receipt of the transmitted control data <NUM>, adapts a transmission of the application data packets <NUM> when the control data <NUM> indicate a jitter of the synchronization request packets <NUM> preventing the distributed application <NUM>, <NUM> from being executed synchronously.

Adapting the transmission of the application data packets <NUM> may comprise adapting a transmission rate and/or a packet size of the application data packets <NUM> and/or transmitting the application data packets <NUM> via a communication channel <NUM> of the communication connection <NUM> being scheduled at a higher priority than a default communication channel <NUM> of the communication connection <NUM>.

Particularly, adapting the transmission rate of the application data packets <NUM> comprises transmitting the application data packets <NUM> at a transmission rate and/or with a packet size requiring at most a bitrate of the communication connection <NUM> detected by the scheduler <NUM>.

Adapting the transmission of the application data packets <NUM> may comprise transmitting the application data packets <NUM> at a transmission rate lower than the bitrate detected by the scheduler <NUM>.

Claim 1:
A method for synchronizing a distributed application (<NUM>, <NUM>), comprising the steps:
- an application backend (<NUM>) of the distributed application (<NUM>, <NUM>) executed by a server (<NUM>) transmits application data packets (<NUM>) to an application frontend (<NUM>) of the distributed application (<NUM>, <NUM>) executed by a terminal device (<NUM>) via a communication connection (<NUM>) provided by a communication network (<NUM>);
- the application backend (<NUM>) transmits a synchronization request packet (<NUM>) to the application frontend (<NUM>) via the communication connection (<NUM>);
- the application backend (<NUM>) retrieves a backend timestamp from a clock (<NUM>) of the server (<NUM>);
- the application frontend (<NUM>), upon receipt of the synchronization request packet (<NUM>), retrieves a frontend timestamp from a clock (<NUM>) of the terminal device (<NUM>) and transmits the retrieved frontend timestamp to the application backend (<NUM>) via the communication connection (<NUM>);
- the application backend (<NUM>), upon receipt of the transmitted frontend timestamp, calculates a time offset of the frontend timestamp from the retrieved backend timestamp and uses the calculated time offset as a synchronizing means, the distributed application (<NUM>, <NUM>) being considered to be synchronized when the application backend (<NUM>) and the application frontend (<NUM>) are continuously executed with a constant or substantially constant time offset;
- a scheduler (<NUM>) of the communication network (<NUM>), on forwarding the application data packets (<NUM>) and the synchronization request packets (<NUM>), detects an actual state of the communication connection (<NUM>) and transmits control data (<NUM>) depending on the detected actual state to the application backend (<NUM>);
- the application backend, upon receipt of the transmitted control data (<NUM>), adapts a transmission of the synchronization request packets (<NUM>) when the control data (<NUM>) indicate a jitter of the synchronization request packets (<NUM>) preventing the distributed application (<NUM>, <NUM>) from being executed synchronously.