Detecting and managing losses of event datasets in a computing network

Losses of event datasets in computing networks can be detected and managed according to some examples. One example can include a system that can identify a slot among a group of slots of a ring buffer in which to store an event dataset. The system can determine a sequence number to associate with the event dataset. The system can then write the sequence number in a first predefined area of the slot of the ring buffer. Additionally, the system can initiate a write process for writing the event dataset in a second predefined area of the slot of the ring buffer, the second predefined area being separate from the first predefined area. The system can detect a completion of the write process and, in response to detecting the completion of the write process, include a write-completion indicator in the first predefined area.

TECHNICAL FIELD

The present disclosure relates generally to detecting and managing data losses in a computing network. More specifically, but not by way of limitation, this disclosure relates to detecting and managing losses of event datasets in a computing network.

BACKGROUND

The recent proliferation of Internet-connected devices, such as smart watches, wearables, and Internet-of-Things (IOT) devices, has dramatically increased the number of interconnected devices communicating with one another over computing networks. Such communications generally originate from a provider device and are triggered by events. An event is a predefined condition that triggers a provider device to convey (e.g., over a network) information to one or more recipient devices. As one particular example, a smart temperature sensor may serve as a provider device that only reports a temperature measurement to a recipient device in response to detecting a certain event, such as a temperature of the sensor's surrounding environment exceeding a predefined threshold. This may generate much less network traffic than, for example, the smart temperature sensor continuously reporting temperature measurements at a periodic interval to the recipient device.

DETAILED DESCRIPTION

In a typical network arrangement, a producer device can convey information about detected events to one or more recipient devices. This information is referred to herein as an event dataset. Often, the producer device conveys event datasets to the recipient devices via a bounded queue. A bounded queue is a first-in-first-out (FIFO) queue with a fixed capacity. As the producer device detects events, the producer device writes the corresponding event datasets to the bounded queue for retrieval by the recipient devices. But mismatches between how fast the producer device writes event datasets to the bounded queue and how fast the recipient devices read the event datasets from the bounded queue can lead to a variety of problems. For example, if the producer device writes event datasets to the bounded queue faster than the recipient devices can read them, some of the event datasets in the bounded queue may be overwritten by the producer device before the recipient devices can read them. One way to reduce such data loss is to throttle the producer device's writes to the bounded queue, so that the recipient devices have time to catch up. For example, writing to the bounded queue can be paused so that the recipient devices are able to read the event datasets that may otherwise be overwritten by the provider device. But this increases latency and puts additional onus on the producer device, and the event datasets present in the bounded queue may be outdated by the time the recipient devices have caught up. Alternatively, if the recipient devices read event datasets from the bounded queue at a faster rate than the producer device can write them, the recipient devices may retrieve incomplete event datasets.

Some examples of the present disclosure can overcome one or more of the abovementioned problems via a producer device that can write a respective sequence number to a ring buffer in conjunction with each respective event dataset. A sequence number is a numerical value in a successive sequence of ordered numerical values, where each sequence number differs from the next number in the sequence by a predefined sequence interval. The sequence numbers stored in the ring buffer can be used by recipient devices to determine if, and how much, data loss has occurred. Depending on how much data loss has occurred, the recipient device may then take corrective action. This can take the onus off the producer device to mitigate data loss, decrease the latency of the system, and help ensure that the recipient devices are receiving the most up-to-date event datasets.

As one specific example, a system can include a producer device and a recipient device. The producer device can detect an event and responsively initiate a process to write an event dataset associated with the event to a slot of a ring buffer. As part of the process, the producer device can determine a current value of a counter stored in memory and use the current value as the sequence number for the event dataset. The producer device can then write the sequence number for the event dataset to a first predefined area of the slot of the ring buffer. After writing the sequence number to the first predefined area, the producer device can increment the counter to generate the next sequence number for use with the next event dataset. Additionally, the producer device can initiate a write process for writing the event dataset to a second predefined area of the slot in the ring buffer, where the second predefined area is separate from the first predefined area. The write process may take more or less time depending on the size of the event dataset. Upon completing the write process, the producer device can incorporate a write-completion indicator into the first predefined area of the slot. A write-completion indicator is an indicator that a write process is complete. One example of the write-completion indicator can include the incremented counter value. The producer device can repeat this process for each event dataset that it adds to the ring buffer.

