# US 9,356,986 B2 · Distributed stream processing

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

- Number: US 9,356,986 B2
- Document ID: US9356986B2
- Status: Granted
- Kind: B2
- Application number: 14/820,876
- Filed: 2015-08-07
- Published: 2016-02-11
- Granted: 2016-05-31
- Earliest claimed: 2014-08-08
- Assignees: SAS Institute Inc.
- Applicants: SAS Institute Inc.
- Inventors: Joseph Albert F.S. Pingenot
- Web page: https://patentgrep.com/patent/US9356986B2

## CPC

- H04L 65/764: {at the destination (reformatting of additional data in video clients H04N21/4355)}
- H04L 63/08: {for authentication of entities (cryptographic mechanisms or cryptographic arrangements for entity authentication H04L9/32)}
- H04L 65/1069: Session establishment or de-establishment
- H04L 65/61: for supporting one-way streaming services, e.g. Internet radio
- H04L 67/1001: for accessing one among a plurality of replicated servers
- H04L 67/1095: Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
- H04L 67/141: Setup of application sessions (admission control or resource allocation in data switching networks H04L47/70)
- H04L 67/54: Presence management, e.g. monitoring or registration for receipt of user log-on information, or the connection status of the users
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

In a computing device supporting distributed stream processing, a request is received from a controller device to redistribute blocks storing streamed data. The request indicates that a number of blocks stored on the computing device be sent to a second computing device. The controller device controls distribution of analytic results to a data access system. The analytic results are computed from the streamed data. The indicated number of blocks are selected from the blocks storing the streamed data. The selected blocks are sent to the second computing device. Pointers to remaining blocks of the blocks storing the streamed data are updated.

## Claims

### Claim 1

A non-transitory computer-readable medium having stored thereon computer-readable instructions that when executed by a computing device cause the computing device to:
receive a request from a controller device to redistribute blocks storing streamed data, wherein the request indicates that a number of blocks stored on the computing device be sent to a second computing device, wherein the controller device controls distribution of analytic results to a data access system, wherein the analytic results are computed from the streamed data;
select the indicated number of blocks from the blocks storing the streamed data;
send the selected blocks to the second computing device;
after selecting the indicated number of blocks, calling a function of an analytic task process created to at least partially compute an analytic result of the analytic results from the streamed data, wherein the function handles a modification to the analytic result that results from sending the selected blocks to the second computing device; and
update a pointer to remaining blocks of the blocks storing the streamed data.

### Claim 2 (depends on 1)

The non-transitory computer-readable medium of claim 1, wherein the function is called using a function pointer included as part of an analytics class and that is responsive to a transfer out event.

### Claim 3 (depends on 2)

The non-transitory computer-readable medium of claim 2, wherein the function generates a command and adds the generated command to a command queue.

### Claim 4 (depends on 3)

The non-transitory computer-readable medium of claim 3, wherein the receiving, the selecting, the sending, and the updating are performed using a first thread of the computing device and the command queue is processed using a second thread of the computing device.

### Claim 5 (depends on 3)

The non-transitory computer-readable medium of claim 3, wherein the command includes the function pointer and a pointer to at least one of the selected blocks.

### Claim 6 (depends on 5)

The non-transitory computer-readable medium of claim 5, wherein the command further includes a pointer to a request handle created for the analytic task process.

### Claim 7 (depends on 5)

The non-transitory computer-readable medium of claim 5, wherein the command further includes a request handle created for the analytic task process.

### Claim 8 (depends on 1)

The non-transitory computer-readable medium of claim 1, wherein oldest blocks of the blocks storing the streamed data are selected.

### Claim 9 (depends on 1)

The non-transitory computer-readable medium of claim 1, wherein the pointer is a head pointer of a block list updated to point to a first block of the remaining blocks.

### Claim 10

A non-transitory computer-readable medium having stored thereon computer-readable instructions that when executed by a computing device cause the computing device to:
receive a request from a controller device to redistribute blocks storing streamed data, wherein the request indicates that a number of blocks stored on the computing device be sent to a second computing device, wherein the controller device controls distribution of analytic results to a data access system, wherein the analytic results are computed from the streamed data;
select the indicated number of blocks from the blocks storing the streamed data;
send the selected blocks to the second computing device;
update a pointer to remaining blocks of the blocks storing the streamed data;
receive previously streamed data from a third computing device;
obtain a block of memory from a list of free blocks;
append the received previously streamed data to the obtained block of memory; and
add the obtained block of memory to the remaining blocks of the blocks storing the streamed data.

### Claim 11 (depends on 10)

