# US 12,181,995 B2 · Accurate global eventual counting

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 12,181,995 B2
- Document ID: US12181995B2
- Status: Granted
- Kind: B2
- Application number: 17/683,818
- Filed: 2022-03-01
- Published: 2023-09-07
- Granted: 2024-12-31
- Earliest claimed: 2022-03-01
- Assignees: Netflix, Inc.
- Applicants: Netflix, Inc.
- Inventors: Varun Khaitan; Joseph Lynch; Rajiv Shringi
- Web page: https://patentgrep.com/patent/US12181995B2

## CPC

- G06F 11/3075: {the data filtering being achieved in order to maintain consistency among the monitored data, e.g. ensuring that the monitored data belong to the same timeframe, to the same system or component}
- G06F 9/542: {Event management; Broadcasting; Multicasting; Notifications}
- G06F 11/3082: {the data filtering being achieved by aggregating or compressing the monitored data}
- G06F 11/3086: {where the reporting involves the use of self describing data formats, i.e. metadata, markup languages, human readable formats}
- G06F 40/284: Lexical analysis, e.g. tokenisation or collocates
- G06F 2201/835: Timestamp
- G06F 2201/88: Monitoring involving counting
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

In various embodiments, a computer-implemented method comprises receiving, from a first endpoint device, a first event during a first time period, modifying an event log to include a record associated with the first event, causing a rollup queue to include a request to count a first count value associated with the first event, and generating, in a second time period subsequent to the first time period, a counter value associated with at least the first event based on the rollup queue and the event log.

## Claims

### Claim 1

A computer-implemented method comprising:
receiving, from a first endpoint device, a first event during a first time period;
modifying an event log to include a record associated with the first event;
causing a rollup queue to include a request to count a first count value associated with the first event; and
generating, in a second time period subsequent to the first time period, a counter value associated with at least the first event based on the rollup queue and the event log.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, wherein:
the event log includes a set of immutable events;
a first partition of the event log is not appended after a threshold time period; and
generating the counter value includes aggregating a set of count values in the first partition after the threshold time period.

### Claim 3 (depends on 2)

The computer-implemented method of claim 2, wherein each record included in the event log includes a globally-unique idempotency token that includes (i) a unique identifier, and (ii) a timestamp.

### Claim 4 (depends on 2)

The computer-implemented method of claim 2, further comprising:
determining that the threshold time period has elapsed;
deduplicating, based on a set of idempotency tokens, a set of records included in a first partition of the event log to generate a deduplicated set of records, wherein the set of records includes the record; and
generating an updated count value based on the deduplicated set of records, wherein the updated count value is included in the counter value.

### Claim 5 (depends on 1)

The computer-implemented method of claim 1, further comprising:
receiving, from the first endpoint device, a second message that includes the first event;
appending a second record associated with the first event to the event log, wherein the first record and the second record include a globally-unique token; and
deduplicating the record and the second record based on the globally-unique token.

### Claim 6 (depends on 1)

The computer-implemented method of claim 1, further comprising:
receiving, from the first endpoint device, a request message;
determining that the request message includes a request for the first event;
retrieving, from the event log, the record; and
transmitting, to the first endpoint device, a response that includes the first count value retrieved from the record.

### Claim 7 (depends on 1)

The computer-implemented method of claim 1, further comprising:
receiving, from the first endpoint device, a request message;
determining that the request message includes a request for the counter value;
retrieving the counter value; and
transmitting, to the first endpoint device, a response that includes the counter value.

### Claim 8 (depends on 7)

The computer-implemented method of claim 7, wherein the counter value is stored in at least one of (i) an event cache, or (ii) a rollup table.

### Claim 9 (depends on 7)

The computer-implemented method of claim 7, wherein retrieving the counter value overlaps with writing the record to the event log.

### Claim 10 (depends on 1)

The computer-implemented method of claim 1, wherein the first count value comprises one of (i) a negative value, or (ii) a value of 2 or higher.

### Claim 11