As the producer device writes to the ring buffer, the recipient device can also read from the ring buffer. For example, the recipient device can receive an event dataset and a corresponding sequence number from a slot of the ring buffer. The recipient device can then compare the sequence number to a comparison value to determine a relationship between the two. In some examples, the comparison value may be a current value of a counter on the recipient device, or the comparison value may be the current value of the counter on the recipient device as incremented by a predefined sequence interval. If the sequence number is equivalent to the comparison value, then the recipient device can determine that no event datasets have been lost. If the sequence number is different than the comparison value, then the recipient device can determine that one or more data-loss events occurred. A data-loss event occurs when the provider device overwrites an event dataset in the ring buffer prior to the recipient device obtaining the event dataset from the ring buffer. A larger difference between the sequence number and the comparison value can indicate a larger number of data-loss events, while a smaller difference can indicate a smaller number of data-loss events. In some examples, the recipient device can determine how many data-loss events have occurred based on the difference. For example, if the sequence number from the slot is 128 and the determined comparison value is 64, then the difference of 64 between those two numbers may indicate that 64 data-loss events occurred.

In some examples, the recipient device can execute one or more operations in response to detecting a data-loss event. The operations may be configured to reduce future data-loss events. For example, the operations can include adjusting a rate at which the recipient device retrieves event datasets from the ring buffer. The rate may be adjusted to be closer to the rate at which the producer device is adding event datasets to the ring buffer, which may diminish the mismatch between these rates and consequently reduce future data-loss events. As another example, the operations can include increasing a number of slots in the ring buffer, so that the ring buffer can hold more event datasets. This may involve the recipient device directly increasing the number of slots in the ring buffer, or this may involve the recipient device interacting with a remote computing device (e.g., that includes the ring buffer) to cause the remote computing device to increase the number of slots in the ring buffer. With the ring buffer capable of holding more event datasets, the provider device may not need to overwrite event datasets as frequently, which can reduce the number of data-loss events in the future. As yet another example, the recipient device can spawn a new recipient device configured to obtain event datasets from the ring buffer at a different rate or timing interval. This may involve the recipient device directly spawning the new recipient device itself, or this may involve the recipient device interacting with a remote computing device (e.g., an orchestration node) to cause the remote computing device to spawn the new recipient device. With more recipient devices receiving event datasets from the ring buffer, fewer event datasets may be lost by the totality of the recipient devices.

By implementing some or all of the above functionality, some examples of the present disclosure can enable the recipient device to determine if one or more data-loss events have occurred, determine how many data-loss events have occurred, and take corrective action to mitigate data losses in the future. This can avoid the need to throttle the producer device's writes, which in turn can reduce latency and minimize the onus on the producer device, improving system performance. The recipient device can also evaluate the integrity of one or more event datasets that it obtained from the ring buffer, based on how many event datasets were lost due to one or more data-loss events.

Additionally, some examples of the present disclosure can enable the recipient device to wait until a write process is complete before retrieving a corresponding event dataset from a slot. For example, the recipient device can access a slot of the ring buffer and determine if a write-completion indicator is present in the slot. If the write-completion indicator is absent from the slot, it may signal that the write process for the event dataset is not yet complete. So, the recipient device can try again at a later point in time. The recipient device can iterate this process until it detects the write-completion indicator in the slot, after which the recipient device can obtain the corresponding event dataset from the slot. In this way, the recipient device can avoid retrieving an incomplete event dataset.

While the above examples involve a single recipient-device for clarity, it will be appreciated that these concepts can be applied to a system that involves multiple recipient-devices configured to receive event datasets from a single producer device via a single ring buffer. Each recipient device can individually implement some or all of the features described herein, for example to determine the exact number of event datasets it lost in an attempt to keep up with the producer device.

FIG.1is a block diagram of a system100for detecting and managing losses of event datasets according to some aspects of the present disclosure. The system100includes a provider device102and one or more recipient devices110a-n. In general, the provider device102can generate one or more event datasets in response to detecting one or more events. The provider device102can then convey the event datasets to one or more recipient devices110a-nvia a ring buffer108, where the recipient devices110a-nare physically separate from the provider device102.