The non-transitory computer-readable medium of claim 10, wherein the obtained block of memory is added to the remaining blocks of the blocks by updating a tail pointer of the block list to point to the obtained block of memory.

### Claim 12 (depends on 10)

The non-transitory computer-readable medium of claim 10, wherein, after adding the obtained block of memory, the computer-readable instructions further cause the computing device to call a function of an analytic task process created to at least partially compute an analytic result of the analytic results from the streamed data, wherein the function handles a modification to the analytic result that results from receiving the selected blocks from the third computing device.

### Claim 13 (depends on 12)

The non-transitory computer-readable medium of claim 12, wherein the function is called using a function pointer included as part of an analytics class and that is responsive to a receive in event.

### Claim 14 (depends on 13)

The non-transitory computer-readable medium of claim 13, wherein the function generates a command and adds the generated command to a command queue.

### Claim 15 (depends on 14)

The non-transitory computer-readable medium of claim 14, wherein the receiving of the previously streamed data, the obtaining, the appending, and the adding are performed using a first thread of the computing device and the command queue is processed using a second thread of the computing device.

### Claim 16 (depends on 14)

The non-transitory computer-readable medium of claim 14, wherein the command includes the function pointer and a pointer to the obtained block of memory.

### Claim 17

A system comprising:
a first computing device comprising
a first processor; and
a first non-transitory computer-readable medium operably coupled to the first processor, the first computer-readable medium having first computer-readable instructions stored thereon that, when executed by the first processor, cause the first computing device to
receive a request from a controller device to redistribute blocks storing streamed data, wherein the request indicates that a number of blocks stored on the first computing device be sent to a second computing device, wherein the controller device controls distribution of analytic results to a data access system, wherein the analytic results are computed from the streamed data;
select the indicated number of blocks from the blocks storing the streamed data;
send the selected blocks to the second computing device; and
update a pointer to remaining blocks of the blocks storing the streamed data; and
the controller device, wherein the controller device comprises:
a second processor; and
a second non-transitory computer-readable medium operably coupled to the second processor, the second computer-readable medium having second computer-readable instructions stored thereon that, when executed by the second processor, cause the controller device to
send the request to the first computing device; and
before sending the request to the first computing device,
receive a first value indicating a number of the blocks storing streamed data on the first computing device;
receive a second value indicating a number of blocks storing streamed data on the second computing device;
compute a rebalancing value as an average of the received first value and the received second value; and
compute the number of blocks stored on the first computing device to be sent to the second computing device based on the computed rebalancing value, wherein computing the number of blocks comprises:
selecting a random number; and
when the random number is less than 1−exp−C(Ni/N−1), the number of blocks stored on the first computing device to be sent to the second computing device is computed as Ni−N, wherein C is a rebalancing parameter, Ni is the received first value and N is the computed rebalancing value.

### Claim 18 (depends on 17)

The system of claim 17, wherein C is defined as C=PR(N−1)/Ni, wherein PR is a pre-defined probability of rebalancing.

### Claim 19

A system comprising:
a first computing device comprising
a first processor; and
a first non-transitory computer-readable medium operably coupled to the first processor, the first computer-readable medium having first computer-readable instructions stored thereon that, when executed by the first processor, cause the first computing device to
receive a request from a controller device to redistribute blocks storing streamed data, wherein the request indicates that a number of blocks stored on the first computing device be sent to a second computing device, wherein the controller device controls distribution of analytic results to a data access system, wherein the analytic results are computed from the streamed data;
select the indicated number of blocks from the blocks storing the streamed data;
send the selected blocks to the second computing device; and
update a pointer to remaining blocks of the blocks storing the streamed data; and
the controller device, wherein the controller device comprises:
a second processor; and
a second non-transitory computer-readable medium operably coupled to the second processor, the second computer-readable medium having second computer-readable instructions stored thereon that, when executed by the second processor, cause the controller device to
send the request to the first computing device; and
before sending the request to the first computing device,
receive a first value indicating a number of the blocks storing streamed data on the first computing device;
receive a second value indicating a number of blocks storing streamed data on the second computing device;
receive a third value indicating a number of blocks storing streamed data on a third computing device, wherein the number of blocks storing streamed data on the second computing device and the number of blocks storing streamed data on the third computing device are less than the number of blocks storing streamed data on the first computing device;
compute a rebalancing value as an average of the received first value, the received second value, and the received third value;
select a random number in a range defined by [0, 2N−(Na+Nb)), where N is the computed rebalancing value, Na is the number of blocks storing streamed data on the second computing device, and Nb is the number of blocks storing streamed data on the third computing device;
compute the number of blocks stored on the first computing device to be sent to the second computing device based on the computed rebalancing value; and
select the second computing device to receive the number of blocks stored on the first computing device to be sent to the second computing device based on the selected random number falling within a range defined by [0, N−Na).