One or more non-transitory computer-readable storage media storing instructions that, when executed by one or more processors, cause the one or more processors to perform the steps of:
receiving, from a first endpoint device, a first event during a first time period;
modifying an event log to include a record associated with the first event;
causing a rollup queue to include a request to count a first count value associated with the first event; and
generating, in a second time period subsequent to the first time period, a counter value associated with at least the first event based on the rollup queue and the event log.

### Claim 12 (depends on 11)

The one or more non-transitory computer-readable storage media of claim 11, further storing instructions that, when executed by the one or more processors, cause the one or more processors to perform the steps of:
determining that a threshold time period has elapsed;
upon determining that the threshold time period has elapsed, deduplicating a set of records included in a first partition of the event log to generate a deduplicated set of records, wherein:
the deduplicated set of records includes the record,
each record included in the event log includes an idempotency token that includes (i) a unique identifier, and (ii) a timestamp, and
the deduplicating is based on a set of idempotency tokens; and
generating an updated count value based on the deduplicated set of records, wherein the updated count vale is included in the counter value.

### Claim 13 (depends on 11)

The one or more non-transitory computer-readable storage media of claim 11, further storing instructions that, when executed by the one or more processors, cause the one or more processors to perform the steps of:
determining that the request to count a first count value associated with the first event is included in the rollup queue;
aggregating, based on the request included in the rollup queue, a set of records included in the event log to generate a count value update, wherein the set of records includes the first count value; and
updating the counter value based on the count value update, wherein the counter value is stored in an event cache.

### Claim 14 (depends on 11)

The one or more non-transitory computer-readable storage media of claim 11, further storing instructions that, when executed by the one or more processors, cause the one or more processors to perform the steps of:
generating a rollup count entry that includes the count value update and a rollup timestamp; and
updating a rollup table to include the rollup count entry and the rollup timestamp.

### Claim 15 (depends on 11)

The one or more non-transitory computer-readable storage media of claim 11, wherein the first count value comprises one of (i) a negative value, or (ii) a value of 2 or higher.

### Claim 16 (depends on 11)

The one or more non-transitory computer-readable storage media of claim 11, further comprising instructions that cause the one or more processors to further perform the steps of:
receiving, by an Internet exchange (IX) point in a first region from a set of endpoint devices, a set of events made by a plurality of users, wherein the set of events includes the first event;
appending a set of records associated with the set of events to a local event log; and
replicating the set of events included in the local event log by appending the set of events to the event log.

### Claim 17

A system comprising:
a memory storing a global event counter application; and
a processor coupled to the memory that executes the global event counter application by performing the steps of:
receiving, from a first endpoint device, a first event during a first time period;
modifying an event log to include a record associated with the first event;
causing a rollup queue to include a request to count a first count value associated with the first event; and
generating, in a second time period subsequent to the first time period, a counter value associated with at least the first event based on the rollup queue and the event log.

### Claim 18 (depends on 17)

The system of claim 17, wherein the processor further executes the global event counter application to perform the steps of:
determining that a threshold time period has elapsed;
upon determining that the threshold time period has elapsed, deduplicating a set of records included in a first partition of the event log to generate a deduplicated set of records, wherein:
the deduplicated set of records includes the record,
each record included in the event log includes an idempotency token that includes (i) a unique identifier, and (ii) a timestamp, and
the deduplicating is based on a set of idempotency tokens; and
generating an updated count value based on the deduplicated set of records, wherein the updated count vale is included in the counter value.

### Claim 19 (depends on 17)

The system of claim 17, wherein the processor further executes the global event counter application to perform the steps of:
determining that the request to count a first count value associated with the first event is included in the rollup queue;
aggregating, based on the request included in the rollup queue, a set of records included in the event log to generate a count value update, wherein the set of records includes the first count value; and
updating the counter value based on the count value update, wherein the counter value is stored in an event cache.

### Claim 20 (depends on 17)

The system of claim 17, wherein the processor further executes the global event counter application to perform the steps of:
receiving, from the first endpoint device, a request message;
determining that the request message includes a request for the counter value;
retrieving the counter value; and
transmitting, to the first endpoint device, a response that includes the counter value.