The provider device102can include any suitable device for generating and writing event datasets to the ring buffer108. Examples of the provider device102can include an IOT device, smart phone, wearable device, tablet, laptop computer, or e-reader. The provider device102can detect an event based on sensor signals from one or more sensors104, which may include accelerometers, gyroscopes, temperature sensors, cameras, microphones, ambient light sensors, infrared sensors, ultrasonic transducers, or any combination of these. In response to detecting the event, the provider device102can generate an event dataset. The event dataset may be generated based on the sensor signals, in some examples, and may serve as telemetry data if the system100is a telemetry system. After generating the event dataset, the provider device102can provide the event dataset to the recipient devices110a-nby writing the event dataset to the ring buffer108. This is described in greater detail later on.

The recipient devices110a-ncan include any suitable device for receiving event datasets from the ring buffer108. For example, the recipient devices110a-ncan include IOT devices, servers, cloud or cluster nodes, desktop computers, or any combination of these. In some examples, the recipient devices110a-nform part of a distributed computing system, such as a cloud computing system, computing cluster, or data grid. The recipient devices110a-ncan read event datasets from the ring buffer108and perform operations based on the event datasets. For example, the recipient devices110a-ncan analyze the event datasets and provide results of the analysis to one or more users of the recipient devices110a-n.

The ring buffer108can be positioned in any suitable location within the system100. In the example shown inFIG.1, the ring buffer108is part of a node106, such as an IOT device, server, cloud or cluster node, desktop computer, or any combination of these. The node106can be separate from, and serve as an intermediary between, the provider device102and the recipient device110a-n. But in other examples, the ring buffer108may be internal to the provider device102or one of the recipient devices110a-n. A location of the ring buffer108is suitable so long as the provider device102can write data to the ring buffer108and the recipient devices110a-ncan read data from the ring buffer108. Writing data to the ring buffer108can include directly writing the data to the ring buffer108or indirectly writing the data to the ring buffer108, for example, by interacting with a remote computing device (e.g., node106) for causing the remote computing device to write the data to the ring buffer108. Reading data from the ring buffer108can include directly reading the data from the ring buffer108or indirectly reading the data to the ring buffer108, for example, by interacting with a remote computing device for causing the remote computing device to read the data from the ring buffer108and transmit the data to the requesting device. In may be unnecessary for the recipient devices110a-nto be able to write data to the ring buffer108, and in some examples the recipient devices110a-nmay be prevented from writing data to the ring buffer108.

The ring buffer108includes N slots, where N is a fixed number. Each slot may include a first predefined area for storing a sequence number and a second predefined area for storing an event dataset, where the first predefined area is separate from the second predefined area. The first predefined area may have a fixed size, such as 64 bits. This fixed size may be determined based on a maximum allowable size of a sequence number. The second predefined area may also have a fixed size, such as 8 kilobyte (kb). This fixed size may be determined based on a maximum allowable size for an event dataset. InFIG.1, the N slots are depicted as slots116a-n. Slot116acan include a first predefined area112afor storing a sequence number and a second predefined area114afor storing an event dataset. Slot116bcan include a first predefined area112bfor storing a sequence number and the second predefined area114bfor storing an event dataset. Slot116ccan include the first predefined area112cfor storing a sequence number and the second predefined area114cfor storing an event dataset. And so on.

A ring buffer108is a data structure with a fixed number of slots of a predesignated size for storing data items. One example of the predesignated size can be 8.008 kb. Ring buffers have read and write pointers that wrap around to the beginning of the ring buffer after reaching an end point of the ring buffer, giving the ring buffer its “circular” perception despite it being a linear data structure. Each trip around the ring buffer may result in older event-datasets stored in the ring buffer's slots being overwritten with newer event-datasets. While various examples are described herein with respect to a ring buffer, other types of buffers may also be used to implement some aspects of the present disclosure.

The system100can work together to write event datasets to, and read event datasets from, the ring buffer108. For example, inFIG.1, the provider device102can detect an event and responsively generate an event dataset118corresponding to the event. The provider device102can then attempt to write the event dataset118to the ring buffer108. This may involve transmitting one or more communications to the node106for causing the node to write the event dataset118to the ring buffer108. The communication(s) can include commands, such as write commands. The node106can receive the communication(s) and responsively determine a slot116aamong a group of slots116a-ndefining the ring buffer108in which to store the event dataset118. In some examples, the node106can determine the slot116abased on a current location of a write pointer associated with the ring buffer108.