### Claim 20 (depends on 19)

The system of claim 19, wherein the number of blocks stored on the first computing device to be sent to the second computing device is computed as N−Na.

### Claim 21

A system comprising:
a first computing device comprising
a first processor; and
a first non-transitory computer-readable medium operably coupled to the first processor, the first computer-readable medium having first computer-readable instructions stored thereon that, when executed by the first processor, cause the first computing device to
receive a request from a controller device to redistribute blocks storing streamed data, wherein the request indicates that a number of blocks stored on the first computing device be sent to a second computing device, wherein the controller device controls distribution of analytic results to a data access system, wherein the analytic results are computed from the streamed data;
select the indicated number of blocks from the blocks storing the streamed data;
send the selected blocks to the second computing device; and
update a pointer to remaining blocks of the blocks storing the streamed data; and
the controller device, wherein the controller device comprises:
a second processor; and
a second non-transitory computer-readable medium operably coupled to the second processor, the second computer-readable medium having second computer-readable instructions stored thereon that, when executed by the second processor, cause the controller device to
send the request to the first computing device; and
after sending the request to the first computing device,
receive a first value indicating a number of the blocks storing streamed data on the first computing device;
receive a second value indicating a number of blocks storing streamed data on the second computing device;
receive a third value indicating a number of blocks storing streamed data on a third computing device;
compute a rebalancing value as an average of the received first value, the received second value, and the received third value;
compute the number of blocks stored on the first computing device to be sent to the second computing device based on the computed rebalancing value;
select a random number in a range defined by [0, 2N−(Na+Nb)), where N is the computed rebalancing value, Na is the number of blocks storing streamed data on the first computing device, Nb is the number of blocks storing streamed data on the second computing device, and Nc is the number of blocks storing streamed data on the third computing device, wherein Na and Nb are less than Nc; and
select the second computing device to receive a second number of blocks stored on the third computing device based on the selected random number falling within a range defined by [N−Na, 2N−(Na+Nb)).

### Claim 22 (depends on 21)

The system of claim 21, further comprising the second computing device, wherein the second computing device comprises:
a third processor; and
a third non-transitory computer-readable medium operably coupled to the third processor, the third computer-readable medium having third computer-readable instructions stored thereon that, when executed by the third processor, cause the second computing device to:
receive the selected blocks from the first computing device;
obtain a block of memory from a list of free blocks;
append a block of the received selected blocks to the obtained block of memory; and
add the obtained block of memory to the blocks storing streamed data on the second computing device.

### Claim 23 (depends on 22)

The system of claim 22, wherein the third computer-readable instructions further cause the second computing device to:
receive the second number of blocks from the third computing device;
obtain a second block of memory from the list of free blocks;
append a block of the received second number of blocks to the obtained second block of memory; and
add the obtained second block of memory to the blocks storing streamed data on the second computing device.

### Claim 24

A method of distributed stream processing, the method comprising:
receiving, by a computing device, a request from a controller device to redistribute blocks storing streamed data, wherein the request indicates that a number of blocks stored on the computing device be sent to a second computing device, wherein the controller device controls distribution of analytic results to a data access system, wherein the analytic results are computed from the streamed data;
selecting, by the computing device, the indicated number of blocks from the blocks storing the streamed data;
sending, by the computing device, the selected blocks to the second computing device;
after selecting the indicated number of blocks, calling, by the computing device, a function of an analytic task process created to at least partially compute an analytic result of the analytic results from the streamed data, wherein the function handles a modification to the analytic result that results from sending the selected blocks to the second computing device; and
updating, by the computing device, a pointer to remaining blocks of the blocks storing the streamed data.

### Claim 25 (depends on 24)

The method of claim 24, wherein the function is called using a function pointer included as part of an analytics class and that is responsive to a transfer out event.

### Claim 26 (depends on 24)

The method of claim 24, wherein the function generates a command and adds the generated command to a command queue.

### Claim 27 (depends on 26)

The method of claim 26, wherein the receiving, the selecting, the sending, and the updating are performed using a first thread of the computing device and the command queue is processed using a second thread of the computing device.

### Claim 28 (depends on 26)

The method of claim 26, wherein the command includes the function pointer and a pointer to at least one of the selected blocks.

### Claim 29 (depends on 28)

The method of claim 28, wherein the command further includes a pointer to a request handle created for the analytic task process.

### Claim 30 (depends on 28)

The method of claim 28, wherein the command further includes a request handle created for the analytic task process.