After determining the slot116a, the node106can determine a current sequence number to associate with the event dataset118. The node106can determine the current sequence number based on a current value124of a counter120. Although the counter120is depicted as part of the node106inFIG.1, in alternative examples the counter120can be stored on the provider device102, which can transmit the current value124to the node106. Either way, the node106can determine the current sequence number and write the current sequence number to a first predefined area112bof the slot116a. The counter120can then be incremented by a sequence interval. For example, if the current value124of the counter120is 37 and the sequence interval is one, then the incremented value of the counter120would be 38. Alternatively, if the if the current value124of the counter120is 37 and the sequence interval is three, then the incremented value of the counter120would be 40. Any suitable sequence interval can be used, so long as the provider device102and the recipient devices110a-nuse the same sequence interval.

In addition to writing the current sequence number to the first predefined area112bof the slot116a, the node106can also initiate a write process for writing the event dataset118to a second predefined area114bof the slot116a. If the write process completes successfully, the node106can incorporate a write-completion indicator into the first predefined area112bof the slot116a. In some examples, the write-completion indicator can include the incremented value of the counter120, which can be the next sequence number in the sequence. In other examples, the write-completion indicator can include a predesignated character, a predesignated string of characters, a predesignated number, a predesignated string of numbers, or any combination of these. The node106can append the write-completion indicator to the first predefined area112bof the slot116a, replace the current sequence number in the first predefined area112bof the slot116awith the write-completion indicator, or prepend the write-completion indicator to the first predefined area112bof the slot116a. Regardless of how the write-completion indicator is included in the slot116a, the write-completion indicator can indicate to the recipient devices110a-nthat the event dataset118is done being written to the ring buffer108. This can prevent the recipient devices110a-nfrom receiving an incomplete version of the event dataset118from the slot116a.

The recipient devices110a-ncan each read from the ring buffer108in the sequential order of the ring buffer108. For example, the recipient device110a-ncan first read from slot116a, then slot116b, then slot116c, and so on. The recipient devices110a-nmay read from the ring buffer108at a different rate from one another. For example, recipient device110amay read from the ring buffer108at a faster rate than the recipient device110n. The recipient devices110a-ncan also read from the ring buffer108at a different rate than the rate at which the provider device102writes to the ring buffer108. These rate mismatches may lead to data-loss events, the impact of which may be reduced by implemented some aspects of the present disclosure.

More specifically, the recipient devices110a-ncan include counters122a-n. Each recipient device can maintain its own counter for detecting data-loss events with respect to the recipient device. The recipient devices110a-ncan each increment their respective counters122a-nbefore or after reading an event dataset from a slot of the ring buffer108. If the provider device102and the recipient devices110a-nuse the same sequence interval, then there should be little (e.g., a single sequence interval) or no difference between the sequence number written in a slot of the ring buffer108and the current value of a recipient device's counter. If a meaningful difference (e.g., more than a single sequence interval) exists between the sequence number in the slot and the current value of the recipient device's counter122a, it may signal one or more data-loss events. Each recipient device can compare a sequence number in a slot of the ring buffer108to a comparison value that is derived from the current value of its counter122a-n, in order to determine if one or more data-loss events have occurred with respect to the recipient device.

If a recipient device110adetects one or more data-loss events, the recipient device110amay execute one or more operations in response. The operations can be configured to reduce future data-loss events with respect to the recipient device110a(or the system100). In some examples, the operations can include adjusting a rate at which the recipient device110areads from the ring buffer108. The rate may be adjusted to be closer to the rate at which the provider device102is writing to the ring buffer108, which may diminish the mismatch between these rates and consequently reduce future data-loss events. As another example, the operations can include increasing a number of slots in the ring buffer108, so that the ring buffer108can hold more event datasets. This may involve the recipient device110ainteracting with the node106to cause the node106to increase the number of slots in the ring buffer108. With the ring buffer108capable of holding more event datasets, the provider device102may not need to overwrite event datasets as frequently, which can reduce the number of data-loss events in the future. As yet another example, the recipient device110acan spawn a new recipient device configured to obtain event datasets from the ring buffer108. The new recipient device can obtain the event datasets at a different rate or timing interval than the recipient device110a. With more recipient devices receiving event datasets from the ring buffer108, fewer event datasets may be lost by the system100.

In some examples, the recipient devices110a-ncan determine that a write process for the event dataset118is complete before receiving the event dataset118from a slot116aof the ring buffer108. For example, a recipient device110acan read from the first predefined area112aof the slot116aand determine if a write-completion indicator is present therein. If the write-completion indicator is absent, it may signal that the write process for the event dataset118is not yet complete. So, the recipient device110acan implement a polling strategy (e.g., waiting, spinning, or yielding) for causing the recipient device110ato attempt to obtain the event dataset118again from the ring buffer108subsequent to a passage of a time period. In one such example, the recipient device110acan wait for a predefined timespan and, upon the expiration of the predefined timespan, read the data again from the first predefined area112aof the slot116a. The recipient device110acan iterate this process until it detects the write-completion indicator in the first predefined area112a, after which the recipient device110acan receive the event dataset118from the second predefined area114aof the slot116a. By implementing a polling strategy in response to detecting that the write process is incomplete, the recipient device110acan avoid receiving an incomplete version of the event dataset118from the slot116a. The rest of the recipient devices110b-ncan perform a similar process to avoid receiving incomplete versions of the event dataset118.

From the perspective of the node106, the above process can involve the node106receiving a first read request from a recipient device110aprior to the completion of the write process. The first read request can be for obtaining the event dataset118from the slot116a. In response to receiving the first read request, the node can provide a first version of the data in the first predefined area112aof the slot116ato the recipient device110a. The first version of the data may exclude the write-completion indicator. At a later point in time, such as after the expiration of the predefined timespan discussed above, the node106can receive a second read request from the recipient device110a. The second read request can again be for obtaining the event dataset118from the slot116a. In response to receiving the second read request, the node can provide a second version of the data in the first predefined area112aof the slot116ato the recipient device110a. If the second read request is received after the write process is complete, then the second version of the data can include the write-completion indicator. Otherwise, the second version of the data may still exclude the write-completion indicator, and the process may iterate further.

While some of the examples above involve the node106performing certain functionality, in other examples some or all of the node's functionality can additionally or alternatively be implemented by the provider device102. For example, the provider device102can include the counter120, the ring buffer108, or both of these. And the provider device102may write sequence numbers and event datasets to the ring buffer108, for example without having to communicate with a remote computing device like the node106(the node106may be absent from the system100). In still other examples, some or all of the node's functionality can additionally or alternatively be implemented by a recipient device110a. For example, the recipient device110acan include the counter120, the ring buffer108, or both of these. And the recipient device110amay read from and write to the ring buffer108, for example without having to communicate with a remote computing device like the node106(the node106may be absent from the system100).

FIG.2is a block diagram of another example of a system200for detecting and managing losses of event datasets according to some aspects of the present disclosure. Some or all of the system200can be disposed in a provider device, a recipient device, or a node, such as the provider device102, recipient device110a, or node106ofFIG.1, respectively .

The system200includes a processor202communicatively coupled to a memory204. The processor202can include one processor or multiple processors. Non-limiting examples of the processor202include a Field-Programmable Gate Array (FPGA), an application-specific integrated circuit (ASIC), a microprocessor, or any combination of these. The processor202can execute instructions206stored in the memory204to perform operations. In some examples, the instructions206can include processor-specific instructions generated by a compiler or an interpreter from code written in any suitable computer-programming language, such as C, C++, C#, or Java.

The memory204can include one memory device or multiple memory devices. The memory204can be non-volatile and may include any type of memory device that retains stored information when powered off. Non-limiting examples of the memory204include electrically erasable and programmable read-only memory (EEPROM), flash memory, or any other type of non-volatile memory. At least some of the memory device includes a non-transitory computer-readable medium from which the processor202can read instructions206. A non-transitory computer-readable medium can include electronic, optical, magnetic, or other storage devices capable of providing the processor202with the instructions206or other program code. Non-limiting examples of a non-transitory computer-readable medium include magnetic disk(s), memory chip(s), ROM, random-access memory (RAM), an ASIC, a configured processor, optical storage, or any other medium from which a computer processor can read the instructions206.

In some examples, the processor202can identify a slot116aamong a plurality of slots116a-nof a ring buffer108in which to store an event dataset118. The processor202can also determine a sequence number212to associate with the event dataset118. The processor202can write the sequence number212in a first predefined area112aof the slot116aof the ring buffer108, as indicated by a dotted arrow inFIG.2. The processor202can also initiate a write process for writing the event dataset118in a second predefined area114aof the slot116aof the ring buffer108, where the second predefined area114ais separate from the first predefined area112a. This is also indicated by a dotted arrow inFIG.2. In some examples, the processor202can further detect a completion of the write process. In response to detecting the completion of the write process, the processor202can include a write-completion indicator214in the first predefined area112a. This may signal to one or more recipient devices that the event dataset118is ready to be read.

It will be appreciated that the system200can include additional components, such as a memory controller coupled to the memory204and a network interface for communicating with remote computing devices, which are not shown for simplicity.

FIG.3is a flow chart of an example of a process for writing to a ring buffer according to some aspects of the present disclosure. WhileFIG.3depicts a certain sequence of steps for illustrative purposes, other examples can involve more steps, fewer steps, different steps, or a different order of the steps than is depicted inFIG.3. Further, the steps inFIG.3can iterate. The steps ofFIG.3are described below with reference to components ofFIG.2.

In block302, the processor202identifies a slot116aamong a plurality of slots116a-nof a ring buffer108in which to store an event dataset118. This may involve referring to a write pointer associated with the ring buffer108, where the write pointer can indicate the next slot in which data is to be written to the ring buffer108.

In block304, the processor202determines a sequence number212to associate with the event dataset118. The processor202can determine the sequence number212based on a current value of a counter, such as counter120ofFIG.1. For example, the processor202can use the current value of the counter as the sequence number212. A sequence number that corresponds to the current value of the counter is referred to herein as the current sequence number. A sequence number that corresponds to the next value of the counter is referred to herein as the next sequence number.

In block306, the processor202writes the sequence number212in a first predefined area112aof the slot116aof the ring buffer108. This may involve the processor202interacting with a memory controller coupled to a memory (e.g., memory204) storing the ring buffer108, for example, if the processor202and the ring buffer108are located on the same physical device. Alternatively, this may involve the processor202communicating with a remote computing device for causing the remote computing device to write the sequence number212to the ring buffer108. The remote computing device may include the ring buffer108.

In some examples, the processor202can increment the counter to generate the next sequence number after writing the sequence number212to the slot116a.

In block308, the processor202initiates a write process for writing the event dataset118in a second predefined area114aof the slot116aof the ring buffer108, where the second predefined area114ais separate from the first predefined area112a. This may involve the processor202interacting with a memory controller coupled to a memory storing the ring buffer108, for example, if the processor202and the ring buffer108are located on the same physical device. Alternatively, this may involve the processor202communicating with a remote computing device for causing the remote computing device to write the event dataset118to the ring buffer108. The remote computing device may include the ring buffer108.

In block310, the processor202detects a completion of the write process. This may involve the processor202interacting with a memory controller coupled to a memory storing the ring buffer108, for example, if the processor202and the ring buffer108are located on the same physical device. Alternatively, this may involve the processor202receiving a communication from a remote computing device indicating that the write process is complete. The remote computing device may include the ring buffer108.

In block312, the processor202includes a write-completion indicator214in the first predefined area112a. This may involve the processor202interacting with a memory controller coupled to a memory storing the ring buffer108, for example, if the processor202and the ring buffer108are located on the same physical device. Alternatively, this may involve the processor202communicating with a remote computing device for causing the remote computing device to write the write-completion indicator214to the ring buffer108.

The write-completion indicator214can be different from the sequence number212. For example, the write-completion indicator214can be the next sequence number. Alternatively, the write-completion indicator214can include a predefined value, such as a predefined alphanumeric string. Either way, the write-completion indicator214can signal to one or more recipient devices that the event dataset118is ready to be read.

In some examples, the processor202can include the write-completion indicator214into the first predefined area112aby overwriting the existing information in the first predefined area112awith the write-completion indicator214. Alternatively, the processor202can append or prepend the write-completion indicator214to the existing information in the first predefined area112a.

FIG.4is a flow chart of an example of a process for reading from a ring buffer according to some aspects of the present disclosure. WhileFIG.4depicts a certain sequence of steps for illustrative purposes, other examples can involve more steps, fewer steps, different steps, or a different order of the steps than is depicted inFIG.4. Further, the steps inFIG.4can iterate. The steps ofFIG.4are described below with reference to components ofFIG.1.

In block402, a recipient device110areceives a counter value from a counter122a. This may involve the processor202interacting with a memory controller coupled to a memory storing the counter122a, for example, if the processor202and the counter are located on the same physical device. Alternatively, this may involve the processor202communicating with a remote computing device for causing the remote computing device to read the current value of the counter122aand transmit the current value of the counter122ato the processor202. The remote computing device may include the counter122a.

In block404, the recipient device110adetermines a slot116aof a ring buffer108to read from based on the counter value. For example, the recipient device110acan determine the slot based on the following equation: (counter value from counter) mod (ring buffer capacity).

In block406, the recipient device110areads a first sequence number from the determined slot116aof the ring buffer108. For example, the recipient device110acan read the first sequence number from the first predefined area112aof the slot116a. An example of the first sequence number can include the sequence number212ofFIG.2.

Reading information (e.g., sequence number212) from the ring buffer108may involve the recipient device110ainteracting with a memory controller coupled to a memory storing the ring buffer108, for example, if the ring buffer108is located on the recipient device110a. Alternatively, reading information from the ring buffer108may involve the recipient device110acommunicating with a remote computing device for causing the remote computing device to read the information from the ring buffer108and transmit the information to the recipient device110a. The remote computing device may include the ring buffer108.

In block408, the recipient device110adetermines if the first sequence number is valid. This may involve comparing the first sequence number to the counter value to determine a relationship between the two, such as whether they are equivalent to one another. If so, the first sequence number is valid. Otherwise, the first sequence number may be invalid. An invalid sequence number may be indicative of a data-loss event.

If the sequence number212is valid, the process can continue to block410. Otherwise, the process can continue to block418.

In block410, the recipient device110areads the event dataset118from the slot116aof the ring buffer108. For example, the recipient device110acan read the event dataset118from the second predefined area114aof the slot116a.

In block412, the recipient device110areads a second sequence number from the slot116a. For example, the recipient device110acan read the second sequence number from the first predefined area112aof the slot116a. The second sequence number may be the same as, or different from, the first sequence number.

In block414, the recipient device110adetermines if the second sequence number is valid. For example, the recipient device110acan compare the first sequence number to the second sequence number to determine if there is a difference between the two. If they are the same, then the sequence number212is valid. Otherwise, the sequence number is invalid. A difference between the first and second sequence numbers may result from the slot116abeing overwritten during the timeframe in which the recipient device110awas reading the event dataset, and may be indicative of a data loss event.

If the recipient device110adetermines that the second sequence number is valid, the process can continue to block416. Otherwise, the process can continue to block420, which will be discussed later on.

In block416, the recipient device110adetermines that the event dataset118is valid. The recipient device110acan determine that the event dataset118is valid based on determining that the second sequence number is valid. The recipient device110amay then copy the event dataset118into a copy buffer, which can be a buffer that is locally stored on the recipient device110afor maintaining local copies of event datasets for subsequent use.

As mentioned above, in block408, the recipient device110adetermines if the first sequence number is valid. If the first sequence number is invalid, then the process can continue to block418.

In block418, the recipient device110adetermines if the slot116ais being overwritten. For example, a provider device may not have written any data yet to the second predefined area114aof the slot116a. So, the recipient device110acan attempt to read the second predefined area114aof the slot116a, determine that there the second predefined area114aof the slot116ais empty, and consequently determine that the slot116ais not being overwritten.

If the recipient device110adetermines that the slot116ais not being overwritten, the process can continue to block424, in which the recipient device110acan determine that there is no new event dataset available. If the recipient device110adetermines that the slot116ais being overwritten, the process can continue to block420.

In block420, the recipient device110adetermines a number of lost event datasets. For example, the recipient device110acan determine a difference between the first sequence number and the counter value. The difference can represent the number of lost event datasets as a result of this iteration of the process. The recipient device110acan add the difference to an existing value of a loss variable, where the loss variable indicates a total number of data loss events. Each time the recipient device110aiterates some or all of the process shown inFIG.4, the recipient device110acan update the loss variable to maintain a running total of the number of data loss events. In this way, the recipient device110acan determine how many data-loss events it has experienced.

In block422, the recipient device110aupdates the counter value based on the second sequence number. For example, the recipient device110acan update the value of the counter122ato match the second sequence number. This can enable the recipient device110ato synchronize its counter122awith that of the provider device.

Each of the recipient devices110a-nmay individually perform a process similar to the one shown inFIG.4. This may enable each of the recipient devices110a-nto, for example, maintain its own running total of the number of data loss events that have occurred with respect to that particular recipient device.